Local development is done in Docker.
Get the development .env from team
cp .env.example .env.env hold sensitive values. Please ask on the ds-etna-dev/rae-ohos slack channel to get those values.
Get the database dump from team and copy to database_dumps/ folder
database_dumps/datafile.sql
docker compose up -dImport Wagtail data dump (provided by the platform team) into the local database
docker-compose exec -T db psql -U postgres < database_dumps/datafile.sqlCreate Django Admin user
docker compose exec app poetry run python manage.py createsuperuserNavigate to the admin URL in your browser, and sign in using the username/password combination created via docker-compose.yml
docker compose exec app poetry run python manage.py testdocker compose exec app formatCreate ticket branch off ds-ohos-wagtail:main
Merge PR into ds-ohos-wagtail:main
After merging to main, a release image is automatically built and published:
- Release images:
https://github.com/nationalarchives/ds-ohos-wagtail/tags
Once the image is available:
- Notify the team in the channel
rae-ohos - Confirm whether any database migrations need to be run
- The team will deploy the image to AWS
- After deployment, verify the changes on the hosted site
- Update version numbers in
pyproject.toml - If the app container is already running
- Run
docker compose exec app poetry update
- Run
- Alternatively, run
poetry updateon the docker host - Alternatively, start a temporary app container to run the update:
- Run
docker compose run --rm app poetry update - Run
docker compose up -d --build app
- Run
docker compose exec app poetry run python manage.py makemigrations
docker compose exec app poetry run python manage.py migrate