Files
convex-monorepo-payload/docker/compose.local.yml
T
Gabriel Brown 7d1884be41
Build and Deploy Next App / quality (push) Successful in 1m24s
Build and Deploy Next App / convex-deploy (push) Successful in 1m58s
Build and Deploy Next App / build-next (push) Successful in 5m32s
Deploy from CI with Infisical and ship Payload changes as migrations
CI reads Infisical staging as the read-only convexmonorepo-ci machine identity, deploys the Convex functions, builds and pushes the image, and asks the VPS to redeploy. Payload schema changes now ship as migrations that production runs on startup; the baseline matches the production schema and is recorded as applied there. The local stack moves to its own ports and syncs the Convex runtime env, and the scripts pick up Infisical account switching, dev-kill and a cache-safe CI install.
2026-10-01 14:42:55 -04:00

63 lines
2.2 KiB
YAML

name: convexmonorepo-local
services:
postgres:
image: postgres:17
container_name: convexmonorepo-local-postgres
ports: ['${POSTGRES_PORT:-5436}:5432']
environment:
- POSTGRES_USER=${POSTGRES_USER:-convexmonorepo}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-localdev}
- POSTGRES_DB=${POSTGRES_DB:-convexmonorepo_payload}
volumes: [payload-postgres-data:/var/lib/postgresql/data]
restart: unless-stopped
healthcheck:
test: ['CMD-SHELL', 'pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}']
start_period: 10s
interval: 5s
retries: 10
timeout: 5s
convex-backend:
image: ghcr.io/get-convex/convex-backend:${BACKEND_TAG:-latest}
container_name: convexmonorepo-local-convex
ports:
- '${BACKEND_PORT:-3240}:3210'
- '${SITE_PROXY_PORT:-3241}:3211'
environment:
- INSTANCE_NAME=${LOCAL_INSTANCE_NAME:-convexmonorepo_local}
- INSTANCE_SECRET=${LOCAL_INSTANCE_SECRET:-0000000000000000000000000000000000000000000000000000000000000000}
- CONVEX_CLOUD_ORIGIN=http://localhost:${BACKEND_PORT:-3240}
- CONVEX_SITE_ORIGIN=http://localhost:${SITE_PROXY_PORT:-3241}
- DISABLE_BEACON=true
- REDACT_LOGS_TO_CLIENT=false
- DO_NOT_REQUIRE_SSL=true
# Convex uses its own volume by default. A cloned project may opt into
# Convex-on-Postgres by configuring a separate database URL here:
# - POSTGRES_URL=postgres://user:password@postgres:5432/convex?sslmode=disable
volumes: [convex-data:/convex/data]
restart: unless-stopped
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:3210/version']
start_period: 10s
interval: 5s
retries: 20
timeout: 5s
stop_grace_period: 10s
stop_signal: SIGINT
convex-dashboard:
image: ghcr.io/get-convex/convex-dashboard:${DASHBOARD_TAG:-latest}
container_name: convexmonorepo-local-convex-dashboard
ports: ['${DASHBOARD_PORT:-6794}:6791']
environment:
- NEXT_PUBLIC_DEPLOYMENT_URL=http://localhost:${BACKEND_PORT:-3240}
depends_on:
convex-backend:
condition: service_healthy
restart: unless-stopped
volumes:
payload-postgres-data:
convex-data: