sprint/docker-compose-deploy.yaml
Egor Matveev 44b2b38dc2 infra
2022-03-02 20:44:50 +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: $PORT
HOST: $HOST
debug: "false"
command: ./manage.py runserver 0.0.0.0:$PORT --noreload
ports:
- "${PORT}:${PORT}"
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