Files
zitadel/acceptance/docker-compose.yaml

70 lines
2.2 KiB
YAML
Raw Normal View History

2023-05-19 16:20:01 +02:00
services:
zitadel:
2024-10-16 19:15:19 +02:00
user: "${ZITADEL_DEV_UID}"
2024-11-27 14:36:18 +01:00
image: "${ZITADEL_IMAGE:-ghcr.io/zitadel/zitadel:v2.65.0}"
2023-05-19 16:20:01 +02:00
command: 'start-from-init --masterkey "MasterkeyNeedsToHave32Characters" --tlsMode disabled --config /zitadel.yaml --steps /zitadel.yaml'
ports:
2023-06-15 13:58:32 +02:00
- "8080:8080"
2023-05-19 16:20:01 +02:00
volumes:
2024-10-16 20:55:37 +02:00
- ./pat:/pat
2023-05-19 16:20:01 +02:00
- ./zitadel.yaml:/zitadel.yaml
depends_on:
db:
2023-06-15 13:58:32 +02:00
condition: "service_healthy"
2023-05-19 16:20:01 +02:00
db:
2024-11-14 10:25:36 +01:00
restart: "always"
2024-11-15 16:00:35 +01:00
image: postgres:17.0-alpine3.19
2024-10-16 09:53:30 +02:00
environment:
- POSTGRES_USER=zitadel
- PGUSER=zitadel
- POSTGRES_DB=zitadel
- POSTGRES_HOST_AUTH_METHOD=trust
command: postgres -c shared_preload_libraries=pg_stat_statements -c pg_stat_statements.track=all -c shared_buffers=1GB -c work_mem=16MB -c effective_io_concurrency=100 -c wal_level=minimal -c archive_mode=off -c max_wal_senders=0
2023-05-19 16:20:01 +02:00
healthcheck:
2024-11-20 14:22:22 +01:00
test: [ "CMD-SHELL", "pg_isready" ]
2024-11-14 10:25:36 +01:00
interval: "10s"
timeout: "30s"
2023-05-19 16:20:01 +02:00
retries: 5
2024-11-14 10:25:36 +01:00
start_period: "20s"
2023-05-19 16:20:01 +02:00
ports:
2024-10-16 09:53:30 +02:00
- 5432:5432
2023-05-19 16:20:01 +02:00
wait_for_zitadel:
image: curlimages/curl:8.00.1
command: /bin/sh -c "until curl -s -o /dev/null -i -f http://zitadel:8080/debug/ready; do echo 'waiting' && sleep 1; done; echo 'ready' && sleep 5;" || false
2023-05-19 16:20:01 +02:00
depends_on:
- zitadel
setup:
2024-10-16 19:15:19 +02:00
user: "${ZITADEL_DEV_UID}"
2023-05-19 16:20:01 +02:00
container_name: setup
build: .
environment:
2024-10-16 20:55:37 +02:00
PAT_FILE: /pat/zitadel-admin-sa.pat
ZITADEL_API_INTERNAL_URL: http://zitadel:8080
2024-10-16 12:34:53 +02:00
WRITE_ENVIRONMENT_FILE: /apps/login/.env.local
2024-11-15 15:58:48 +01:00
WRITE_TEST_ENVIRONMENT_FILE: /acceptance/tests/.env.local
2024-11-20 16:03:20 +01:00
SINK_EMAIL_INTERNAL_URL: http://sink:3333/email
SINK_SMS_INTERNAL_URL: http://sink:3333/sms
SINK_NOTIFICATION_URL: http://localhost:3333/notification
2023-05-19 16:20:01 +02:00
volumes:
2024-10-16 20:55:37 +02:00
- "./pat:/pat"
2023-06-15 13:58:32 +02:00
- "../apps/login:/apps/login"
2024-11-15 16:05:28 +01:00
- "../acceptance/tests:/acceptance/tests"
2023-05-19 16:20:01 +02:00
depends_on:
wait_for_zitadel:
2023-06-15 13:58:32 +02:00
condition: "service_completed_successfully"
2024-11-20 14:22:22 +01:00
sink:
image: golang:1.19-alpine
container_name: sink
2024-11-20 16:03:20 +01:00
command: go run /sink/main.go -port '3333' -email '/email' -sms '/sms' -notification '/notification'
2024-11-20 14:22:22 +01:00
ports:
- 3333:3333
volumes:
- "./sink:/sink"
depends_on:
setup:
condition: "service_completed_successfully"