Skip to content

Commit

Permalink
Removed Zitadel from docker-compose-dev (#177)
Browse files Browse the repository at this point in the history
* Removed Zitadel from docker-compose-dev

* update docker-compose.yml docker-compose-dev.yml

---------

Co-authored-by: GitHub Actions <[email protected]>
  • Loading branch information
stankis and web-flow authored Jul 9, 2024
1 parent 8e874d1 commit e97ba98
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 150 deletions.
67 changes: 0 additions & 67 deletions docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}"
14 changes: 3 additions & 11 deletions docker-compose.zitadel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -85,9 +81,7 @@ services:
POSTGRES_PASSWORD: us
volumes:
- ./metadata:/var/lib/postgresql/data

ports:
- "8086:5432"



us:
Expand All @@ -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"
Expand Down
72 changes: 0 additions & 72 deletions templates/docker-compose.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand All @@ -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 }}
Expand All @@ -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 %}

0 comments on commit e97ba98

Please sign in to comment.