version: "3" services: web: build: . ports: - "8000:8000" env_file: "web.env" restart: on-failure depends_on: - database volumes: - /var/www/msrs/static:/static command: > sh -c "./scripts/wait_for_service database 3306 && python manage.py collectstatic --no-input python manage.py migrate && python manage.py runserver 0.0.0.0:8000" # Db stuff database: image: mariadb:10.5.4-focal restart: on-failure environment: MYSQL_ROOT_PASSWORD: example MYSQL_DATABASE: msrs MYSQL_USER: msrs MYSQL_PASSWORD: msrs volumes: - msrsdb:/var/lib/mysql volumes: msrsdb: