mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-12-05 09:18:53 +00:00
fix(web-app-taiga): keep manager container alive and always render conf.json
The taiga-manager entrypoint 'python manage.py' exited immediately (no subcommand), crash-looping so migration exec hit 'No such container'. Give it a durable entrypoint and invoke django via 'python manage.py <cmd>'. Also render the frontend conf.json unconditionally since compose mounts it always. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
dbe425dc0b
commit
100c93e7bc
3 files changed
+4
-5
No files matched your search
@@ -10,7 +10,7 @@
|
||||
ansible.builtin.shell: > # nocheck: container-exec-resolver runtime-resolved CID, delegated to the hosting node
|
||||
container exec -i
|
||||
{{ TAIGA_MANAGER_LOCAL_CID | quote }}
|
||||
migrate --noinput
|
||||
python manage.py migrate --noinput
|
||||
register: taiga_migrate
|
||||
changed_when: taiga_migrate.rc == 0
|
||||
delegate_to: "{{ TAIGA_MANAGER_HOST_NODE }}"
|
||||
@@ -20,7 +20,7 @@
|
||||
container exec -i
|
||||
-e DJANGO_SUPERUSER_PASSWORD={{ TAIGA_SUPERUSER_PASSWORD | quote }}
|
||||
{{ TAIGA_MANAGER_LOCAL_CID | quote }}
|
||||
createsuperuser --noinput
|
||||
python manage.py createsuperuser --noinput
|
||||
--username {{ TAIGA_SUPERUSER_NAME }}
|
||||
--email {{ TAIGA_SUPERUSER_EMAIL }}
|
||||
register: taiga_create_admin
|
||||
@@ -38,7 +38,7 @@
|
||||
container exec -i
|
||||
-e DJANGO_SUPERUSER_PASSWORD={{ TAIGA_SUPERUSER_PASSWORD | quote }}
|
||||
{{ TAIGA_MANAGER_LOCAL_CID | quote }}
|
||||
shell -c
|
||||
python manage.py shell -c
|
||||
"from django.contrib.auth import get_user_model; import os; U=get_user_model(); u,created=U.objects.get_or_create(username='{{ TAIGA_SUPERUSER_NAME }}'); changed=bool(created);
|
||||
old=(u.email,u.is_staff,u.is_superuser,u.is_active); u.email='{{ TAIGA_SUPERUSER_EMAIL }}'; u.is_staff=True; u.is_superuser=True; u.is_active=True; changed =
|
||||
changed or old!=(u.email,u.is_staff,u.is_superuser,u.is_active); pwd=os.environ.get('DJANGO_SUPERUSER_PASSWORD'); assert pwd, 'Missing DJANGO_SUPERUSER_PASSWORD';
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
stack_host_template:
|
||||
src: "settings/conf.json.j2"
|
||||
dest: "{{ TAIGA_FRONTEND_CONF_PATH }}"
|
||||
when: TAIGA_PLUGINS_ENABLED | bool
|
||||
notify: compose up
|
||||
|
||||
- name: "📁 create {{ TAIGA_COMPOSE_INIT_PATH }}"
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
CELERY_ENABLED: "False"
|
||||
{{ lookup('container_depends_on', application_id) | indent(4) }}
|
||||
{{ lookup('container_networks') | indent(4) }}
|
||||
entrypoint: "python manage.py"
|
||||
entrypoint: ["sleep", "infinity"]
|
||||
{{ lookup('container_volumes', application_id, service_name) | indent(4) }}
|
||||
{{ lookup('compose_networks') }}
|
||||
taiga:
|
||||
Reference in new issue
Block a user