Files
zitadel/.devcontainer/base/docker-compose.yaml

35 lines
717 B
YAML
Raw Permalink Normal View History

services:
2025-07-20 20:44:33 +02:00
devcontainer:
2025-07-22 14:13:44 +02:00
container_name: devcontainer
2025-07-21 17:13:29 +00:00
build:
2025-08-05 18:25:29 +02:00
context: .
volumes:
2025-07-22 14:13:44 +02:00
- ../../:/workspaces:cached
command: sleep infinity
2025-07-21 17:13:29 +00:00
working_dir: /workspaces
environment:
docs: fix and harmonize docker compose files (#8839) # Which Problems Are Solved 1. Postgres spams FATAL: role "root" does not exist as mentioned in https://github.com/zitadel/zitadel/discussions/7832 (even with -U) 2. The compose commands for a ZITADEL deployment with initial service account key don't work out-of-the box with a non-root user, because docker creates non-existing directories to bind-mount with root ownership. ![image](https://github.com/user-attachments/assets/f2fc92d5-2ff4-47a4-bf4d-e9657aa2bb94) ``` time="2024-10-29T09:37:13Z" level=error msg="migration failed" caller="/home/runner/work/zitadel/zitadel/internal/migration/migration.go:68" error="open /machinekey/zitadel-admin-sa.json: permission denied" name=03_default_instance time="2024-10-29T09:37:13Z" level=fatal msg="migration failed" caller="/home/runner/work/zitadel/zitadel/cmd/setup/setup.go:248" error="open /machinekey/zitadel-admin-sa.json: permission denied" name=03_default_instance ``` # How the Problems Are Solved 1. The branch bases on https://github.com/zitadel/zitadel/pull/8826. The env vars are cleaned up and prettified across compose files. 2. A command is added to the docs that creates the directory with the current users permission. The ZITADEL container runs with the current users ID. # Additional Context - Replaces https://github.com/zitadel/zitadel/pull/8826 - Discussion https://github.com/zitadel/zitadel/discussions/7832 - Closes https://github.com/zitadel/zitadel/issues/7725 --------- Co-authored-by: m4tu4g <71326926+m4tu4g@users.noreply.github.com>
2024-10-29 20:02:04 +01:00
ZITADEL_DATABASE_POSTGRES_HOST: db
ZITADEL_EXTERNALSECURE: false
2025-08-02 05:35:33 +02:00
db:
2025-07-21 00:34:54 +02:00
container_name: db
2025-07-20 23:37:05 +02:00
image: postgres:17.0-alpine3.19
restart: unless-stopped
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
docs: fix and harmonize docker compose files (#8839) # Which Problems Are Solved 1. Postgres spams FATAL: role "root" does not exist as mentioned in https://github.com/zitadel/zitadel/discussions/7832 (even with -U) 2. The compose commands for a ZITADEL deployment with initial service account key don't work out-of-the box with a non-root user, because docker creates non-existing directories to bind-mount with root ownership. ![image](https://github.com/user-attachments/assets/f2fc92d5-2ff4-47a4-bf4d-e9657aa2bb94) ``` time="2024-10-29T09:37:13Z" level=error msg="migration failed" caller="/home/runner/work/zitadel/zitadel/internal/migration/migration.go:68" error="open /machinekey/zitadel-admin-sa.json: permission denied" name=03_default_instance time="2024-10-29T09:37:13Z" level=fatal msg="migration failed" caller="/home/runner/work/zitadel/zitadel/cmd/setup/setup.go:248" error="open /machinekey/zitadel-admin-sa.json: permission denied" name=03_default_instance ``` # How the Problems Are Solved 1. The branch bases on https://github.com/zitadel/zitadel/pull/8826. The env vars are cleaned up and prettified across compose files. 2. A command is added to the docs that creates the directory with the current users permission. The ZITADEL container runs with the current users ID. # Additional Context - Replaces https://github.com/zitadel/zitadel/pull/8826 - Discussion https://github.com/zitadel/zitadel/discussions/7832 - Closes https://github.com/zitadel/zitadel/issues/7725 --------- Co-authored-by: m4tu4g <71326926+m4tu4g@users.noreply.github.com>
2024-10-29 20:02:04 +01:00
PGUSER: postgres
POSTGRES_PASSWORD: postgres
2025-07-20 23:37:05 +02:00
healthcheck:
2025-07-23 19:09:52 +02:00
test: [ "CMD-SHELL", "pg_isready" ]
2025-07-20 23:37:05 +02:00
interval: "10s"
timeout: "30s"
retries: 5
start_period: "20s"
ports:
- "5432:5432"
volumes:
postgres-data: