replicas prod
This commit is contained in:
parent
965463b92e
commit
80c819209c
@ -70,6 +70,31 @@ services:
|
|||||||
parallelism: 1
|
parallelism: 1
|
||||||
order: start-first
|
order: start-first
|
||||||
|
|
||||||
|
storage:
|
||||||
|
image: mathwave/sprint-repo:sprint
|
||||||
|
networks:
|
||||||
|
- net
|
||||||
|
command: ./manage.py storage
|
||||||
|
environment:
|
||||||
|
DB_HOST: "postgres"
|
||||||
|
FS_HOST: "storage"
|
||||||
|
RABBIT_HOST: "rabbitmq"
|
||||||
|
REDIS_HOST: "redis"
|
||||||
|
DB_PASSWORD: $DB_PASSWORD
|
||||||
|
DEBUG: $DEBUG
|
||||||
|
TELEGRAM_TOKEN: $TELEGRAM_TOKEN
|
||||||
|
volumes:
|
||||||
|
- /sprint-data/data:/usr/src/app/data
|
||||||
|
deploy:
|
||||||
|
mode: replicated
|
||||||
|
restart_policy:
|
||||||
|
condition: any
|
||||||
|
placement:
|
||||||
|
constraints: [node.role == manager]
|
||||||
|
update_config:
|
||||||
|
parallelism: 1
|
||||||
|
order: start-first
|
||||||
|
|
||||||
migrations:
|
migrations:
|
||||||
image: mathwave/sprint-repo:sprint
|
image: mathwave/sprint-repo:sprint
|
||||||
command: ./manage.py migrate
|
command: ./manage.py migrate
|
||||||
@ -126,6 +151,7 @@ services:
|
|||||||
command: ./manage.py runserver 0.0.0.0:8000 --noreload --insecure
|
command: ./manage.py runserver 0.0.0.0:8000 --noreload --insecure
|
||||||
deploy:
|
deploy:
|
||||||
mode: replicated
|
mode: replicated
|
||||||
|
replicas: 2
|
||||||
restart_policy:
|
restart_policy:
|
||||||
condition: any
|
condition: any
|
||||||
update_config:
|
update_config:
|
||||||
@ -147,6 +173,7 @@ services:
|
|||||||
command: ./manage.py runserver 0.0.0.0:7999 --noreload
|
command: ./manage.py runserver 0.0.0.0:7999 --noreload
|
||||||
deploy:
|
deploy:
|
||||||
mode: replicated
|
mode: replicated
|
||||||
|
replicas: 2
|
||||||
restart_policy:
|
restart_policy:
|
||||||
condition: any
|
condition: any
|
||||||
update_config:
|
update_config:
|
||||||
@ -168,37 +195,13 @@ services:
|
|||||||
command: ./manage.py runserver 0.0.0.0:7998 --noreload
|
command: ./manage.py runserver 0.0.0.0:7998 --noreload
|
||||||
deploy:
|
deploy:
|
||||||
mode: replicated
|
mode: replicated
|
||||||
|
replicas: 2
|
||||||
restart_policy:
|
restart_policy:
|
||||||
condition: any
|
condition: any
|
||||||
update_config:
|
update_config:
|
||||||
parallelism: 1
|
parallelism: 1
|
||||||
order: start-first
|
order: start-first
|
||||||
|
|
||||||
storage:
|
|
||||||
image: mathwave/sprint-repo:sprint
|
|
||||||
networks:
|
|
||||||
- net
|
|
||||||
command: ./manage.py storage
|
|
||||||
environment:
|
|
||||||
DB_HOST: "postgres"
|
|
||||||
FS_HOST: "storage"
|
|
||||||
RABBIT_HOST: "rabbitmq"
|
|
||||||
REDIS_HOST: "redis"
|
|
||||||
DB_PASSWORD: $DB_PASSWORD
|
|
||||||
DEBUG: $DEBUG
|
|
||||||
TELEGRAM_TOKEN: $TELEGRAM_TOKEN
|
|
||||||
volumes:
|
|
||||||
- /sprint-data/data:/usr/src/app/data
|
|
||||||
deploy:
|
|
||||||
mode: replicated
|
|
||||||
restart_policy:
|
|
||||||
condition: any
|
|
||||||
placement:
|
|
||||||
constraints: [node.role == manager]
|
|
||||||
update_config:
|
|
||||||
parallelism: 1
|
|
||||||
order: start-first
|
|
||||||
|
|
||||||
bot:
|
bot:
|
||||||
image: mathwave/sprint-repo:sprint
|
image: mathwave/sprint-repo:sprint
|
||||||
networks:
|
networks:
|
||||||
@ -214,6 +217,7 @@ services:
|
|||||||
command: ./manage.py bot
|
command: ./manage.py bot
|
||||||
deploy:
|
deploy:
|
||||||
mode: replicated
|
mode: replicated
|
||||||
|
replicas: 1
|
||||||
restart_policy:
|
restart_policy:
|
||||||
condition: any
|
condition: any
|
||||||
update_config:
|
update_config:
|
||||||
@ -327,7 +331,7 @@ services:
|
|||||||
TELEGRAM_TOKEN: $TELEGRAM_TOKEN
|
TELEGRAM_TOKEN: $TELEGRAM_TOKEN
|
||||||
deploy:
|
deploy:
|
||||||
mode: replicated
|
mode: replicated
|
||||||
replicas: 1
|
replicas: 2
|
||||||
restart_policy:
|
restart_policy:
|
||||||
condition: any
|
condition: any
|
||||||
update_config:
|
update_config:
|
||||||
@ -349,7 +353,7 @@ services:
|
|||||||
TELEGRAM_TOKEN: $TELEGRAM_TOKEN
|
TELEGRAM_TOKEN: $TELEGRAM_TOKEN
|
||||||
deploy:
|
deploy:
|
||||||
mode: replicated
|
mode: replicated
|
||||||
replicas: 1
|
replicas: 2
|
||||||
restart_policy:
|
restart_policy:
|
||||||
condition: any
|
condition: any
|
||||||
update_config:
|
update_config:
|
||||||
@ -371,6 +375,7 @@ services:
|
|||||||
TELEGRAM_TOKEN: $TELEGRAM_TOKEN
|
TELEGRAM_TOKEN: $TELEGRAM_TOKEN
|
||||||
deploy:
|
deploy:
|
||||||
mode: replicated
|
mode: replicated
|
||||||
|
replicas: 1
|
||||||
restart_policy:
|
restart_policy:
|
||||||
condition: on-failure
|
condition: on-failure
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user