Run the complete PROMPT stack and CI verification in Docker
PROMPT Docker CI and deployment / verify-and-deploy (push) Successful in 14m10s
PROMPT Docker CI and deployment / verify-and-deploy (push) Successful in 14m10s
This commit is contained in:
+64
@@ -1,4 +1,68 @@
|
||||
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
|
||||
|
||||
x-app: &app
|
||||
image: ${PROMPT_IMAGE:-prompt:local}
|
||||
restart: unless-stopped
|
||||
environment: *app-environment
|
||||
init: true
|
||||
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
|
||||
migrate:
|
||||
<<: *app
|
||||
profiles: [tools]
|
||||
restart: "no"
|
||||
command: ["node", "bootstrap.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
|
||||
|
||||
Reference in New Issue
Block a user