Setup dockerfile for seasoned api project

TODO remove apt installing redis and running service internally
This commit is contained in:
2022-08-16 00:41:33 +02:00
parent 92d139a156
commit 0a4248bf30
2 changed files with 24 additions and 0 deletions

2
.dockerignore Normal file
View File

@@ -0,0 +1,2 @@
**/node_modules
**/yarn.lock

22
Dockerfile Normal file
View File

@@ -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