Build profile-gated services so workers do not run stale images #19
@@ -65,6 +65,8 @@
|
||||
group: "{{ admin_user }}"
|
||||
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"
|
||||
ansible.builtin.command:
|
||||
cmd: "docker compose -f {{ _spec.compose_file }} --env-file .env build"
|
||||
@@ -72,6 +74,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
|
||||
|
||||
Reference in New Issue
Block a user