docs: 完善开发与测试环境

This commit is contained in:
2026-09-09 20:18:15 +00:00
parent 0a14dded9d
commit 227994bc10
6 changed files with 229 additions and 5 deletions
+36
View File
@@ -0,0 +1,36 @@
name: postgresql-tenant-operator-dev
services:
postgres:
image: ${POSTGRES_IMAGE:-postgres:17-alpine}
environment:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres-dev-only
ports:
- "127.0.0.1:${POSTGRES_DEV_PORT:-15432}:5432"
tmpfs:
- /var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d postgres"]
interval: 2s
timeout: 2s
retries: 30
openbao:
image: ${OPENBAO_IMAGE:-openbao/openbao:2.6.1}
command: server -dev
environment:
BAO_ADDR: http://127.0.0.1:8200
BAO_DEV_LISTEN_ADDRESS: 0.0.0.0:8200
BAO_DEV_ROOT_TOKEN_ID: dev-only-root-token
BAO_TOKEN: dev-only-root-token
ports:
- "127.0.0.1:${OPENBAO_DEV_PORT:-18200}:8200"
cap_add:
- IPC_LOCK
healthcheck:
test: ["CMD", "bao", "status"]
interval: 2s
timeout: 2s
retries: 30