diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index 1f0ad02b..fb5dc3f6 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -84,69 +84,12 @@ services: USE_DEMO_DATA: ${USE_DEMO_DATA:-1} HC: ${HC:-0} NODE_EXTRA_CA_CERTS: /certs/root.crt - ZITADEL: "false" - ZITADEL_URI: "http://zitadel:8080" - CLIENT_ID: "${DL_CLIENT_ID}" - CLIENT_SECRET: "${DL_CLIENT_SECRET}" - SERVICE_CLIENT_ID: "us" - SERVICE_CLIENT_SECRET: "${US_SERVICE_CLIENT_SECRET}" ports: - "8083:8083" extra_hosts: - "host.docker.internal:host-gateway" volumes: - ./certs:/certs - zitadel-db: - restart: 'always' - image: postgres:16-alpine - environment: - POSTGRES_DB: zitadel - POSTGRES_USER: zit - POSTGRES_PASSWORD: zit - healthcheck: - test: ["CMD-SHELL", "pg_isready", "-d", "zitadel", "-U", "zit"] - interval: '10s' - timeout: '30s' - retries: 5 - start_period: '20s' - ports: - - "8087:5432" - volumes: - - ./zitadel-db:/var/lib/postgresql/data - - zitadel: - restart: 'always' - image: 'ghcr.io/zitadel/zitadel:v2.54.1' - command: 'start-from-init --masterkeyFromEnv --tlsMode disabled' - environment: - - 'ZITADEL_MASTERKEY=${ZITADEL_MASTERKEY:?missed ZITADEL_MASTERKEY env}' - - 'ZITADEL_DATABASE_POSTGRES_HOST=zitadel-db' - - 'ZITADEL_DATABASE_POSTGRES_PORT=5432' - - 'ZITADEL_DATABASE_POSTGRES_DATABASE=zitadel' - - 'ZITADEL_DATABASE_POSTGRES_USER_USERNAME=zit' - - 'ZITADEL_DATABASE_POSTGRES_USER_PASSWORD=zit' - - 'ZITADEL_DATABASE_POSTGRES_USER_SSL_MODE=disable' - - 'ZITADEL_DATABASE_POSTGRES_ADMIN_USERNAME=zit' - - 'ZITADEL_DATABASE_POSTGRES_ADMIN_PASSWORD=zit' - - 'ZITADEL_DATABASE_POSTGRES_ADMIN_SSL_MODE=disable' - - 'ZITADEL_SYSTEMDEFAULTS_SECRETGENERATORS_PASSWORDSALTCOST=1' - - 'ZITADEL_EXTERNALSECURE=false' - - 'ZITADEL_EXTERNALPORT=${ZITADEL_EXTERNALPORT:-8080}' - - 'ZITADEL_EXTERNALDOMAIN=${ZITADEL_EXTERNALDOMAIN:-zitadel}' - - 'ZITADEL_FIRSTINSTANCE_PATPATH=/machinekey/zitadel-admin-sa.token' - - 'ZITADEL_FIRSTINSTANCE_ORG_MACHINE_MACHINE_USERNAME=zitadel-admin-sa' - - 'ZITADEL_FIRSTINSTANCE_ORG_MACHINE_MACHINE_NAME=Admin' - - 'ZITADEL_FIRSTINSTANCE_ORG_MACHINE_MACHINEKEY_TYPE=1' - - 'ZITADEL_FIRSTINSTANCE_ORG_MACHINE_PAT_EXPIRATIONDATE=9999-01-01T00:00:00Z' - - 'ZITADEL_DEFAULTINSTANCE_OIDCSETTINGS_ACCESSTOKENLIFETIME=0.25h' - - 'ZITADEL_DEFAULTINSTANCE_OIDCSETTINGS_REFRESHTOKENEXPIRATION=336h' - depends_on: - zitadel-db: - condition: 'service_healthy' - ports: - - '8085:8080' - volumes: - - ./zitadel/machinekey:/machinekey:rw datalens: container_name: datalens-ui @@ -168,13 +111,3 @@ services: BI_DATA_ENDPOINT: "http://data-api:8080" NODE_EXTRA_CA_CERTS: "/usr/local/share/ca-certificates/cert.pem" HC: ${HC:-0} - ZITADEL: "false" - CLIENT_ID: "${DL_CLIENT_ID}" - CLIENT_SECRET: "${DL_CLIENT_SECRET}" - ZITADEL_PROJECT_ID: "${ZITADEL_PROJECT_ID}" - ZITADEL_URI: "http://localhost:8085" - ZITADEL_INTERNAL_URI: "http://zitadel:8080" - APP_HOST_URI: "http://localhost:8080" - ZITADEL_COOKIE_SECRET: ${ZITADEL_COOKIE_SECRET:?missed ZITADEL_COOKIE_SECRET env}" - SERVICE_CLIENT_ID: "charts" - SERVICE_CLIENT_SECRET: "${CHARTS_SERVICE_CLIENT_SECRET}" diff --git a/docker-compose.zitadel.yml b/docker-compose.zitadel.yml index 0c7df0c6..daff5028 100644 --- a/docker-compose.zitadel.yml +++ b/docker-compose.zitadel.yml @@ -29,9 +29,7 @@ services: AUTH_CLIENT_SECRET: "${BI_SERVICE_CLIENT_SECRET}" AUTH_APP_CLIENT_ID: "${DL_CLIENT_ID}" AUTH_APP_CLIENT_SECRET: "${DL_CLIENT_SECRET}" - ports: - - 8081:8080 - + depends_on: - us @@ -58,9 +56,7 @@ services: AUTH_CLIENT_SECRET: "${BI_SERVICE_CLIENT_SECRET}" AUTH_APP_CLIENT_ID: "${DL_CLIENT_ID}" AUTH_APP_CLIENT_SECRET: "${DL_CLIENT_SECRET}" - ports: - - 8082:8080 - + depends_on: - us - pg-compeng @@ -85,9 +81,7 @@ services: POSTGRES_PASSWORD: us volumes: - ./metadata:/var/lib/postgresql/data - - ports: - - "8086:5432" + us: @@ -111,8 +105,6 @@ services: CLIENT_SECRET: "${DL_CLIENT_SECRET}" SERVICE_CLIENT_ID: "us" SERVICE_CLIENT_SECRET: "${US_SERVICE_CLIENT_SECRET}" - ports: - - "8083:8083" extra_hosts: - "host.docker.internal:host-gateway" diff --git a/templates/docker-compose.j2 b/templates/docker-compose.j2 index 7edb765e..9c09908d 100644 --- a/templates/docker-compose.j2 +++ b/templates/docker-compose.j2 @@ -91,12 +91,6 @@ services: HC: ${HC:-0} NODE_EXTRA_CA_CERTS: /certs/root.crt {%- if "DEV_MODE"|env(false) %} - ZITADEL: "false" - ZITADEL_URI: "http://zitadel:8080" - CLIENT_ID: "${DL_CLIENT_ID}" - CLIENT_SECRET: "${DL_CLIENT_SECRET}" - SERVICE_CLIENT_ID: "us" - SERVICE_CLIENT_SECRET: "${US_SERVICE_CLIENT_SECRET}" ports: - "8083:8083" {%- endif %} @@ -105,60 +99,6 @@ services: volumes: - ./certs:/certs -{%- if "DEV_MODE"|env(false) %} - zitadel-db: - restart: 'always' - image: postgres:16-alpine - environment: - POSTGRES_DB: zitadel - POSTGRES_USER: zit - POSTGRES_PASSWORD: zit - healthcheck: - test: ["CMD-SHELL", "pg_isready", "-d", "zitadel", "-U", "zit"] - interval: '10s' - timeout: '30s' - retries: 5 - start_period: '20s' - ports: - - "8087:5432" - volumes: - - ./zitadel-db:/var/lib/postgresql/data - - zitadel: - restart: 'always' - image: 'ghcr.io/zitadel/zitadel:v2.54.1' - command: 'start-from-init --masterkeyFromEnv --tlsMode disabled' - environment: - - 'ZITADEL_MASTERKEY=${ZITADEL_MASTERKEY:?missed ZITADEL_MASTERKEY env}' - - 'ZITADEL_DATABASE_POSTGRES_HOST=zitadel-db' - - 'ZITADEL_DATABASE_POSTGRES_PORT=5432' - - 'ZITADEL_DATABASE_POSTGRES_DATABASE=zitadel' - - 'ZITADEL_DATABASE_POSTGRES_USER_USERNAME=zit' - - 'ZITADEL_DATABASE_POSTGRES_USER_PASSWORD=zit' - - 'ZITADEL_DATABASE_POSTGRES_USER_SSL_MODE=disable' - - 'ZITADEL_DATABASE_POSTGRES_ADMIN_USERNAME=zit' - - 'ZITADEL_DATABASE_POSTGRES_ADMIN_PASSWORD=zit' - - 'ZITADEL_DATABASE_POSTGRES_ADMIN_SSL_MODE=disable' - - 'ZITADEL_SYSTEMDEFAULTS_SECRETGENERATORS_PASSWORDSALTCOST=1' - - 'ZITADEL_EXTERNALSECURE=false' - - 'ZITADEL_EXTERNALPORT=${ZITADEL_EXTERNALPORT:-8080}' - - 'ZITADEL_EXTERNALDOMAIN=${ZITADEL_EXTERNALDOMAIN:-zitadel}' - - 'ZITADEL_FIRSTINSTANCE_PATPATH=/machinekey/zitadel-admin-sa.token' - - 'ZITADEL_FIRSTINSTANCE_ORG_MACHINE_MACHINE_USERNAME=zitadel-admin-sa' - - 'ZITADEL_FIRSTINSTANCE_ORG_MACHINE_MACHINE_NAME=Admin' - - 'ZITADEL_FIRSTINSTANCE_ORG_MACHINE_MACHINEKEY_TYPE=1' - - 'ZITADEL_FIRSTINSTANCE_ORG_MACHINE_PAT_EXPIRATIONDATE=9999-01-01T00:00:00Z' - - 'ZITADEL_DEFAULTINSTANCE_OIDCSETTINGS_ACCESSTOKENLIFETIME=0.25h' - - 'ZITADEL_DEFAULTINSTANCE_OIDCSETTINGS_REFRESHTOKENEXPIRATION=336h' - depends_on: - zitadel-db: - condition: 'service_healthy' - ports: - - '8085:8080' - volumes: - - ./zitadel/machinekey:/machinekey:rw -{%- endif %} - datalens: container_name: datalens-ui image: ghcr.io/datalens-tech/datalens-ui:{{ uiVersion }} @@ -179,15 +119,3 @@ services: BI_DATA_ENDPOINT: "http://data-api:8080" NODE_EXTRA_CA_CERTS: "/usr/local/share/ca-certificates/cert.pem" HC: ${HC:-0} -{%- if "DEV_MODE"|env(false) %} - ZITADEL: "false" - CLIENT_ID: "${DL_CLIENT_ID}" - CLIENT_SECRET: "${DL_CLIENT_SECRET}" - ZITADEL_PROJECT_ID: "${ZITADEL_PROJECT_ID}" - ZITADEL_URI: "http://localhost:8085" - ZITADEL_INTERNAL_URI: "http://zitadel:8080" - APP_HOST_URI: "http://localhost:8080" - ZITADEL_COOKIE_SECRET: ${ZITADEL_COOKIE_SECRET:?missed ZITADEL_COOKIE_SECRET env}" - SERVICE_CLIENT_ID: "charts" - SERVICE_CLIENT_SECRET: "${CHARTS_SERVICE_CLIENT_SECRET}" -{%- endif %}