Dockerified

This commit is contained in:
Leon Etienne
2022-04-10 04:47:17 +02:00
parent e126788933
commit cd2daf4086
4 changed files with 42 additions and 1 deletions

21
Dockerfile Normal file
View File

@@ -0,0 +1,21 @@
FROM node
# Install the correct npm version
RUN npm install -g n
COPY ./.nvmrc /app/.nvmrc
RUN n install `cat /app/.nvmrc`
# Install node packages
COPY ./package.json /app/package.json
COPY ./package-lock.json /app/package-lock.json
RUN cd /app && npm install
# Set up the entry point
WORKDIR /app
COPY ./entrypoint.sh /app/entrypoint.sh
RUN chmod +x /app/entrypoint.sh
ENTRYPOINT ["/app/entrypoint.sh"]
# Run the server
CMD ["node", "/app/server.js"]