mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-10 16:15:12 +00:00
# Which Problems Are Solved We move the login code to the zitadel repo. # How the Problems Are Solved The login repo is added to ./login as a git subtree pulled from the dockerize-ci branch. Apart from the login code, this PR contains the changes from #10116 # Additional Context - Closes https://github.com/zitadel/typescript/issues/474 - Also merges #10116 - Merging is blocked by failing check because of: - https://github.com/zitadel/zitadel/pull/10134#issuecomment-3012086106 --------- Co-authored-by: Max Peintner <[email protected]> Co-authored-by: Max Peintner <[email protected]> Co-authored-by: Florian Forster <[email protected]>
238 lines
7.7 KiB
YAML
238 lines
7.7 KiB
YAML
services:
|
|
|
|
zitadel:
|
|
user: "${UID:-1000}:${GID:-1000}"
|
|
image: "${ZITADEL_TAG:-ghcr.io/zitadel/zitadel:latest}"
|
|
container_name: acceptance-zitadel
|
|
command: 'start-from-init --masterkey "MasterkeyNeedsToHave32Characters" --config /zitadel.yaml --steps /zitadel.yaml'
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.zitadel.rule=!PathPrefix(`/ui/v2/login`)"
|
|
# - "traefik.http.middlewares.zitadel.headers.customrequestheaders.Host=localhost"
|
|
# - "traefik.http.routers.zitadel.middlewares=zitadel@docker"
|
|
- "traefik.http.services.zitadel-service.loadbalancer.server.scheme=h2c"
|
|
ports:
|
|
- "8080:8080"
|
|
volumes:
|
|
- ./pat:/pat
|
|
- ./zitadel.yaml:/zitadel.yaml
|
|
depends_on:
|
|
db:
|
|
condition: "service_healthy"
|
|
|
|
db:
|
|
restart: "always"
|
|
image: ${LOGIN_TEST_ACCEPTANCE_POSTGES_TAG:-postgres:17.0-alpine3.19}
|
|
container_name: acceptance-db
|
|
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
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready"]
|
|
interval: "10s"
|
|
timeout: "30s"
|
|
retries: 5
|
|
start_period: "20s"
|
|
ports:
|
|
- "5432:5432"
|
|
|
|
wait-for-zitadel:
|
|
image: curlimages/curl:8.00.1
|
|
container_name: acceptance-wait-for-zitadel
|
|
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
|
|
depends_on:
|
|
- zitadel
|
|
|
|
traefik:
|
|
image: "traefik:v3.4"
|
|
container_name: "acceptance-traefik"
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.login.rule=PathPrefix(`/ui/v2/login`)"
|
|
- "traefik.http.services.login-service.loadbalancer.server.url=http://host.docker.internal:3000"
|
|
command:
|
|
# - "--log.level=DEBUG"
|
|
- "--ping"
|
|
- "--api.insecure=true"
|
|
- "--providers.docker=true"
|
|
- "--providers.docker.exposedbydefault=false"
|
|
- "--entrypoints.websecure.http.tls=true"
|
|
- "--entryPoints.websecure.address=:443"
|
|
healthcheck:
|
|
test: ["CMD", "traefik", "healthcheck", "--ping"]
|
|
interval: "10s"
|
|
timeout: "30s"
|
|
retries: 5
|
|
start_period: "20s"
|
|
ports:
|
|
- "443:443"
|
|
- "8090:8080"
|
|
volumes:
|
|
- "/var/run/docker.sock:/var/run/docker.sock:ro"
|
|
extra_hosts:
|
|
- host.docker.internal:host-gateway
|
|
|
|
setup:
|
|
user: "${UID:-1000}:${GID:-1000}"
|
|
image: ${LOGIN_TEST_ACCEPTANCE_SETUP_TAG:-login-test-acceptance-setup:local}
|
|
container_name: acceptance-setup
|
|
restart: no
|
|
build:
|
|
context: "${LOGIN_TEST_ACCEPTANCE_BUILD_CONTEXT:-.}/setup"
|
|
dockerfile: ../go-command.Dockerfile
|
|
entrypoint: "./setup.sh"
|
|
environment:
|
|
PAT_FILE: /pat/zitadel-admin-sa.pat
|
|
ZITADEL_API_INTERNAL_URL: http://zitadel:8080
|
|
WRITE_ENVIRONMENT_FILE: /login-env/.env.test.local
|
|
SINK_EMAIL_INTERNAL_URL: http://sink:3333/email
|
|
SINK_SMS_INTERNAL_URL: http://sink:3333/sms
|
|
SINK_NOTIFICATION_URL: http://localhost:3333/notification
|
|
LOGIN_BASE_URL: https://127.0.0.1.sslip.io/ui/v2/login/
|
|
ZITADEL_API_URL: https://127.0.0.1.sslip.io
|
|
ZITADEL_API_DOMAIN: 127.0.0.1.sslip.io
|
|
ZITADEL_ADMIN_USER: [email protected]
|
|
volumes:
|
|
- ./pat:/pat # Read the PAT file from zitadels setup
|
|
- ../login:/login-env # Write the environment variables file for the login
|
|
depends_on:
|
|
traefik:
|
|
condition: "service_healthy"
|
|
wait-for-zitadel:
|
|
condition: "service_completed_successfully"
|
|
|
|
sink:
|
|
image: ${LOGIN_TEST_ACCEPTANCE_SINK_TAG:-login-test-acceptance-sink:local}
|
|
container_name: acceptance-sink
|
|
build:
|
|
context: "${LOGIN_TEST_ACCEPTANCE_BUILD_CONTEXT:-.}/sink"
|
|
dockerfile: ../go-command.Dockerfile
|
|
args:
|
|
- LOGIN_TEST_ACCEPTANCE_GOLANG_TAG=${LOGIN_TEST_ACCEPTANCE_GOLANG_TAG:-golang:1.24-alpine}
|
|
environment:
|
|
PORT: '3333'
|
|
command:
|
|
- -port
|
|
- '3333'
|
|
- -email
|
|
- '/email'
|
|
- -sms
|
|
- '/sms'
|
|
- -notification
|
|
- '/notification'
|
|
ports:
|
|
- "3333:3333"
|
|
depends_on:
|
|
setup:
|
|
condition: "service_completed_successfully"
|
|
|
|
oidcrp:
|
|
user: "${UID:-1000}:${GID:-1000}"
|
|
image: ${LOGIN_TEST_ACCEPTANCE_OIDCRP_TAG:-login-test-acceptance-oidcrp:local}
|
|
container_name: acceptance-oidcrp
|
|
build:
|
|
context: "${LOGIN_TEST_ACCEPTANCE_BUILD_CONTEXT:-.}/oidcrp"
|
|
dockerfile: ../go-command.Dockerfile
|
|
args:
|
|
- LOGIN_TEST_ACCEPTANCE_GOLANG_TAG=${LOGIN_TEST_ACCEPTANCE_GOLANG_TAG:-golang:1.24-alpine}
|
|
environment:
|
|
API_URL: 'http://traefik'
|
|
API_DOMAIN: 'traefik'
|
|
PAT_FILE: '/pat/zitadel-admin-sa.pat'
|
|
LOGIN_URL: 'https://traefik/ui/v2/login'
|
|
ISSUER: 'https://traefik'
|
|
HOST: 'traefik'
|
|
PORT: '8000'
|
|
SCOPES: 'openid profile email'
|
|
ports:
|
|
- "8000:8000"
|
|
volumes:
|
|
- "./pat:/pat"
|
|
depends_on:
|
|
traefik:
|
|
condition: "service_healthy"
|
|
setup:
|
|
condition: "service_completed_successfully"
|
|
|
|
oidcop:
|
|
user: "${UID:-1000}:${GID:-1000}"
|
|
image: ${LOGIN_TEST_ACCEPTANCE_OIDCOP_TAG:-login-test-acceptance-oidcop:local}
|
|
container_name: acceptance-oidcop
|
|
build:
|
|
context: "${LOGIN_TEST_ACCEPTANCE_BUILD_CONTEXT:-.}/idp/oidc"
|
|
dockerfile: ../../go-command.Dockerfile
|
|
args:
|
|
- LOGIN_TEST_ACCEPTANCE_GOLANG_TAG=${LOGIN_TEST_ACCEPTANCE_GOLANG_TAG:-golang:1.24-alpine}
|
|
environment:
|
|
API_URL: 'http://traefik'
|
|
API_DOMAIN: 'traefik'
|
|
PAT_FILE: '/pat/zitadel-admin-sa.pat'
|
|
SCHEMA: 'https'
|
|
HOST: 'traefik'
|
|
PORT: "8004"
|
|
ports:
|
|
- 8004:8004
|
|
volumes:
|
|
- "./pat:/pat"
|
|
depends_on:
|
|
traefik:
|
|
condition: "service_healthy"
|
|
setup:
|
|
condition: "service_completed_successfully"
|
|
|
|
samlsp:
|
|
user: "${UID:-1000}:${GID:-1000}"
|
|
image: "${LOGIN_TEST_ACCEPTANCE_SAMLSP_TAG:-login-test-acceptance-samlsp:local}"
|
|
container_name: acceptance-samlsp
|
|
build:
|
|
context: "${LOGIN_TEST_ACCEPTANCE_BUILD_CONTEXT:-.}/samlsp"
|
|
dockerfile: ../go-command.Dockerfile
|
|
args:
|
|
- LOGIN_TEST_ACCEPTANCE_GOLANG_TAG=${LOGIN_TEST_ACCEPTANCE_GOLANG_TAG:-golang:1.24-alpine}
|
|
environment:
|
|
API_URL: 'http://traefik'
|
|
API_DOMAIN: 'traefik'
|
|
PAT_FILE: '/pat/zitadel-admin-sa.pat'
|
|
LOGIN_URL: 'https://traefik/ui/v2/login'
|
|
IDP_URL: 'http://zitadel:8080/saml/v2/metadata'
|
|
HOST: 'https://traefik'
|
|
PORT: '8001'
|
|
ports:
|
|
- 8001:8001
|
|
volumes:
|
|
- "./pat:/pat"
|
|
depends_on:
|
|
traefik:
|
|
condition: "service_healthy"
|
|
setup:
|
|
condition: "service_completed_successfully"
|
|
|
|
samlidp:
|
|
user: "${UID:-1000}:${GID:-1000}"
|
|
image: "${LOGIN_TEST_ACCEPTANCE_SAMLIDP_TAG:-login-test-acceptance-samlidp:local}"
|
|
container_name: acceptance-samlidp
|
|
build:
|
|
context: "${LOGIN_TEST_ACCEPTANCE_BUILD_CONTEXT:-.}/idp/saml"
|
|
dockerfile: ../../go-command.Dockerfile
|
|
args:
|
|
- LOGIN_TEST_ACCEPTANCE_GOLANG_TAG=${LOGIN_TEST_ACCEPTANCE_GOLANG_TAG:-golang:1.24-alpine}
|
|
environment:
|
|
API_URL: 'http://traefik:8080'
|
|
API_DOMAIN: 'traefik'
|
|
PAT_FILE: '/pat/zitadel-admin-sa.pat'
|
|
SCHEMA: 'https'
|
|
HOST: 'traefik'
|
|
PORT: "8003"
|
|
ports:
|
|
- 8003:8003
|
|
volumes:
|
|
- "./pat:/pat"
|
|
depends_on:
|
|
traefik:
|
|
condition: "service_healthy"
|
|
setup:
|
|
condition: "service_completed_successfully"
|