deploy: use external postgres
This commit is contained in:
@@ -103,7 +103,11 @@ jobs:
|
||||
append_if_set POSTGRES_USER "$POSTGRES_USER"
|
||||
append_if_set POSTGRES_PASSWORD "$POSTGRES_PASSWORD"
|
||||
append_if_set POSTGRES_HOST "$POSTGRES_HOST"
|
||||
if [ -n "${POSTGRES_PORT:-}" ]; then
|
||||
append_if_set POSTGRES_PORT "$POSTGRES_PORT"
|
||||
elif [ -n "${PGBOUNCER_PORT:-}" ]; then
|
||||
append_if_set POSTGRES_PORT "$PGBOUNCER_PORT"
|
||||
fi
|
||||
append_if_set CRANK_STORAGE_ROOT "$CRANK_STORAGE_ROOT"
|
||||
append_if_set CRANK_PUBLISH_BIND "$CRANK_PUBLISH_BIND"
|
||||
append_if_set CRANK_ADMIN_BIND "$CRANK_ADMIN_BIND"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
POSTGRES_DB=crank
|
||||
POSTGRES_USER=crank
|
||||
POSTGRES_PASSWORD=change-me
|
||||
POSTGRES_HOST=postgres
|
||||
POSTGRES_HOST=postgres.example.internal
|
||||
POSTGRES_PORT=5432
|
||||
POSTGRES_MAX_CONNECTIONS=20
|
||||
POSTGRES_MIN_CONNECTIONS=2
|
||||
|
||||
@@ -1,21 +1,4 @@
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_DB: ${POSTGRES_DB:-crank}
|
||||
POSTGRES_USER: ${POSTGRES_USER:-crank}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-crank}
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
ports:
|
||||
- "127.0.0.1:5432:5432"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-crank} -d ${POSTGRES_DB:-crank}"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
valkey:
|
||||
image: valkey/valkey:8-alpine
|
||||
restart: unless-stopped
|
||||
@@ -39,7 +22,7 @@ services:
|
||||
dockerfile: apps/admin-api/Dockerfile
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_HOST: ${POSTGRES_HOST:-postgres}
|
||||
POSTGRES_HOST: ${POSTGRES_HOST}
|
||||
POSTGRES_PORT: ${POSTGRES_PORT:-5432}
|
||||
POSTGRES_DB: ${POSTGRES_DB:-crank}
|
||||
POSTGRES_USER: ${POSTGRES_USER:-crank}
|
||||
@@ -59,9 +42,6 @@ services:
|
||||
CRANK_BOOTSTRAP_ADMIN_PASSWORD: ${CRANK_BOOTSTRAP_ADMIN_PASSWORD}
|
||||
CRANK_BOOTSTRAP_ADMIN_DISPLAY_NAME: ${CRANK_BOOTSTRAP_ADMIN_DISPLAY_NAME:-Crank Owner}
|
||||
CRANK_DEMO_SEED: ${CRANK_DEMO_SEED:-false}
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
volumes:
|
||||
- artifact_storage:${CRANK_STORAGE_ROOT:-/var/lib/crank/storage}
|
||||
ports:
|
||||
@@ -79,7 +59,7 @@ services:
|
||||
dockerfile: apps/mcp-server/Dockerfile
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_HOST: ${POSTGRES_HOST:-postgres}
|
||||
POSTGRES_HOST: ${POSTGRES_HOST}
|
||||
POSTGRES_PORT: ${POSTGRES_PORT:-5432}
|
||||
POSTGRES_DB: ${POSTGRES_DB:-crank}
|
||||
POSTGRES_USER: ${POSTGRES_USER:-crank}
|
||||
@@ -93,9 +73,6 @@ services:
|
||||
CRANK_LOG_LEVEL: ${CRANK_LOG_LEVEL:-info}
|
||||
CRANK_MASTER_KEY: ${CRANK_MASTER_KEY}
|
||||
CRANK_BASE_URL: ${CRANK_BASE_URL:-http://localhost:3000}
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
volumes:
|
||||
- artifact_storage:${CRANK_STORAGE_ROOT:-/var/lib/crank/storage}
|
||||
ports:
|
||||
@@ -121,6 +98,5 @@ services:
|
||||
retries: 5
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
artifact_storage:
|
||||
valkey_data:
|
||||
|
||||
Reference in New Issue
Block a user