This repository has been archived by the owner on Feb 22, 2023. It is now read-only.
Add Django database migration to Dockerfile entrypoint #1048
Labels
💻 aspect: code
Concerns the software code in the repository
🧰 goal: internal improvement
Improvement that benefits maintainers, not users
🟨 priority: medium
Not blocking but should be addressed soon
🐳 tech: docker
Requires familiarity with Docker
Description
As part of the ECS-ification of the Django service, we are moving towards an automated database migration handling approach. Under this new approach, migrations will be automatically applied when a new version of the Django application is deployed. The easiest way to accomplish this would be to add it as an additional step in the Dockerfile entrypoint.
We may want to explore also adding an environment variable which could be used as a flag to determine if the migrations should be run. This would default to true for production, but could be turned off in order to speed up local development (and prevent issuing a migration before it's fully baked during local testing).
Alternatives
Additional context
See the motivation for this change and the rest of the discussion here: #1030
The text was updated successfully, but these errors were encountered: