Created
October 13, 2023 11:34
-
-
Save muhlemmer/2d23fd7f82504df62101c2587c513cf4 to your computer and use it in GitHub Desktop.
zitadel with postgresql and pgadmin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.8' | |
services: | |
zitadel: | |
image: ghcr.io/zitadel/zitadel:${ZITADEL_VERSION:-latest} | |
command: start-from-init --masterkeyFromEnv --tlsMode disabled --config /config/zitadel.yaml | |
environment: | |
ZITADEL_MASTERKEY: ${ZITADEL_MASTERKEY:-MasterkeyNeedsToHave32Characters} | |
ZITADEL_SYSTEMDEFAULTS_PASSWORDHASHER_VERIFIERS: pbkdf2 | |
restart: always | |
depends_on: | |
db: | |
condition: service_healthy | |
networks: | |
- zitadel | |
- data | |
ports: | |
- 9000:8080 | |
volumes: | |
- ./config:/config:ro | |
db: | |
image: postgres:15 | |
restart: always | |
networks: | |
- data | |
volumes: | |
- ./data/postgres:/var/lib/postgresql/data/ | |
environment: | |
POSTGRES_USER: ${POSTGRES_USER:-postgres} | |
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} | |
healthcheck: | |
test: ["CMD", "pg_isready", "-d", "postgres", "-U", "${POSTGRES_USER:-postgres}"] | |
interval: 10s | |
timeout: 5s | |
retries: 5 | |
start_period: 10s | |
pgadmin: | |
image: dpage/pgadmin4:latest | |
environment: | |
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:-pgadmin4@pgadmin.org} | |
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-admin} | |
PGADMIN_CONFIG_SERVER_MODE: 'False' | |
volumes: | |
- ./data/pgadmin:/var/lib/pgadmin | |
ports: | |
- "${PGADMIN_PORT:-5050}:80" | |
networks: | |
- data | |
restart: unless-stopped | |
networks: | |
zitadel: | |
data: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Log: | |
Level: debug | |
Metrics: | |
Type: none | |
Tracing: | |
# Choose one in "otel", "google", "log" and "none" | |
Type: none | |
ExternalPort: 9000 # ZITADEL_EXTERNAL_PORT | |
ExternalSecure: false | |
Database: | |
postgres: | |
Host: db | |
Port: 5432 | |
Database: zitadel | |
User: | |
Username: zitadel # ZITADEL_DATABASE_POSTGRES_USER_USERNAME | |
Password: tei1Xai5Eeso # ZITADEL_DATABASE_POSTGRES_USER_PASSWORD | |
SSL: | |
Mode: disable | |
Admin: | |
Username: postgres # ZITADEL_DATABASE_POSTGRES_ADMIN_USERNAME | |
Password: tei1Xai5Eeso # ZITADEL_DATABASE_POSTGRES_ADMIN_PASSWORD | |
SSL: | |
Mode: disable | |
SystemDefaults: | |
PasswordHasher: | |
# Set hasher configuration for user passwords. | |
# Passwords previously hashed with a different algorithm | |
# or cost are automatically re-hashed using this config, | |
# upon password validation or update. | |
Hasher: | |
Algorithm: "scrypt" | |
Cost: 12 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note: zitadel.yaml needs to go into the
./config
directory, which will be mounted into the container.