changed docker-compose.yml to be production

stable
Brian Sakal 4 years ago
parent 9309b6b313
commit edc7830a3d

@ -17,10 +17,10 @@ services:
dockerfile: Dockerfile
# production: no reason to use pm2 if docker offers auto-restart
# development: don't use docker auto-restart; rather pm2, which can watch for file changes
#restart: always
restart: always
user: "node"
environment:
- NODE_ENV=development
- NODE_ENV=production
volumes:
- ./node/:/home/node/app
expose:
@ -29,9 +29,9 @@ services:
- postgres
working_dir: /home/node/app
# for production (no file watching):
# command: sh -c "yarn install && node server.js"
command: sh -c "yarn install && node server.js"
# for development (file watching/reloading):
command: sh -c "yarn install && yarn pm2-dev server.js"
# command: sh -c "yarn install && yarn pm2-dev server.js"
postgres:
image: "postgres:13.1-alpine"
environment:

Loading…
Cancel
Save