Post-Tyranny-Tech-Infrastru.../ansible/roles/zitadel/tasks/docker.yml
Pieter 48ef4da920 Fix Zitadel deployment by removing FirstInstance variables
- Remove all ZITADEL_FIRSTINSTANCE_* environment variables
- Fixes migration error: duplicate key constraint violation
- Root cause: Bug in Zitadel v2.63.7 FirstInstance migration
- Workaround: Complete initial setup via web UI
- Upstream issue: https://github.com/zitadel/zitadel/issues/8791

Changes:
- Clean up obsolete documentation (OIDC_AUTOMATION.md, SETUP_GUIDE.md, COLLABORA_SETUP.md)
- Add PROJECT_REFERENCE.md for essential configuration info
- Add force recreate functionality with clean database volumes
- Update bootstrap instructions for web UI setup
- Document one-time manual setup requirement for OIDC automation

Zitadel now deploys successfully and is accessible at:
https://zitadel.test.vrije.cloud

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-06 16:43:57 +01:00

53 lines
1.3 KiB
YAML

---
# Docker Compose setup for Zitadel
- name: Include clean tasks when force recreate is requested
include_tasks: clean.yml
when: zitadel_force_recreate | default(false) | bool
- name: Create Zitadel configuration directory
file:
path: "{{ zitadel_config_dir }}"
state: directory
mode: '0755'
- name: Create Zitadel internal network
community.docker.docker_network:
name: "{{ zitadel_network }}"
driver: bridge
internal: true
- name: Deploy Zitadel Docker Compose configuration
template:
src: docker-compose.zitadel.yml.j2
dest: "{{ zitadel_config_dir }}/docker-compose.yml"
mode: '0600'
notify: Restart Zitadel
- name: Start Zitadel services
community.docker.docker_compose_v2:
project_src: "{{ zitadel_config_dir }}"
state: present
register: zitadel_deploy
- name: Wait for Zitadel database to be ready
community.docker.docker_container_exec:
container: zitadel-db
command: pg_isready -U {{ zitadel_db_user }} -d {{ zitadel_db_name }}
register: db_ready
until: db_ready.rc == 0
retries: 30
delay: 2
changed_when: false
- name: Wait for Zitadel to be healthy
uri:
url: "https://{{ zitadel_domain }}/debug/ready"
method: GET
status_code: 200
validate_certs: yes
register: zitadel_health
until: zitadel_health.status == 200
retries: 30
delay: 10
changed_when: false