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_USER "$POSTGRES_USER"
|
||||||
append_if_set POSTGRES_PASSWORD "$POSTGRES_PASSWORD"
|
append_if_set POSTGRES_PASSWORD "$POSTGRES_PASSWORD"
|
||||||
append_if_set POSTGRES_HOST "$POSTGRES_HOST"
|
append_if_set POSTGRES_HOST "$POSTGRES_HOST"
|
||||||
append_if_set POSTGRES_PORT "$POSTGRES_PORT"
|
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_STORAGE_ROOT "$CRANK_STORAGE_ROOT"
|
||||||
append_if_set CRANK_PUBLISH_BIND "$CRANK_PUBLISH_BIND"
|
append_if_set CRANK_PUBLISH_BIND "$CRANK_PUBLISH_BIND"
|
||||||
append_if_set CRANK_ADMIN_BIND "$CRANK_ADMIN_BIND"
|
append_if_set CRANK_ADMIN_BIND "$CRANK_ADMIN_BIND"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
POSTGRES_DB=crank
|
POSTGRES_DB=crank
|
||||||
POSTGRES_USER=crank
|
POSTGRES_USER=crank
|
||||||
POSTGRES_PASSWORD=change-me
|
POSTGRES_PASSWORD=change-me
|
||||||
POSTGRES_HOST=postgres
|
POSTGRES_HOST=postgres.example.internal
|
||||||
POSTGRES_PORT=5432
|
POSTGRES_PORT=5432
|
||||||
POSTGRES_MAX_CONNECTIONS=20
|
POSTGRES_MAX_CONNECTIONS=20
|
||||||
POSTGRES_MIN_CONNECTIONS=2
|
POSTGRES_MIN_CONNECTIONS=2
|
||||||
|
|||||||
@@ -1,21 +1,4 @@
|
|||||||
services:
|
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:
|
valkey:
|
||||||
image: valkey/valkey:8-alpine
|
image: valkey/valkey:8-alpine
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
@@ -39,7 +22,7 @@ services:
|
|||||||
dockerfile: apps/admin-api/Dockerfile
|
dockerfile: apps/admin-api/Dockerfile
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_HOST: ${POSTGRES_HOST:-postgres}
|
POSTGRES_HOST: ${POSTGRES_HOST}
|
||||||
POSTGRES_PORT: ${POSTGRES_PORT:-5432}
|
POSTGRES_PORT: ${POSTGRES_PORT:-5432}
|
||||||
POSTGRES_DB: ${POSTGRES_DB:-crank}
|
POSTGRES_DB: ${POSTGRES_DB:-crank}
|
||||||
POSTGRES_USER: ${POSTGRES_USER:-crank}
|
POSTGRES_USER: ${POSTGRES_USER:-crank}
|
||||||
@@ -59,9 +42,6 @@ services:
|
|||||||
CRANK_BOOTSTRAP_ADMIN_PASSWORD: ${CRANK_BOOTSTRAP_ADMIN_PASSWORD}
|
CRANK_BOOTSTRAP_ADMIN_PASSWORD: ${CRANK_BOOTSTRAP_ADMIN_PASSWORD}
|
||||||
CRANK_BOOTSTRAP_ADMIN_DISPLAY_NAME: ${CRANK_BOOTSTRAP_ADMIN_DISPLAY_NAME:-Crank Owner}
|
CRANK_BOOTSTRAP_ADMIN_DISPLAY_NAME: ${CRANK_BOOTSTRAP_ADMIN_DISPLAY_NAME:-Crank Owner}
|
||||||
CRANK_DEMO_SEED: ${CRANK_DEMO_SEED:-false}
|
CRANK_DEMO_SEED: ${CRANK_DEMO_SEED:-false}
|
||||||
depends_on:
|
|
||||||
postgres:
|
|
||||||
condition: service_healthy
|
|
||||||
volumes:
|
volumes:
|
||||||
- artifact_storage:${CRANK_STORAGE_ROOT:-/var/lib/crank/storage}
|
- artifact_storage:${CRANK_STORAGE_ROOT:-/var/lib/crank/storage}
|
||||||
ports:
|
ports:
|
||||||
@@ -79,7 +59,7 @@ services:
|
|||||||
dockerfile: apps/mcp-server/Dockerfile
|
dockerfile: apps/mcp-server/Dockerfile
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_HOST: ${POSTGRES_HOST:-postgres}
|
POSTGRES_HOST: ${POSTGRES_HOST}
|
||||||
POSTGRES_PORT: ${POSTGRES_PORT:-5432}
|
POSTGRES_PORT: ${POSTGRES_PORT:-5432}
|
||||||
POSTGRES_DB: ${POSTGRES_DB:-crank}
|
POSTGRES_DB: ${POSTGRES_DB:-crank}
|
||||||
POSTGRES_USER: ${POSTGRES_USER:-crank}
|
POSTGRES_USER: ${POSTGRES_USER:-crank}
|
||||||
@@ -93,9 +73,6 @@ services:
|
|||||||
CRANK_LOG_LEVEL: ${CRANK_LOG_LEVEL:-info}
|
CRANK_LOG_LEVEL: ${CRANK_LOG_LEVEL:-info}
|
||||||
CRANK_MASTER_KEY: ${CRANK_MASTER_KEY}
|
CRANK_MASTER_KEY: ${CRANK_MASTER_KEY}
|
||||||
CRANK_BASE_URL: ${CRANK_BASE_URL:-http://localhost:3000}
|
CRANK_BASE_URL: ${CRANK_BASE_URL:-http://localhost:3000}
|
||||||
depends_on:
|
|
||||||
postgres:
|
|
||||||
condition: service_healthy
|
|
||||||
volumes:
|
volumes:
|
||||||
- artifact_storage:${CRANK_STORAGE_ROOT:-/var/lib/crank/storage}
|
- artifact_storage:${CRANK_STORAGE_ROOT:-/var/lib/crank/storage}
|
||||||
ports:
|
ports:
|
||||||
@@ -121,6 +98,5 @@ services:
|
|||||||
retries: 5
|
retries: 5
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
postgres_data:
|
|
||||||
artifact_storage:
|
artifact_storage:
|
||||||
valkey_data:
|
valkey_data:
|
||||||
|
|||||||
Reference in New Issue
Block a user