sprint/docker-compose-deploy.yaml
Egor Matveev a5ef81d651 infra
2022-03-02 21:02:12 +03:00

85 lines
1.6 KiB
YAML

version: "3.2"
services:
migrations:
image: mathwave/sprint-repo:sprint
command: ./manage.py migrate
deploy:
mode: replicated
web:
image: mathwave/sprint-repo:sprint
restart: always
environment:
PORT: 80
HOST: $HOST
debug: "false"
command: ./manage.py runserver 0.0.0.0:80 --noreload
ports:
- "80:80"
deploy:
mode: replicated
bot:
image: mathwave/sprint-repo:sprint
restart: always
environment:
HOST: $HOST
command: ./manage.py bot
depends_on:
- web
deploy:
mode: replicated
loop:
image: mathwave/sprint-repo:sprint
restart: always
environment:
HOST: $HOST
command: ./manage.py loop
depends_on:
- web
deploy:
mode: replicated
worker:
restart: always
image: mathwave/sprint-repo:sprint
privileged: true
command: ./manage.py receive
environment:
SOLUTIONS_ROOT_EXTERNAL: "${SOLUTIONS_ROOT_EXTERNAL}"
HOST: $HOST
depends_on:
- web
- migrations
volumes:
- /sprint-data/solutions:/usr/src/app/solutions
- /var/run/docker.sock:/var/run/docker.sock
deploy:
mode: replicated
replicas: 4
apply-languages:
image: mathwave/sprint-repo:sprint
command: ./manage.py apply_languages
depends_on:
- migrations
deploy:
mode: replicated
notify-admin:
image: mathwave/sprint-repo:sprint
command: ./manage.py success_deploy
depends_on:
- migrations
- web
- worker
- bot
- apply-languages
- loop
deploy:
mode: replicated