version: '3' services: web: build: . ports: - "8000:8000" env_file: 'web.env' restart: on-failure depends_on: - database command: > sh -c "./scripts/wait_for_service database 3306 && python manage.py migrate && python manage.py runserver 0.0.0.0:8000" celery-worker: build: . env_file: 'web.env' restart: on-failure depends_on: - web - redis command: > sh -c "./scripts/wait_for_service web 8000 && celery -A KeRS worker -l info" celery-beat: build: . env_file: 'web.env' restart: on-failure depends_on: - web - redis command: > sh -c "./scripts/wait_for_service web 8000 && celery -A KeRS beat -l info --scheduler django_celery_beat.schedulers:DatabaseScheduler" redis: image: redis:latest # Db stuff database: image: mariadb:10.5.4-focal restart: on-failure environment: MYSQL_ROOT_PASSWORD: example MYSQL_DATABASE: kers MYSQL_USER: kers MYSQL_PASSWORD: kers volumes: - kersdb:/var/lib/mysql volumes: kersdb: