Files
codex-bot b131e1b11d
waterfall-wiki CI and deployment / verify-and-deploy (pull_request) Failing after 3m22s
Fail closed without admin configuration and document SMTP operations
2026-10-29 16:41:50 +08:00

128 lines
3.8 KiB
YAML

x-waterfall-wiki-environment: &waterfall-wiki-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://waterfall-wiki:3000
AUTH_CONFIG_FILE: ${AUTH_CONFIG_FILE:-}
AUTH_DISABLED_FOR_TESTS: ${AUTH_DISABLED_FOR_TESTS:-false}
AUTH_COOKIE_SECURE: ${AUTH_COOKIE_SECURE:-true}
ACCOUNT_PUBLIC_ORIGIN: ${ACCOUNT_PUBLIC_ORIGIN:-http://8.211.154.134:18131}
ACCOUNT_TRUST_PROXY: ${ACCOUNT_TRUST_PROXY:-false}
SMTP_HOST: ${SMTP_HOST:-smtpdm.aliyun.com}
SMTP_PORT: ${SMTP_PORT:-465}
SMTP_USERNAME: ${SMTP_USERNAME:-noreply@notice.entroia.com}
SMTP_FROM: ${SMTP_FROM:-noreply@notice.entroia.com}
SMTP_PASSWORD: ${SMTP_PASSWORD:-}
x-waterfall-wiki: &waterfall-wiki
image: ${WATERFALL_WIKI_IMAGE:-waterfall-wiki:local}
restart: unless-stopped
environment: *waterfall-wiki-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:
waterfall-wiki:
<<: *waterfall-wiki
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
waterfall-wiki-worker:
<<: *waterfall-wiki
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:
<<: *waterfall-wiki
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:
<<: *waterfall-wiki
profiles: [tools]
restart: "no"
command: ["node", "bootstrap.cjs"]
publish:
<<: *waterfall-wiki
profiles: [tools]
restart: "no"
command: ["node", "publish-learning-series.cjs"]
tests:
image: ${WATERFALL_WIKI_TEST_IMAGE:-waterfall-wiki:tests}
profiles: [tools]
init: true
environment:
<<: *waterfall-wiki-environment
PROMPT_INTEGRATION_TEST: "1"
PROMPT_TEST_BASE_URL: http://waterfall-wiki:3000
depends_on:
waterfall-wiki:
condition: service_healthy
waterfall-wiki-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: