Skip to content

[codex] Add docker-first automation platform and bootstrap flow#109

Merged
cdryampi merged 1 commit intomainfrom
codex/docker-automation-foundation
Mar 11, 2026
Merged

[codex] Add docker-first automation platform and bootstrap flow#109
cdryampi merged 1 commit intomainfrom
codex/docker-automation-foundation

Conversation

@cdryampi
Copy link
Copy Markdown
Owner

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_safety integrated 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 automations app with template registry, persisted jobs, run history, Celery orchestration, a periodic dispatcher and bootstrap commands. It also adds the beach_safety domain 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_safety is 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 --build
  • docker compose exec -T backend python manage.py migrate
  • docker compose exec -T backend python manage.py seed_all --noinput
  • docker compose exec -T backend python manage.py bootstrap_automations
  • docker compose exec -T backend python manage.py seed_media_files
  • docker 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.py
  • pnpm --filter backoffice type-check
  • pnpm --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.tsx
  • pnpm --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.tsx

Related issues

@cdryampi cdryampi merged commit c152e26 into main Mar 11, 2026
0 of 3 checks passed
@cdryampi cdryampi deleted the codex/docker-automation-foundation branch March 11, 2026 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Evaluar monitorización meteorológica periódica para propuesta de bandera roja en playas

1 participant