66 lines
1.4 KiB
YAML
66 lines
1.4 KiB
YAML
|
|
services:
|
||
|
|
api:
|
||
|
|
build:
|
||
|
|
context: .
|
||
|
|
dockerfile: Dockerfile
|
||
|
|
target: node-runtime
|
||
|
|
command: ["npm", "run", "dev:api"]
|
||
|
|
working_dir: /app
|
||
|
|
environment:
|
||
|
|
HOST: 0.0.0.0
|
||
|
|
PORT: 4300
|
||
|
|
ports:
|
||
|
|
- "4300:4300"
|
||
|
|
volumes:
|
||
|
|
- ./data:/app/data
|
||
|
|
- ./storage:/app/storage
|
||
|
|
healthcheck:
|
||
|
|
test:
|
||
|
|
[
|
||
|
|
"CMD",
|
||
|
|
"node",
|
||
|
|
"-e",
|
||
|
|
"fetch('http://127.0.0.1:4300/health').then((response)=>process.exit(response.ok?0:1)).catch(()=>process.exit(1))"
|
||
|
|
]
|
||
|
|
interval: 10s
|
||
|
|
timeout: 5s
|
||
|
|
retries: 6
|
||
|
|
start_period: 5s
|
||
|
|
restart: unless-stopped
|
||
|
|
|
||
|
|
worker:
|
||
|
|
build:
|
||
|
|
context: .
|
||
|
|
dockerfile: Dockerfile
|
||
|
|
target: node-runtime
|
||
|
|
command: ["npm", "run", "dev:worker"]
|
||
|
|
working_dir: /app
|
||
|
|
depends_on:
|
||
|
|
- api
|
||
|
|
environment:
|
||
|
|
HOST: 0.0.0.0
|
||
|
|
PORT: 4301
|
||
|
|
API_BASE_URL: http://api:4300
|
||
|
|
POLL_INTERVAL_MS: 2500
|
||
|
|
ports:
|
||
|
|
- "4301:4301"
|
||
|
|
volumes:
|
||
|
|
- ./data:/app/data
|
||
|
|
- ./storage:/app/storage
|
||
|
|
healthcheck:
|
||
|
|
test:
|
||
|
|
[
|
||
|
|
"CMD",
|
||
|
|
"node",
|
||
|
|
"-e",
|
||
|
|
"fetch('http://127.0.0.1:4301/health').then((response)=>process.exit(response.ok?0:1)).catch(()=>process.exit(1))"
|
||
|
|
]
|
||
|
|
interval: 10s
|
||
|
|
timeout: 5s
|
||
|
|
retries: 6
|
||
|
|
start_period: 5s
|
||
|
|
restart: unless-stopped
|
||
|
|
|
||
|
|
volumes:
|
||
|
|
workspace_node_modules:
|