mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-12 18:12:22 +00:00
use postgres
This commit is contained in:
@@ -1,5 +1,3 @@
|
|||||||
version: "3.8"
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
zitadel:
|
zitadel:
|
||||||
user: "${ZITADEL_DEV_UID}"
|
user: "${ZITADEL_DEV_UID}"
|
||||||
@@ -15,17 +13,22 @@ services:
|
|||||||
condition: "service_healthy"
|
condition: "service_healthy"
|
||||||
|
|
||||||
db:
|
db:
|
||||||
image: "cockroachdb/cockroach:v22.2.2"
|
restart: 'always'
|
||||||
command: "start-single-node --insecure --http-addr :9090"
|
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:
|
healthcheck:
|
||||||
test: ["CMD", "curl", "-f", "http://localhost:9090/health?ready=1"]
|
test: ["CMD-SHELL", "pg_isready"]
|
||||||
interval: "10s"
|
interval: '10s'
|
||||||
timeout: "30s"
|
timeout: '30s'
|
||||||
retries: 5
|
retries: 5
|
||||||
start_period: "20s"
|
start_period: '20s'
|
||||||
ports:
|
ports:
|
||||||
- "26257:26257"
|
- 5432:5432
|
||||||
- "9090:9090"
|
|
||||||
|
|
||||||
wait_for_zitadel:
|
wait_for_zitadel:
|
||||||
image: curlimages/curl:8.00.1
|
image: curlimages/curl:8.00.1
|
||||||
@@ -33,7 +36,7 @@ services:
|
|||||||
[
|
[
|
||||||
"/bin/sh",
|
"/bin/sh",
|
||||||
"-c",
|
"-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:
|
depends_on:
|
||||||
- zitadel
|
- zitadel
|
||||||
|
|||||||
@@ -9,8 +9,24 @@ FirstInstance:
|
|||||||
Type: 1
|
Type: 1
|
||||||
|
|
||||||
Database:
|
Database:
|
||||||
Cockroach:
|
EventPushConnRatio: 0.2 # 4
|
||||||
|
ProjectionSpoolerConnRatio: 0.3 # 6
|
||||||
|
postgres:
|
||||||
Host: db
|
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:
|
Logstore:
|
||||||
Access:
|
Access:
|
||||||
|
|||||||
Reference in New Issue
Block a user