[codex] Add docker-first automation platform and bootstrap flow#109
Merged
[codex] Add docker-first automation platform and bootstrap flow#109
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR moves the local development flow to a Docker-first setup and adds the first reusable automation platform for the project, with
beach_safetyintegrated as one automation template rather than a standalone backoffice module.From a product point of view, this closes the first end-to-end automation slice for issue #106: the backend can schedule and execute whitelisted automation jobs, the backoffice can manage and understand them through a guided visual builder, and the local stack now includes the services needed to run the real workflow (
backend, PostgreSQL, Redis, Celery worker and Celery beat).What changed
On the backend, this introduces a new
automationsapp with template registry, persisted jobs, run history, Celery orchestration, a periodic dispatcher and bootstrap commands. It also adds thebeach_safetydomain app for recommendation proposals with human review, plus the API surface needed by the backoffice.On the frontend side, the backoffice now has a visual automation experience with dashboard, guided canvas editor, contextual sidebar and execution history.
beach_safetyis now exposed as part of the automation system instead of a top-level product area.On the infrastructure side, the repository now assumes a Docker-first local workflow. The compose stack includes Redis, worker and beat, the backend container collects static files on startup, the admin static assets are served correctly in Docker, and the project documentation now makes the bootstrap path explicit.
Why this was needed
The previous setup mixed multiple local execution paths and made it easy to end up with different databases, missing workers or an empty app after recreating volumes. That caused repeated confusion when frontend or backoffice looked broken but the real problem was an unbootstrapped Docker database or a legacy local backend path.
This PR makes the local contract much clearer: bring up Docker, migrate, seed data, bootstrap automations, and then validate UI. That same change also fixes several environment problems discovered along the way, including broken admin static assets in Docker and user seeding inconsistencies for the default admin account.
Validation
Validated during implementation with:
docker compose up -d --builddocker compose exec -T backend python manage.py migratedocker compose exec -T backend python manage.py seed_all --noinputdocker compose exec -T backend python manage.py bootstrap_automationsdocker compose exec -T backend python manage.py seed_media_filesdocker compose exec -T backend python manage.py check..\\.venv\\Scripts\\pytest.exe automations\\tests beach_safety\\tests gaudeix_backend\\tests\\test_seed_all.py..\\.venv\\Scripts\\pytest.exe users\\tests\\test_seed_users.py gaudeix_backend\\tests\\test_public_endpoints.pypnpm --filter backoffice type-checkpnpm --filter backoffice exec vitest run src/features/automations/tests/AutomationsPage.test.tsx src/features/automations/tests/AutomationComponents.test.tsx src/features/beach-safety/tests/BeachSafetyPage.test.tsxpnpm --filter frontend exec vitest run src/features/beaches/api.test.ts src/features/beaches/pages/BeachDetailPage.test.tsx src/features/categories/templates/layouts/BeachesCategoryLayout.test.tsxRelated issues