Last active
December 5, 2020 15:05
-
-
Save fusetim/9c924f85e421cc67a8dd4956076b098a to your computer and use it in GitHub Desktop.
Dockerfile for ReadTheBin (RTD's bot for pasting bins)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:buster-slim | |
# Setup working dir | |
WORKDIR /usr/src/app | |
RUN mkdir /config | |
# Install deps | |
RUN npm install pm2 -g | |
# Copy app | |
COPY . . | |
# Install app | |
RUN npm i --only{prod} && npm run build | |
# Move config (to mount it easily) | |
RUN mv build/config.json /config | |
RUN ln -s /config/config.json build/config.json | |
# Run | |
CMD pm2-runtime build/index.js --source-map-support |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment