mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-12 07:53:00 +00:00
chore: automate setup
This commit is contained in:
46
acceptance/docker-compose.yaml
Normal file
46
acceptance/docker-compose.yaml
Normal file
@@ -0,0 +1,46 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
zitadel:
|
||||
user: '$UID'
|
||||
image: '${ZITADEL_IMAGE:-ghcr.io/zitadel/zitadel:latest}'
|
||||
command: 'start-from-init --masterkey "MasterkeyNeedsToHave32Characters" --tlsMode disabled --config /zitadel.yaml --steps /zitadel.yaml'
|
||||
ports:
|
||||
- "8080:8080"
|
||||
volumes:
|
||||
- ./machinekey:/machinekey
|
||||
- ./zitadel.yaml:/zitadel.yaml
|
||||
depends_on:
|
||||
db:
|
||||
condition: 'service_healthy'
|
||||
|
||||
db:
|
||||
image: 'cockroachdb/cockroach:v22.2.2'
|
||||
command: 'start-single-node --insecure --http-addr :9090'
|
||||
healthcheck:
|
||||
test: ['CMD', 'curl', '-f', 'http://localhost:9090/health?ready=1']
|
||||
interval: '10s'
|
||||
timeout: '30s'
|
||||
retries: 5
|
||||
start_period: '20s'
|
||||
ports:
|
||||
- "26257:26257"
|
||||
- "9090:9090"
|
||||
|
||||
wait_for_zitadel:
|
||||
image: curlimages/curl:8.00.1
|
||||
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" ]
|
||||
depends_on:
|
||||
- zitadel
|
||||
|
||||
setup:
|
||||
container_name: setup
|
||||
build: .
|
||||
environment:
|
||||
KEY: /key/zitadel-admin-sa.json
|
||||
SERVICE: http://zitadel:8080
|
||||
volumes:
|
||||
- "./machinekey:/key"
|
||||
depends_on:
|
||||
wait_for_zitadel:
|
||||
condition: 'service_completed_successfully'
|
||||
Reference in New Issue
Block a user