Files
probably-rendering-one-more…/scripts/preview/compose.yml
T
codex-bot 19e179dd20
Unified application CI and deployment / static-checks (push) Successful in 5s
Remote development preview source sync / sync-source (push) Failing after 17s
python CI and deployment / static-checks (push) Successful in 4s
Unified application CI and deployment / static-checks (pull_request) Successful in 5s
python CI and deployment / static-checks (pull_request) Successful in 4s
Unified application CI and deployment / verify-and-release (push) Has been skipped
python CI and deployment / verify-and-deploy (push) Has been skipped
Unified application CI and deployment / verify-and-release (pull_request) Has been skipped
python CI and deployment / verify-and-deploy (pull_request) Has been skipped
Run a persistent remote development preview
2026-11-04 14:24:01 +08:00

95 lines
2.9 KiB
YAML

x-preview-env: &preview-env
DATABASE_URL: postgresql://prompt:${POSTGRES_PASSWORD:?required}@postgres:5432/prompt
S3_ENDPOINT: http://objects:9000
S3_ACCESS_KEY: ${S3_ACCESS_KEY:?required}
S3_SECRET_KEY: ${S3_SECRET_KEY:?required}
S3_BUCKET: prompt-preview
AUTH_CONFIG_FILE: /auth/config.json
AUTH_COOKIE_SECURE: "false"
AUTH_COOKIE_NAME: preview_prompt_session
ACCOUNT_COOKIE_NAME: preview_wiki_account
ACCOUNT_PUBLIC_ORIGIN: http://8.211.154.134:${PREVIEW_PORT:-18136}
STUDIO_WIKI_ORIGIN: http://waterfall-wiki:3000
SMTP_HOST: 127.0.0.1
SMTP_PORT: "1"
SMTP_USERNAME: preview
SMTP_PASSWORD: ""
NEXT_TELEMETRY_DISABLED: "1"
PREVIEW_MODE: "true"
COREPACK_HOME: /tools/corepack
COREPACK_ENABLE_NETWORK: "0"
npm_config_offline: "true"
services:
waterfall-wiki:
image: ${PREVIEW_TOOL_IMAGE:?use a verified test image}
working_dir: /repo/apps/waterfall-wiki
user: "1000:1000"
command: ["pnpm", "dev", "--hostname", "0.0.0.0", "--port", "3000"]
init: true
restart: unless-stopped
environment:
<<: *preview-env
NODE_OPTIONS: --max-old-space-size=1536
mem_limit: 2g
cpus: 1.0
ports: ["0.0.0.0:${PREVIEW_PORT:-18136}:3000"]
volumes:
- /opt/prompt-preview/source:/repo
- dependencies:/repo/apps/waterfall-wiki/node_modules
- type: volume
source: next-cache
target: /repo/apps/waterfall-wiki/.next
- tools:/tools:ro
- /opt/prompt-preview/status:/preview-status:ro
- auth:/auth:ro
security_opt: ["no-new-privileges:true"]
cap_drop: [ALL]
postgres:
image: postgres:17-alpine
restart: unless-stopped
environment:
POSTGRES_DB: prompt
POSTGRES_USER: prompt
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?required}
volumes: ["database:/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:?required}
RUSTFS_SECRET_KEY: ${S3_SECRET_KEY:?required}
RUSTFS_VOLUMES: /data
RUSTFS_ADDRESS: :9000
RUSTFS_CONSOLE_ENABLE: "false"
volumes: ["objects:/data"]
prepare-tools:
image: ${PREVIEW_TOOL_IMAGE:?required}
profiles: [setup]
user: root
volumes: ["tools:/tools"]
command: ["/bin/sh", "-ec", "mkdir -p /tools/corepack && cp -a /root/.cache/node/corepack/. /tools/corepack/ && chown -R 1000:1000 /tools"]
migrate:
image: ${PREVIEW_TOOL_IMAGE:?required}
profiles: [setup]
environment: *preview-env
command: ["node", "dist/bootstrap.cjs"]
auth-admin:
image: ${PREVIEW_TOOL_IMAGE:?required}
profiles: [setup]
user: root
environment: *preview-env
volumes: ["auth:/auth"]
command: ["node", "dist/auth-cli.cjs", "init"]
volumes:
tools:
dependencies:
next-cache:
auth:
database:
objects: