replicas prod

This commit is contained in:
Egor Matveev 2022-05-12 08:55:38 +03:00
parent 965463b92e
commit 80c819209c

View File

@ -70,6 +70,31 @@ services:
parallelism: 1
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:
image: mathwave/sprint-repo:sprint
command: ./manage.py migrate
@ -126,6 +151,7 @@ services:
command: ./manage.py runserver 0.0.0.0:8000 --noreload --insecure
deploy:
mode: replicated
replicas: 2
restart_policy:
condition: any
update_config:
@ -147,6 +173,7 @@ services:
command: ./manage.py runserver 0.0.0.0:7999 --noreload
deploy:
mode: replicated
replicas: 2
restart_policy:
condition: any
update_config:
@ -168,37 +195,13 @@ services:
command: ./manage.py runserver 0.0.0.0:7998 --noreload
deploy:
mode: replicated
replicas: 2
restart_policy:
condition: any
update_config:
parallelism: 1
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:
image: mathwave/sprint-repo:sprint
networks:
@ -214,6 +217,7 @@ services:
command: ./manage.py bot
deploy:
mode: replicated
replicas: 1
restart_policy:
condition: any
update_config:
@ -327,7 +331,7 @@ services:
TELEGRAM_TOKEN: $TELEGRAM_TOKEN
deploy:
mode: replicated
replicas: 1
replicas: 2
restart_policy:
condition: any
update_config:
@ -349,7 +353,7 @@ services:
TELEGRAM_TOKEN: $TELEGRAM_TOKEN
deploy:
mode: replicated
replicas: 1
replicas: 2
restart_policy:
condition: any
update_config:
@ -371,6 +375,7 @@ services:
TELEGRAM_TOKEN: $TELEGRAM_TOKEN
deploy:
mode: replicated
replicas: 1
restart_policy:
condition: on-failure