mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-12 07:32:27 +00:00
use postgres
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
zitadel:
|
||||
user: "${ZITADEL_DEV_UID}"
|
||||
@@ -15,17 +13,22 @@ services:
|
||||
condition: "service_healthy"
|
||||
|
||||
db:
|
||||
image: "cockroachdb/cockroach:v22.2.2"
|
||||
command: "start-single-node --insecure --http-addr :9090"
|
||||
restart: 'always'
|
||||
image: 'postgres:latest'
|
||||
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", "curl", "-f", "http://localhost:9090/health?ready=1"]
|
||||
interval: "10s"
|
||||
timeout: "30s"
|
||||
test: ["CMD-SHELL", "pg_isready"]
|
||||
interval: '10s'
|
||||
timeout: '30s'
|
||||
retries: 5
|
||||
start_period: "20s"
|
||||
start_period: '20s'
|
||||
ports:
|
||||
- "26257:26257"
|
||||
- "9090:9090"
|
||||
- 5432:5432
|
||||
|
||||
wait_for_zitadel:
|
||||
image: curlimages/curl:8.00.1
|
||||
@@ -33,7 +36,7 @@ services:
|
||||
[
|
||||
"/bin/sh",
|
||||
"-c",
|
||||
"i=0; while ! curl http://zitadel:8080/debug/ready && [ $$i -lt 30 ]; do sleep 1; i=$$((i+1)); done; [ $$i -eq 30 ] && exit 1 || exit 0",
|
||||
"i=0; while ! curl http://zitadel:8080/debug/ready && [ $$i -lt 30 ]; do sleep 1; i=$$((i+1)); done; [ $$i -eq 120 ] && exit 1 || exit 0",
|
||||
]
|
||||
depends_on:
|
||||
- zitadel
|
||||
|
||||
@@ -9,8 +9,24 @@ FirstInstance:
|
||||
Type: 1
|
||||
|
||||
Database:
|
||||
Cockroach:
|
||||
EventPushConnRatio: 0.2 # 4
|
||||
ProjectionSpoolerConnRatio: 0.3 # 6
|
||||
postgres:
|
||||
Host: db
|
||||
Port: 5432
|
||||
Database: zitadel
|
||||
MaxOpenConns: 20
|
||||
MaxIdleConns: 20
|
||||
MaxConnLifetime: 1h
|
||||
MaxConnIdleTime: 5m
|
||||
User:
|
||||
Username: zitadel
|
||||
SSL:
|
||||
Mode: disable
|
||||
Admin:
|
||||
Username: zitadel
|
||||
SSL:
|
||||
Mode: disable
|
||||
|
||||
Logstore:
|
||||
Access:
|
||||
|
||||
Reference in New Issue
Block a user