82 lines
No EOL
2.1 KiB
YAML
82 lines
No EOL
2.1 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
predictor:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: predictor-dev
|
|
ports:
|
|
- "8080:8080"
|
|
environment:
|
|
# GRIB Configuration
|
|
- GSN_PREDICTOR_GRIB_DIR=/tmp/grib
|
|
- GSN_PREDICTOR_GRIB_TTL=24h
|
|
- GSN_PREDICTOR_GRIB_CACHE_TTL=1h
|
|
- GSN_PREDICTOR_GRIB_PARALLEL=4
|
|
- GSN_PREDICTOR_GRIB_TIMEOUT=30s
|
|
- GSN_PREDICTOR_GRIB_DATASET_URL=https://nomads.ncep.noaa.gov/
|
|
|
|
# Redis Configuration
|
|
- GSN_PREDICTOR_REDIS_HOST=redis
|
|
- GSN_PREDICTOR_REDIS_PORT=6379
|
|
- GSN_PREDICTOR_REDIS_PASSWORD=
|
|
- GSN_PREDICTOR_REDIS_DB=0
|
|
|
|
# Scheduler Configuration
|
|
- GSN_PREDICTOR_SCHEDULER_ENABLED=true
|
|
|
|
# GRIB Updater Job Configuration
|
|
- GSN_PREDICTOR_GRIB_UPDATER_INTERVAL=6h
|
|
- GSN_PREDICTOR_GRIB_UPDATER_TIMEOUT=45m
|
|
|
|
# REST Transport Configuration
|
|
- GSN_PREDICTOR_REST_HOST=0.0.0.0
|
|
- GSN_PREDICTOR_REST_PORT=8080
|
|
- GSN_PREDICTOR_REST_READ_TIMEOUT=30s
|
|
- GSN_PREDICTOR_REST_WRITE_TIMEOUT=30s
|
|
- GSN_PREDICTOR_REST_IDLE_TIMEOUT=60s
|
|
volumes:
|
|
- grib_data:/tmp/grib
|
|
- .:/app
|
|
- /app/predictor
|
|
depends_on:
|
|
redis:
|
|
condition: service_healthy
|
|
networks:
|
|
- predictor-network
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8080/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
|
|
redis:
|
|
image: redis:7.2-alpine
|
|
container_name: predictor-redis-dev
|
|
ports:
|
|
- "6379:6379"
|
|
volumes:
|
|
- redis_data:/data
|
|
networks:
|
|
- predictor-network
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 10s
|
|
timeout: 3s
|
|
retries: 5
|
|
start_period: 10s
|
|
command: redis-server --appendonly yes --maxmemory 256mb --maxmemory-policy allkeys-lru
|
|
|
|
volumes:
|
|
grib_data:
|
|
driver: local
|
|
redis_data:
|
|
driver: local
|
|
|
|
networks:
|
|
predictor-network:
|
|
driver: bridge |