Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| edc7830a3d |
+5
-5
@@ -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:
|
||||
@@ -40,4 +40,4 @@ services:
|
||||
#volumes:
|
||||
# - ./postgres/pgdata:/var/lib/postgresql/data
|
||||
expose:
|
||||
- "5432"
|
||||
- "5432"
|
||||
|
||||
Reference in New Issue
Block a user