From 0a4248bf30adfa11d338566c9ad377706486c56b Mon Sep 17 00:00:00 2001 From: Kevin Midboe Date: Tue, 16 Aug 2022 00:41:33 +0200 Subject: [PATCH] Setup dockerfile for seasoned api project TODO remove apt installing redis and running service internally --- .dockerignore | 2 ++ Dockerfile | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..ff68129 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +**/node_modules +**/yarn.lock \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7cc8bc1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,22 @@ +FROM node:18 + +RUN mkdir -p /opt/seasonedShows + +WORKDIR /opt/seasonedShows + +COPY seasoned_api/ . + +RUN apt update +RUN apt install node-pre-gyp -y +RUN yarn +RUN cp conf/development.json.example conf/development.json + +# Replace with external redis +RUN apt install redis-server systemctl -y +RUN systemctl enable redis-server + +EXPOSE 31459 + +CMD ["yarn", "start"] + +LABEL org.opencontainers.image.source https://github.com/kevinmidboe/seasoned