version: '3.8' services: web: build: . ports: - "8080:8000" volumes: - .:/app - ./logs:/app/logs # persists log files on the host environment: - DEBUG=1 restart: always # Forward Gunicorn access + error logs to /app/logs command: > gunicorn config.wsgi:application --bind 0.0.0.0:8000 --workers 2 --access-logfile /app/logs/gunicorn-access.log --error-logfile /app/logs/gunicorn-error.log --log-level info --capture-output