Auto-start monica_site dj-queue worker on adama deploy.
Sync runner checkout / sync (pull_request) Successful in 6s

Campaign sends stay Queued without the worker; wire compose_profiles into
django deploy so adama brings up the singleton with web (closes #17).
This commit is contained in:
2026-08-08 13:59:27 -05:00
parent cc503988c0
commit 9a0cbf80d9
6 changed files with 20 additions and 15 deletions
+4
View File
@@ -100,6 +100,9 @@
- _legacy_systemd | default('') | length > 0
- _legacy_systemd_probe.stdout | default('') | length > 0
# Optional host_apps.compose_profiles (e.g. [worker]) activates compose profiles
# on this host only. Used for monica_site dj-queue singleton on adama — without
# it, plain up --remove-orphans can drop a manually started worker.
- name: "django[{{ _project }}] start containers"
ansible.builtin.command:
cmd: "docker compose -f {{ _spec.compose_file }} --env-file .env up -d --remove-orphans"
@@ -107,6 +110,7 @@
environment:
COMPOSE_PROJECT_NAME: "{{ _project }}"
WEB_PORT: "{{ app_item.port }}"
COMPOSE_PROFILES: "{{ (app_item.compose_profiles | default([])) | join(',') }}"
become: true
become_user: "{{ admin_user }}"
changed_when: true