feat: add task workflow and asset downloads
This commit is contained in:
47
docker-compose.yml
Normal file
47
docker-compose.yml
Normal file
@@ -0,0 +1,47 @@
|
||||
services:
|
||||
zhinian-aigc:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
image: zhinian-aigc:latest
|
||||
container_name: zhinian-aigc
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- .env.local
|
||||
environment:
|
||||
NODE_ENV: production
|
||||
PORT: 3000
|
||||
ZHINIAN_RUNTIME_DIR: /app/.runtime
|
||||
NEXT_TELEMETRY_DISABLED: "1"
|
||||
ports:
|
||||
- "${APP_PORT:-3000}:3000"
|
||||
volumes:
|
||||
- ./.runtime:/app/.runtime
|
||||
healthcheck:
|
||||
test:
|
||||
- CMD
|
||||
- node
|
||||
- -e
|
||||
- "fetch('http://127.0.0.1:3000/api/health').then((r)=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 20s
|
||||
|
||||
zhinian-worker:
|
||||
image: zhinian-aigc:latest
|
||||
container_name: zhinian-worker
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
zhinian-aigc:
|
||||
condition: service_healthy
|
||||
env_file:
|
||||
- .env.local
|
||||
environment:
|
||||
NODE_ENV: production
|
||||
ZHINIAN_RUNTIME_DIR: /app/.runtime
|
||||
NEXT_TELEMETRY_DISABLED: "1"
|
||||
ZHINIAN_WORKER_BASE_URL: http://zhinian-aigc:3000
|
||||
volumes:
|
||||
- ./.runtime:/app/.runtime
|
||||
command: ["node", "scripts/worker.mjs"]
|
||||
Reference in New Issue
Block a user