version: "3" services: web: build: . ports: - "8000:8000" env_file: "web.env" restart: on-failure volumes: - mordor_db:/code/db - /var/www/mordor/static:/static command: > sh -c "python manage.py collectstatic --no-input python manage.py migrate && python manage.py runserver 0.0.0.0:8000" volumes: mordor_db: