Not part of the cable-sizing proposal - only needed because this host already runs ~50 other containers using the default 3000/3001 and the default docker network address pool was exhausted. Should not be carried over if this branch is ever proposed upstream.
88 lines
2 KiB
YAML
88 lines
2 KiB
YAML
name: leistungsbilanz
|
|
|
|
services:
|
|
api:
|
|
build:
|
|
context: .
|
|
command:
|
|
- sh
|
|
- -c
|
|
- npm run db:migrate && npm run db:verify:circuit-schema && npm run dev:api
|
|
environment:
|
|
PORT: "3000"
|
|
CHOKIDAR_USEPOLLING: "true"
|
|
LOG_LEVEL: "${LOG_LEVEL:-info}"
|
|
init: true
|
|
restart: unless-stopped
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: "20m"
|
|
max-file: "10"
|
|
ports:
|
|
- "3221:3000"
|
|
volumes:
|
|
- ./src:/app/src
|
|
- ./scripts:/app/scripts
|
|
- ./data:/app/data
|
|
- ./drizzle.config.ts:/app/drizzle.config.ts:ro
|
|
- ./tsconfig.json:/app/tsconfig.json:ro
|
|
healthcheck:
|
|
test:
|
|
- CMD
|
|
- node
|
|
- -e
|
|
- fetch('http://localhost:3000/health').then(response=>{if(!response.ok)process.exit(1)}).catch(()=>process.exit(1))
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 12
|
|
start_period: 20s
|
|
|
|
web:
|
|
build:
|
|
context: .
|
|
command:
|
|
- npm
|
|
- run
|
|
- dev:web
|
|
- --
|
|
- --hostname
|
|
- 0.0.0.0
|
|
environment:
|
|
API_INTERNAL_URL: http://api:3000
|
|
WATCHPACK_POLLING: "true"
|
|
NEXT_TELEMETRY_DISABLED: "1"
|
|
LOG_LEVEL: "${LOG_LEVEL:-info}"
|
|
init: true
|
|
restart: unless-stopped
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: "20m"
|
|
max-file: "10"
|
|
depends_on:
|
|
api:
|
|
condition: service_healthy
|
|
ports:
|
|
- "3220:3001"
|
|
volumes:
|
|
- ./src:/app/src
|
|
- ./next.config.mjs:/app/next.config.mjs:ro
|
|
- ./tsconfig.json:/app/tsconfig.json:ro
|
|
- ./tsconfig.next.json:/app/tsconfig.next.json:ro
|
|
healthcheck:
|
|
test:
|
|
- CMD
|
|
- node
|
|
- -e
|
|
- fetch('http://localhost:3001/').then(response=>{if(!response.ok)process.exit(1)}).catch(()=>process.exit(1))
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 12
|
|
start_period: 20s
|
|
|
|
networks:
|
|
default:
|
|
ipam:
|
|
config:
|
|
- subnet: 172.16.61.0/24
|