Overview
Set up a production-ready Docker configuration for AWS deployment using gunicorn as the WSGI server and Whitenoise for static file serving. This builds on the split requirements from the previous issue.
Action Items
Acceptance Criteria
Dockerfile-aws builds successfully and uses requirements-aws.txt
entrypoint-aws.sh exists and starts gunicorn
- Whitenoise is configured in Django settings
- Static files are collected during the Docker build
- The app starts and serves static files when the container runs
- Single-stage build (no multi-stage optimization yet)
References
Parent Issue: #219
Blocked by: #219 sub-issue "Split requirements into dev and AWS"
Overview
Set up a production-ready Docker configuration for AWS deployment using gunicorn as the WSGI server and Whitenoise for static file serving. This builds on the split requirements from the previous issue.
Action Items
gunicornandwhitenoisetoapp/requirements-aws.inapp/requirements-aws.txtapp/Dockerfile-awsto:requirements-aws.txtinstead ofrequirements.txtpython manage.py collectstatic --noinputduring the buildapp/entrypoint-aws.shto:gunicorn peopledepot.wsgi:application --bind 0.0.0.0:8000)app/peopledepot/settings.pyto configure Whitenoise:'whitenoise.middleware.WhiteNoiseMiddleware'toMIDDLEWARE(near the top, after SecurityMiddleware)STATIC_ROOTandSTATIC_URLappropriatelyWHITENOISE_AUTOREFRESHor other Whitenoise settingsAcceptance Criteria
Dockerfile-awsbuilds successfully and usesrequirements-aws.txtentrypoint-aws.shexists and starts gunicornReferences
Parent Issue: #219
Blocked by: #219 sub-issue "Split requirements into dev and AWS"