fix: route D601 PK01 postgres through master relay (#967)

Co-authored-by: Codex <codex@noreply.local>
This commit is contained in:
Lyon
2026-06-26 12:22:30 +08:00
committed by GitHub
parent 9d6ef37fb0
commit 754789c43c
6 changed files with 209 additions and 7 deletions
+24
View File
@@ -475,6 +475,30 @@ services:
- "host.docker.internal:host-gateway"
logging: *unidesk-log-rotation
pk01-postgres-relay:
image: unidesk_provider-gateway
container_name: unidesk-pk01-postgres-relay
restart: unless-stopped
network_mode: "host"
environment:
PK01_POSTGRES_RELAY_LISTEN_HOST: "${UNIDESK_PK01_POSTGRES_RELAY_LISTEN_HOST:-0.0.0.0}"
PK01_POSTGRES_RELAY_LISTEN_PORT: "${UNIDESK_PK01_POSTGRES_RELAY_LISTEN_PORT:-15433}"
PK01_POSTGRES_RELAY_TARGET_HOST: "${UNIDESK_PK01_POSTGRES_RELAY_TARGET_HOST:-82.156.23.220}"
PK01_POSTGRES_RELAY_TARGET_PORT: "${UNIDESK_PK01_POSTGRES_RELAY_TARGET_PORT:-5432}"
PK01_POSTGRES_RELAY_IDLE_TIMEOUT_MS: "${UNIDESK_PK01_POSTGRES_RELAY_IDLE_TIMEOUT_MS:-300000}"
PK01_POSTGRES_RELAY_ALLOWED_SOURCE_CIDRS: "${UNIDESK_PK01_POSTGRES_RELAY_ALLOWED_SOURCE_CIDRS:-127.0.0.1/32,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16}"
LOG_FILE: "/var/log/unidesk/${UNIDESK_LOG_DAY:-manual}/${UNIDESK_LOG_PREFIX:-unidesk}_pk01-postgres-relay.jsonl"
command: ["bun", "/workspace/scripts/runtime/pk01-postgres-relay.js"]
volumes:
- .:/workspace:ro
- ${UNIDESK_LOG_DIR:-./.state/logs}:/var/log/unidesk
healthcheck:
test: ["CMD", "bun", "/workspace/scripts/runtime/pk01-postgres-relay.js", "--healthcheck"]
interval: 10s
timeout: 3s
retries: 6
logging: *unidesk-log-rotation
volumes:
unidesk_pgdata_10gb:
name: unidesk_pgdata_10gb