Skip to content

Commit

Permalink
Zitadel docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
Timshel committed Feb 29, 2024
1 parent f737fbc commit 7dcb91a
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docker/zitadel/.env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Postgres CONFIG
POSTGRES_HOST=127.0.0.1
POSTGRES_PORT=5435
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres

# Zitadel CONFIG
ZITADEL_DATABASE_POSTGRES_HOST=${POSTGRES_HOST}
ZITADEL_DATABASE_POSTGRES_PORT=${POSTGRES_PORT}
ZITADEL_DATABASE_POSTGRES_DATABASE=zitadel
ZITADEL_DATABASE_POSTGRES_USER_USERNAME=zitadel
ZITADEL_DATABASE_POSTGRES_USER_PASSWORD=zitadel
ZITADEL_DATABASE_POSTGRES_USER_SSL_MODE=disable
ZITADEL_DATABASE_POSTGRES_ADMIN_USERNAME=${POSTGRES_USER}
ZITADEL_DATABASE_POSTGRES_ADMIN_PASSWORD=${POSTGRES_PASSWORD}
ZITADEL_DATABASE_POSTGRES_ADMIN_SSL_MODE=disable
ZITADEL_EXTERNALSECURE=false
ZITADEL_EXTERNALDOMAIN=127.0.0.1

# Default user will be: `zitadel-admin@zitadel.${ZITADEL_EXTERNALDOMAIN}` / `Password1!`
1 change: 1 addition & 0 deletions docker/zitadel/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
machinekey
27 changes: 27 additions & 0 deletions docker/zitadel/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
version: '3.8'

services:
zitadel:
restart: 'always'
network_mode: "host"
image: 'ghcr.io/zitadel/zitadel:latest'
command: 'start-from-init --masterkey "MasterkeyNeedsToHave32Characters" --tlsMode disabled'
env_file: .env
depends_on:
db:
condition: 'service_healthy'
volumes:
- ./machinekey:/machinekey

db:
restart: 'always'
image: postgres:16-alpine
env_file: .env
healthcheck:
test: ["CMD-SHELL", "pg_isready", "-d", "db_prod"]
interval: '10s'
timeout: '30s'
retries: 5
start_period: '20s'
ports:
- ${POSTGRES_PORT}:5432

0 comments on commit 7dcb91a

Please sign in to comment.