Skip to content

Instantly share code, notes, and snippets.

@fusetim
Last active December 5, 2020 15:05
Show Gist options
  • Save fusetim/9c924f85e421cc67a8dd4956076b098a to your computer and use it in GitHub Desktop.
Save fusetim/9c924f85e421cc67a8dd4956076b098a to your computer and use it in GitHub Desktop.
Dockerfile for ReadTheBin (RTD's bot for pasting bins)
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