mirror of
https://github.com/alexhopeoconnor/bom-local-service.git
synced 2026-10-03 21:21:59 +10:00
- Remove OpenAPI/Swagger support and all related code - Standardize configuration: remove hardcoded defaults, all defaults from appsettings.json - Configuration values throw exceptions if missing (except Debug:Enabled defaults to false) - Refactor CacheManagementService: extract ProcessLocationsAsync helper, remove duplicate code - Combine UpdateStaggerSeconds and LocationStaggerSeconds into single LocationStaggerSeconds config - Move config reads to constructors for better performance - Update README and docker-compose.yml to reflect configuration changes
53 lines
2.2 KiB
YAML
53 lines
2.2 KiB
YAML
services:
|
|
bom-local-service:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: bom-local-service
|
|
ports:
|
|
- "${HOST_PORT:-8082}:${CONTAINER_PORT:-8080}"
|
|
volumes:
|
|
- ./cache:/app/cache
|
|
environment:
|
|
# ASP.NET Core configuration
|
|
# Default to Production for security (use Development only for local debugging)
|
|
- ASPNETCORE_ENVIRONMENT=${ASPNETCORE_ENVIRONMENT:-Production}
|
|
- ASPNETCORE_URLS=http://+:${CONTAINER_PORT:-8080}
|
|
|
|
# Virtual display for non-headless browser
|
|
- DISPLAY=:99
|
|
|
|
# CORS Configuration (for Home Assistant integration)
|
|
# Multiple origins can be comma-separated: "http://homeassistant.local:8123,http://192.168.1.100:8123"
|
|
# Use "*" to allow all origins (less secure, but convenient for development)
|
|
- CORS__ALLOWEDORIGINS=${CORS__ALLOWEDORIGINS:-*}
|
|
- CORS__ALLOWEDMETHODS=${CORS__ALLOWEDMETHODS:-GET,POST,OPTIONS}
|
|
- CORS__ALLOWEDHEADERS=${CORS__ALLOWEDHEADERS:-*}
|
|
- CORS__ALLOWCREDENTIALS=${CORS__ALLOWCREDENTIALS:-false}
|
|
|
|
# Application configuration (override appsettings.json)
|
|
# Use double underscore (__) for nested config keys
|
|
- CACHEDIRECTORY=${CACHEDIRECTORY:-/app/cache}
|
|
- CACHERETENTIONHOURS=${CACHERETENTIONHOURS:-24}
|
|
- CACHEEXPIRATIONMINUTES=${CACHEEXPIRATIONMINUTES:-12.5}
|
|
- CACHEMANAGEMENT__CHECKINTERVALMINUTES=${CACHEMANAGEMENT__CHECKINTERVALMINUTES:-5}
|
|
- CACHEMANAGEMENT__INITIALDELAYSECONDS=${CACHEMANAGEMENT__INITIALDELAYSECONDS:-10}
|
|
- CACHEMANAGEMENT__LOCATIONSTAGGERSECONDS=${CACHEMANAGEMENT__LOCATIONSTAGGERSECONDS:-1}
|
|
- CACHECLEANUP__INTERVALHOURS=${CACHECLEANUP__INTERVALHOURS:-1}
|
|
- SCREENSHOT__DYNAMICCONTENTWAITMS=${SCREENSHOT__DYNAMICCONTENTWAITMS:-2000}
|
|
- SCREENSHOT__TILERENDERWAITMS=${SCREENSHOT__TILERENDERWAITMS:-5000}
|
|
- DEBUG__ENABLED=${DEBUG__ENABLED:-true}
|
|
- DEBUG__WAITMS=${DEBUG__WAITMS:-2000}
|
|
- TIMEZONE=${TIMEZONE:-Australia/Brisbane}
|
|
shm_size: '1gb'
|
|
ipc: host
|
|
restart: unless-stopped
|
|
deploy:
|
|
resources:
|
|
reservations:
|
|
devices:
|
|
- driver: nvidia
|
|
count: 1
|
|
capabilities: [gpu]
|
|
|