a949969c4d
- Add tini (init: true in compose) to reap orphan Chromium processes - Reduce screenshot push frequency (active 0.12→0.20s, idle 0.35→1.00s, deep idle 1.00→5.00s, backoff 0.60→2.00s) - Add 5s timeout to screenshot in WebSocket push loop - close() now wraps context.close() in asyncio.wait_for(10s) with browser.close() fallback on timeout - Two-phase close logging (closing → closed / close_failed) - Auth-capture sessions evicted after 10min TTL - shutdown() with timeout protection and logging - close_ok correctly tracks success through browser fallback path
34 lines
978 B
YAML
34 lines
978 B
YAML
services:
|
|
smartup:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: smartup
|
|
restart: unless-stopped
|
|
ports:
|
|
- "${BIND_HOST:-0.0.0.0}:${SERVER_PORT:-8899}:8000"
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
volumes:
|
|
- ./data:/app/data
|
|
environment:
|
|
- ADMIN_EMAIL=admin@smartup.local
|
|
- ADMIN_PASSWORD=${ADMIN_PASSWORD:?ADMIN_PASSWORD is required}
|
|
- JWT_SECRET=${JWT_SECRET:?JWT_SECRET is required}
|
|
- CORS_ORIGINS=${CORS_ORIGINS:-http://localhost:8899,http://127.0.0.1:8899}
|
|
- DATABASE_URL=sqlite:////app/data/app.db
|
|
- TZ=${TZ:-Asia/Shanghai}
|
|
- UNHEALTHY_THRESHOLD=${UNHEALTHY_THRESHOLD:-3}
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
init: true
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8000/healthz"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 20s
|