production runtime and mock removal
This commit is contained in:
1 parent
2ef3da7af5
commit
6480e503eb
55 files changed
+581
-540
No files matched your search
+46
-27
@@ -1,47 +1,66 @@
|
||||
services:
|
||||
zhinian-aigc:
|
||||
zhinian-go-api:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
image: zhinian-aigc:latest
|
||||
container_name: zhinian-aigc
|
||||
context: ./backend
|
||||
dockerfile: Dockerfile.alpine
|
||||
image: zhinian-go-api:latest
|
||||
container_name: zhinian-go-api
|
||||
restart: unless-stopped
|
||||
working_dir: /app
|
||||
env_file:
|
||||
- .env.local
|
||||
environment:
|
||||
NODE_ENV: production
|
||||
PORT: 3000
|
||||
ZHINIAN_RUNTIME_DIR: /app/.runtime
|
||||
NEXT_TELEMETRY_DISABLED: "1"
|
||||
ports:
|
||||
- "${APP_PORT:-3000}:3000"
|
||||
GO_BACKEND_HOST: 0.0.0.0
|
||||
GO_BACKEND_PORT: 8080
|
||||
ZHINIAN_GO_EMBEDDED_WORKER: "true"
|
||||
ZHINIAN_RUNTIME_DIR: /var/lib/zhinian/runtime
|
||||
ZHINIAN_LOG_DIR: /var/lib/zhinian/logs
|
||||
ZHINIAN_SETTINGS_FILE: /app/.env.local
|
||||
expose:
|
||||
- "8080"
|
||||
volumes:
|
||||
- ./.runtime:/app/.runtime
|
||||
- ./.env.local:/app/.env.local
|
||||
- runtime-data:/var/lib/zhinian
|
||||
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
|
||||
- wget
|
||||
- -q
|
||||
- -O
|
||||
- /dev/null
|
||||
- http://127.0.0.1:8080/api/health
|
||||
interval: 15s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 20s
|
||||
|
||||
zhinian-worker:
|
||||
zhinian-web:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
image: zhinian-aigc:latest
|
||||
container_name: zhinian-worker
|
||||
container_name: zhinian-web
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
zhinian-aigc:
|
||||
zhinian-go-api:
|
||||
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
|
||||
ports:
|
||||
- "${APP_PORT:-3000}:3000"
|
||||
volumes:
|
||||
- ./.runtime:/app/.runtime
|
||||
command: ["node", "scripts/worker.mjs"]
|
||||
- ./deploy/nginx-compose.conf:/etc/nginx/nginx.conf:ro
|
||||
healthcheck:
|
||||
test:
|
||||
- CMD
|
||||
- wget
|
||||
- -q
|
||||
- -O
|
||||
- /dev/null
|
||||
- http://127.0.0.1:3000/healthz
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 10s
|
||||
|
||||
volumes:
|
||||
runtime-data:
|
||||
Reference in new issue
Block a user