| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- version: "3.8"
- services:
- server:
- build:
- context: .
- dockerfile: Dockerfile
- image: video_decode
- container_name: video_decode
- restart: always
- ports:
- - "8000:8000"
- volumes:
- - ./logs:/video_decode/logs
- env_file:
- - .env
- environment:
- - APP_ENV=prod
- entrypoint: ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
- add_score_scheduler:
- build:
- context: .
- dockerfile: Dockerfile
- image: video_decode
- container_name: add_score_scheduler
- restart: always
- volumes:
- - ./logs:/video_decode/logs
- env_file:
- - .env
- environment:
- - APP_ENV=prod
- - ADD_SCORE_CUTOFF_DT=20260429
- - ADD_SCORE_TIMEOUT=2400
- - ADD_SCORE_WORKERS=3
- - ADD_SCORE_START_ID=1130
- - ADD_SCORE_INTERVAL_SECONDS=600
- - ADD_SCORE_DRY_RUN=
- entrypoint:
- - sh
- - -lc
- - |
- while true; do
- python scheduler/add_score_job.py \
- --cutoff-dt "$$ADD_SCORE_CUTOFF_DT" \
- --timeout "$$ADD_SCORE_TIMEOUT" \
- --workers "$$ADD_SCORE_WORKERS" \
- --start-id "$$ADD_SCORE_START_ID" \
- $${ADD_SCORE_DRY_RUN:+--dry-run};
- sleep "$$ADD_SCORE_INTERVAL_SECONDS";
- done
|