Files
computer-playbook/roles/web-app-akaunting/tasks/setup/compose.yml
kevinveenbirkenbachandClaude Opus 4.8 0864a2e813 fix(akaunting): run the one-shot install through the image entrypoint
The setup passed --no-start as the container command, which the ca-trust wrapper exec'd as a binary (exit 127); the flag does not exist in the image's entrypoint at all. Invoking /usr/local/bin/akaunting.sh with no arguments is the real one-shot contract: with AKAUNTING_SETUP=true it runs artisan install and exits without starting Apache. The swarm wait gate also accepted Shutdown as success and let the crashed job pass without ever installing; the state probe now lives in install_job_state.sh and only Complete passes, while terminal states fail loudly with the task error.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-18 01:11:48 +02:00

29 lines
964 B
YAML

---
# include-gated: when: DEPLOYMENT_MODE == "compose"
- name: "⏹️ Akaunting setup | Stop running akaunting (compose)"
ansible.builtin.shell: |
set -euo pipefail
compose stop akaunting
args:
chdir: "{{ lookup('container', application_id, 'directories.instance') }}"
executable: /bin/bash
changed_when: true
- name: "▶️ Akaunting setup | One-shot install"
ansible.builtin.shell: |
set -euo pipefail
compose run --rm --no-deps -e AKAUNTING_SETUP=true akaunting {{ AKAUNTING_ENTRYPOINT }}
args:
chdir: "{{ lookup('container', application_id, 'directories.instance') }}"
executable: /bin/bash
changed_when: true
- name: "🔄 Akaunting setup | Start akaunting after install (compose)"
ansible.builtin.shell: |
set -euo pipefail
compose up -d --force-recreate akaunting
args:
chdir: "{{ lookup('container', application_id, 'directories.instance') }}"
executable: /bin/bash
changed_when: true