Add links & container_name
This commit is contained in:
parent
f5020bd378
commit
ae936d9817
1 changed files with 9 additions and 11 deletions
|
|
@ -3,51 +3,49 @@ version: '3.8'
|
||||||
services:
|
services:
|
||||||
|
|
||||||
service-authentication:
|
service-authentication:
|
||||||
|
container_name: service-authentication
|
||||||
build: backend/service-authentication
|
build: backend/service-authentication
|
||||||
command: node server.js
|
command: node server.js
|
||||||
volumes:
|
volumes:
|
||||||
- backend/service-authentication
|
- backend/service-authentication
|
||||||
- backend/service-authentication/node_modules
|
- backend/service-authentication/node_modules
|
||||||
ports:
|
ports:
|
||||||
- 3001:3000
|
- 3000:3000
|
||||||
depends_on:
|
depends_on:
|
||||||
- mongodb-authentication
|
- mongodb-authentication
|
||||||
|
links:
|
||||||
|
- mongodb-authentication
|
||||||
environment:
|
environment:
|
||||||
NODE_ENV: development
|
NODE_ENV: development
|
||||||
|
|
||||||
service-message:
|
service-message:
|
||||||
|
container_name: service-message
|
||||||
build: backend/service-message
|
build: backend/service-message
|
||||||
command: node server.js
|
command: node server.js
|
||||||
volumes:
|
volumes:
|
||||||
- backend/service-message
|
- backend/service-message
|
||||||
- backend/service-message/node_modules
|
- backend/service-message/node_modules
|
||||||
ports:
|
ports:
|
||||||
- 3000:3000
|
- 3001:3000
|
||||||
depends_on:
|
depends_on:
|
||||||
- mongodb-message
|
- mongodb-message
|
||||||
|
links:
|
||||||
|
- mongodb-message
|
||||||
environment:
|
environment:
|
||||||
NODE_ENV: development
|
NODE_ENV: development
|
||||||
|
|
||||||
mongodb-authentication:
|
mongodb-authentication:
|
||||||
image: mongo
|
image: mongo
|
||||||
container_name: mongodb-authentication
|
container_name: mongodb-authentication
|
||||||
environment:
|
|
||||||
- PUID=1001
|
|
||||||
- PGID=1001
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./backend/service-authentication/database:/data/db
|
- ./backend/service-authentication/database:/data/db
|
||||||
ports:
|
ports:
|
||||||
- 27017:27017
|
- 27017:27017
|
||||||
restart: unless-stopped
|
|
||||||
|
|
||||||
mongodb-message:
|
mongodb-message:
|
||||||
image: mongo
|
image: mongo
|
||||||
container_name: mongodb-message
|
container_name: mongodb-message
|
||||||
environment:
|
|
||||||
- PUID=1000
|
|
||||||
- PGID=1000
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./backend/service-message/database:/data/db
|
- ./backend/service-message/database:/data/db
|
||||||
ports:
|
ports:
|
||||||
- 27020:27017
|
- 27020:27017
|
||||||
restart: unless-stopped
|
|
||||||
Reference in a new issue