Files
zitadel/acceptance/docker-compose.yaml

55 lines
1.4 KiB
YAML
Raw Normal View History

2023-06-15 13:58:32 +02:00
version: "3.8"
2023-05-19 16:20:01 +02:00
services:
zitadel:
2023-06-15 13:58:32 +02:00
user: "${ZITADEL_DEV_UID}"
image: "${ZITADEL_IMAGE:-ghcr.io/zitadel/zitadel:latest}"
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:
- ./machinekey:/machinekey
- ./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:
2023-06-15 13:58:32 +02:00
image: "cockroachdb/cockroach:v22.2.2"
command: "start-single-node --insecure --http-addr :9090"
2023-05-19 16:20:01 +02:00
healthcheck:
2023-06-15 13:58:32 +02:00
test: ["CMD", "curl", "-f", "http://localhost:9090/health?ready=1"]
interval: "10s"
timeout: "30s"
2023-05-19 16:20:01 +02:00
retries: 5
2023-06-15 13:58:32 +02:00
start_period: "20s"
2023-05-19 16:20:01 +02:00
ports:
- "26257:26257"
- "9090:9090"
wait_for_zitadel:
image: curlimages/curl:8.00.1
2023-06-15 13:58:32 +02:00
command:
[
"/bin/sh",
"-c",
"i=0; while ! curl http://zitadel:8080/debug/ready && [ $$i -lt 30 ]; do sleep 1; i=$$((i+1)); done; [ $$i -eq 30 ] && exit 1 || exit 0",
]
2023-05-19 16:20:01 +02:00
depends_on:
- zitadel
setup:
2023-06-15 13:58:32 +02:00
user: "${ZITADEL_DEV_UID}"
2023-05-19 16:20:01 +02:00
container_name: setup
build: .
environment:
KEY: /key/zitadel-admin-sa.json
SERVICE: http://zitadel:8080
2023-05-19 19:34:07 +02:00
WRITE_ENVIRONMENT_FILE: /apps/login/.env.local
2023-05-19 16:20:01 +02:00
volumes:
2023-06-15 13:58:32 +02:00
- "./machinekey:/key"
- "../apps/login:/apps/login"
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"