2020-07-23 14:07:31 +02:00
|
|
|
version: '3'
|
|
|
|
services:
|
|
|
|
web:
|
|
|
|
build: .
|
|
|
|
ports:
|
|
|
|
- "8000:8000"
|
2020-07-25 13:32:38 +02:00
|
|
|
env_file: 'web.env'
|
|
|
|
restart: on-failure
|
2020-07-23 14:07:31 +02:00
|
|
|
depends_on:
|
2020-07-24 23:27:48 +02:00
|
|
|
- database
|
2020-07-23 14:07:31 +02:00
|
|
|
command: >
|
2020-07-24 23:27:48 +02:00
|
|
|
sh -c "./scripts/wait_for_service database 3306 &&
|
2020-07-23 14:07:31 +02:00
|
|
|
python manage.py migrate &&
|
|
|
|
python manage.py runserver 0.0.0.0:8000"
|
2020-07-24 23:27:48 +02:00
|
|
|
|
2020-07-23 14:07:31 +02:00
|
|
|
celery-worker:
|
|
|
|
build: .
|
2020-07-25 13:32:38 +02:00
|
|
|
env_file: 'web.env'
|
|
|
|
restart: on-failure
|
2020-07-23 14:07:31 +02:00
|
|
|
depends_on:
|
|
|
|
- web
|
|
|
|
- redis
|
|
|
|
command: >
|
2020-07-24 23:27:48 +02:00
|
|
|
sh -c "./scripts/wait_for_service web 8000 &&
|
|
|
|
celery -A KeRS worker -l info"
|
|
|
|
|
2020-07-23 14:07:31 +02:00
|
|
|
celery-beat:
|
|
|
|
build: .
|
2020-07-25 13:32:38 +02:00
|
|
|
env_file: 'web.env'
|
|
|
|
restart: on-failure
|
2020-07-23 14:07:31 +02:00
|
|
|
depends_on:
|
|
|
|
- web
|
|
|
|
- redis
|
|
|
|
command: >
|
2020-07-24 23:27:48 +02:00
|
|
|
sh -c "./scripts/wait_for_service web 8000 &&
|
|
|
|
celery -A KeRS beat -l info --scheduler django_celery_beat.schedulers:DatabaseScheduler"
|
|
|
|
|
2020-07-23 14:07:31 +02:00
|
|
|
redis:
|
2020-07-24 23:27:48 +02:00
|
|
|
image: redis:latest
|
|
|
|
|
2020-07-23 14:07:31 +02:00
|
|
|
# Db stuff
|
2020-07-24 23:27:48 +02:00
|
|
|
database:
|
|
|
|
image: mariadb:10.5.4-focal
|
2020-07-25 13:32:38 +02:00
|
|
|
restart: on-failure
|
2020-07-23 14:07:31 +02:00
|
|
|
environment:
|
|
|
|
MYSQL_ROOT_PASSWORD: example
|
|
|
|
MYSQL_DATABASE: kers
|
|
|
|
MYSQL_USER: kers
|
|
|
|
MYSQL_PASSWORD: kers
|
2020-07-25 14:10:27 +02:00
|
|
|
volumes:
|
|
|
|
- kersdb:/var/lib/mysql
|
|
|
|
volumes:
|
|
|
|
kersdb:
|