docker swarm deploy settings for separate DB node
This commit is contained in:
parent
80a3b8a853
commit
3333e4aea1
1 changed files with 12 additions and 0 deletions
|
@ -6,6 +6,9 @@ services:
|
||||||
deploy:
|
deploy:
|
||||||
mode: replicated
|
mode: replicated
|
||||||
replicas: 4
|
replicas: 4
|
||||||
|
placement:
|
||||||
|
constraints:
|
||||||
|
- "node.labels.type==web"
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- 443:443
|
- 443:443
|
||||||
|
@ -39,6 +42,9 @@ services:
|
||||||
deploy:
|
deploy:
|
||||||
mode: replicated
|
mode: replicated
|
||||||
replicas: 34
|
replicas: 34
|
||||||
|
placement:
|
||||||
|
constraints:
|
||||||
|
- "node.labels.type==web"
|
||||||
restart: always
|
restart: always
|
||||||
env_file: '.env'
|
env_file: '.env'
|
||||||
environment:
|
environment:
|
||||||
|
@ -52,6 +58,12 @@ services:
|
||||||
|
|
||||||
mongodb:
|
mongodb:
|
||||||
image: mongo:4.2
|
image: mongo:4.2
|
||||||
|
deploy:
|
||||||
|
mode: replicated
|
||||||
|
replicas: 1
|
||||||
|
placement:
|
||||||
|
constraints:
|
||||||
|
- "node.labels.type==database"
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- mongo-data:/data/db
|
- mongo-data:/data/db
|
||||||
|
|
Loading…
Reference in a new issue