Deployments¶
Foreword¶
djangopackages.org uses Docker Compose for local development.
Stack¶
Our compose.yml configuration contains the following services for local development:
postgrespowers our database (using pgautoupgrade for automatic version upgrades in local development).djangopowers our Python and Django backend, serving the app through the development server.django-qpowers our task queues and background workers.tailwindwatches and compiles Tailwind CSS during development.utilityruns various commands including cron jobs to keep ourdjango*services from blocking when we run one-off commands.redisprovides caching.docs(profile: docs) runs our mkdocs server for documentation development.
Clear our Media Cache¶
Our static media files are behind a CDN. We occasionally need to purge cached files. To purge the cache:
docker compose run django cli4 --delete purge_everything=true /zones/:djangopackages.org/purge_cache
Alternatively, you can use just
Troubleshooting¶
- Check if Docker is running:
- Check if all services are running:
- View logs for all services:
or with just:
- Follow logs in real-time:
or with just:
- Check logs for individual services:
Where <service-name> can be: postgres, django, django-q, redis, tailwind, or docs.