Build profile-gated services so workers do not run stale images #19

Merged
westfarn merged 3 commits from issue-17-monica-dj-queue-worker into master 2026-08-09 04:36:52 -07:00
+3
View File
@@ -65,6 +65,8 @@
group: "{{ admin_user }}" group: "{{ admin_user }}"
mode: "0600" mode: "0600"
# COMPOSE_PROFILES must match the start step below: without it, profile-gated
# services (e.g. the dj-queue worker) are skipped here and keep a stale image.
- name: "django[{{ _project }}] build images" - name: "django[{{ _project }}] build images"
ansible.builtin.command: ansible.builtin.command:
cmd: "docker compose -f {{ _spec.compose_file }} --env-file .env build" cmd: "docker compose -f {{ _spec.compose_file }} --env-file .env build"
@@ -72,6 +74,7 @@
environment: environment:
COMPOSE_PROJECT_NAME: "{{ _project }}" COMPOSE_PROJECT_NAME: "{{ _project }}"
WEB_PORT: "{{ app_item.port }}" WEB_PORT: "{{ app_item.port }}"
COMPOSE_PROFILES: "{{ (app_item.compose_profiles | default([])) | join(',') }}"
become: true become: true
become_user: "{{ admin_user }}" become_user: "{{ admin_user }}"
changed_when: true changed_when: true