Configure Docker

  • Add Dockerfile and compose.yaml files

FROM node:20-alpine
WORKDIR /app
COPY . .

RUN npm install  
CMD ["node", "node_modules/@ndsk/ndsk","start"]

# or pm2 start
# RUN npm install pm2 -g && npm install  
# CMD ["pm2-runtime", "node_modules/@ndsk/ndsk","start","--pm2"]
services:
  app:
    build: .
    image: ndsk
    ports:
     - "3000:3000"
  • Run docker compose up in the terminal to start the project
  • View the docker documentation here