Skip to content

feat(backend): opt-in beat split and migration skip in entry.sh - #1843

Merged
aatchison merged 3 commits into
mainfrom
aatchison/appt-entrypoint-roles
Sep 24, 2026
Merged

aatchison merged 3 commits into
mainfrom
aatchison/appt-entrypoint-roles

Conversation

@aatchison

@aatchison aatchison commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Legacy ECS behaviour is unchanged by default. The beat split and the migration skip are opt-in flags that appointment-deploy sets.

  • CONTAINER_ROLE: api (default), worker, beat, flower. Any other value exits 1.
  • CELERY_EMBED_BEAT=false: worker runs without --beat. Unset keeps main's argv.
  • SKIP_DB_MIGRATIONS=true: api skips update-db. A failed update-db now exits 1.
  • Every role execs its final process, so SIGTERM reaches uvicorn or celery on ECS too.
  • Unset CONTAINER_ROLE now means api instead of exit 1. No pulumi path leaves it unset.
  • docker-compose.yml: celery-worker sets CELERY_EMBED_BEAT=false; new celery-beat service.

Tested on the built image: legacy worker argv matches main, split worker and standalone beat start, RedBeat lock holds with two beats, SIGTERM gives a warm shutdown.

Part of https://github.com/thunderbird/platform-infrastructure/issues/989 (Appointment stage cutover)
Refs #1077 (migrations move to a one-shot Job in Kubernetes via SKIP_DB_MIGRATIONS; legacy ECS still runs them on entry)
Refs https://github.com/thunderbird/appointment-deploy/issues/19
Refs https://github.com/thunderbird/appointment-deploy/issues/20

@aatchison aatchison changed the title feat(backend): add beat container role and SKIP_DB_MIGRATIONS flag to entry.sh feat(backend): opt-in beat split and migration skip in entry.sh Sep 24, 2026
@aatchison
aatchison marked this pull request as ready for review September 24, 2026 15:58

@davinotdavid davinotdavid left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

QA Log

  • Code diff
  • Manually ran containers locally

@aatchison
aatchison merged commit 437d0a9 into main Sep 24, 2026
10 checks passed
@aatchison
aatchison deleted the aatchison/appt-entrypoint-roles branch September 24, 2026 16:29
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.

2 participants