94 lines
1.8 KiB
YAML
94 lines
1.8 KiB
YAML
version: "3.2"
|
|
|
|
|
|
services:
|
|
|
|
migrations:
|
|
image: mathwave/sprint-repo:sprint
|
|
command: ./manage.py migrate
|
|
deploy:
|
|
mode: replicated
|
|
restart_policy:
|
|
condition: none
|
|
|
|
web:
|
|
image: mathwave/sprint-repo:sprint
|
|
environment:
|
|
PORT: 80
|
|
HOST: $HOST
|
|
debug: "false"
|
|
command: ./manage.py runserver 0.0.0.0:80 --noreload
|
|
ports:
|
|
- "80:80"
|
|
deploy:
|
|
mode: replicated
|
|
restart_policy:
|
|
condition: on-failure
|
|
|
|
bot:
|
|
image: mathwave/sprint-repo:sprint
|
|
environment:
|
|
HOST: $HOST
|
|
command: ./manage.py bot
|
|
depends_on:
|
|
- web
|
|
deploy:
|
|
mode: replicated
|
|
restart_policy:
|
|
condition: on-failure
|
|
|
|
loop:
|
|
image: mathwave/sprint-repo:sprint
|
|
environment:
|
|
HOST: $HOST
|
|
command: ./manage.py loop
|
|
depends_on:
|
|
- web
|
|
deploy:
|
|
mode: replicated
|
|
restart_policy:
|
|
condition: on-failure
|
|
|
|
worker:
|
|
image: mathwave/sprint-repo:sprint
|
|
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
|
|
restart_policy:
|
|
condition: on-failure
|
|
|
|
apply-languages:
|
|
image: mathwave/sprint-repo:sprint
|
|
command: ./manage.py apply_languages
|
|
depends_on:
|
|
- migrations
|
|
deploy:
|
|
mode: replicated
|
|
restart_policy:
|
|
condition: none
|
|
|
|
notify-admin:
|
|
image: mathwave/sprint-repo:sprint
|
|
command: ./manage.py success_deploy
|
|
depends_on:
|
|
- migrations
|
|
- web
|
|
- worker
|
|
- bot
|
|
- apply-languages
|
|
- loop
|
|
deploy:
|
|
mode: replicated
|
|
restart_policy:
|
|
condition: none
|