58 lines
1.2 KiB
YAML
58 lines
1.2 KiB
YAML
version: "3.4"
|
|
|
|
|
|
services:
|
|
|
|
nginx:
|
|
image: mathwave/sprint-repo:battleship-nginx
|
|
networks:
|
|
- battleship-net
|
|
- battleship-nginx
|
|
deploy:
|
|
mode: replicated
|
|
restart_policy:
|
|
condition: any
|
|
update_config:
|
|
parallelism: 1
|
|
order: start-first
|
|
|
|
backend:
|
|
image: mathwave/sprint-repo:battleship-back
|
|
networks:
|
|
- battleship-net
|
|
environment:
|
|
DB_HOST: "pg.develop.sprinthub.ru"
|
|
DB_PASSWORD: $DB_PASSWORD_DEV
|
|
DEBUG: "true"
|
|
command: bash -c "./manage.py migrate && ./manage.py runserver 0.0.0.0:8000"
|
|
deploy:
|
|
mode: replicated
|
|
restart_policy:
|
|
condition: any
|
|
update_config:
|
|
parallelism: 1
|
|
order: start-first
|
|
|
|
remove:
|
|
image: mathwave/sprint-repo:battleship-back
|
|
networks:
|
|
- battleship-net
|
|
environment:
|
|
DB_HOST: "pg.develop.sprinthub.ru"
|
|
DB_PASSWORD: $DB_PASSWORD_DEV
|
|
DEBUG: "true"
|
|
command: ./manage.py remove
|
|
deploy:
|
|
mode: replicated
|
|
restart_policy:
|
|
condition: any
|
|
update_config:
|
|
parallelism: 1
|
|
order: start-first
|
|
|
|
networks:
|
|
battleship-net:
|
|
driver: overlay
|
|
battleship-nginx:
|
|
external: true
|