Files
probably-rendering-one-more…/compose.yml
T
codex-bot 0c1ed2d292
studio CI and deployment / verify-and-deploy (push) Successful in 1m14s
wiki CI and deployment / verify-and-deploy (push) Failing after 25m6s
Add SSH-provisioned TOTP login with JWT sessions
2026-10-27 00:12:12 +08:00

120 lines
3.2 KiB
YAML

x-app-environment: &app-environment
HOSTNAME: 0.0.0.0
PORT: "3000"
DATABASE_URL: postgresql://prompt:${POSTGRES_PASSWORD:?Set a unique PostgreSQL password}@postgres:5432/prompt
S3_ENDPOINT: http://objects:9000
S3_ACCESS_KEY: ${S3_ACCESS_KEY:?Set a unique S3 access key}
S3_SECRET_KEY: ${S3_SECRET_KEY:?Set a unique S3 secret key}
S3_BUCKET: ${S3_BUCKET:-prompt}
RELEASE_SHA: ${RELEASE_SHA:-development}
FFMPEG_PATH: /usr/bin/ffmpeg
FFPROBE_PATH: /usr/bin/ffprobe
CHROMIUM_PATH: /usr/bin/chromium
RENDER_ORIGIN: http://web:3000
AUTH_CONFIG_FILE: ${AUTH_CONFIG_FILE:-}
AUTH_COOKIE_SECURE: ${AUTH_COOKIE_SECURE:-true}
x-app: &app
image: ${PROMPT_IMAGE:-prompt:local}
restart: unless-stopped
environment: *app-environment
init: true
volumes:
- auth_data:/auth:ro
security_opt:
- no-new-privileges:true
cap_drop: [ALL]
depends_on:
postgres:
condition: service_healthy
objects:
condition: service_started
services:
web:
<<: *app
ports:
- "${WEB_BIND_ADDRESS:-0.0.0.0}:${WEB_PORT:-18131}:3000"
healthcheck:
test: ["CMD", "node", "container-health.mjs"]
interval: 5s
timeout: 8s
retries: 24
start_period: 10s
worker:
<<: *app
command: ["node", "worker.cjs"]
stop_grace_period: 11m
healthcheck:
test: ["CMD", "node", "-e", "const f=require('fs');try{if(Date.now()-f.statSync('/tmp/prompt-worker-health').mtimeMs>60000)process.exit(1)}catch{process.exit(1)}"]
interval: 15s
timeout: 5s
retries: 4
start_period: 10s
auth-admin:
<<: *app
profiles: [tools]
restart: "no"
user: root
cap_drop: []
cap_add: [CHOWN, FOWNER, DAC_OVERRIDE]
volumes:
- auth_data:/auth
command: ["node", "auth-cli.cjs", "init"]
migrate:
<<: *app
profiles: [tools]
restart: "no"
command: ["node", "bootstrap.cjs"]
publish:
<<: *app
profiles: [tools]
restart: "no"
command: ["node", "publish-learning-series.cjs"]
tests:
image: ${PROMPT_TEST_IMAGE:-prompt:tests}
profiles: [tools]
init: true
environment:
<<: *app-environment
PROMPT_INTEGRATION_TEST: "1"
PROMPT_TEST_BASE_URL: http://web:3000
depends_on:
web:
condition: service_healthy
worker:
condition: service_healthy
postgres:
image: postgres:17-alpine
restart: unless-stopped
environment:
POSTGRES_DB: prompt
POSTGRES_USER: prompt
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?Set a unique PostgreSQL password}
ports:
- "127.0.0.1:${PG_PORT:-18132}:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U prompt -d prompt"]
interval: 3s
timeout: 3s
retries: 30
objects:
image: rustfs/rustfs:1.0.3
restart: unless-stopped
environment:
RUSTFS_ACCESS_KEY: ${S3_ACCESS_KEY:?Set a unique S3 access key}
RUSTFS_SECRET_KEY: ${S3_SECRET_KEY:?Set a unique S3 secret key}
RUSTFS_VOLUMES: /data
RUSTFS_ADDRESS: ":9000"
RUSTFS_CONSOLE_ENABLE: "false"
ports:
- "127.0.0.1:${S3_PORT:-18133}:9000"
volumes:
- objects:/data
volumes:
auth_data:
postgres_data:
objects: