version: '3.8' services: # PostgreSQL database for NocoDB postgres: image: postgres:15-alpine environment: POSTGRES_DB: nocodb POSTGRES_USER: nocodb POSTGRES_PASSWORD: nocodb_password volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U nocodb"] interval: 5s timeout: 5s retries: 5 networks: - scheduler_network # NocoDB service nocodb: image: nocodb/nocodb:latest ports: - "8080:8080" environment: NC_DB: "pg://postgres:5432?u=nocodb&p=nocodb_password&d=nocodb" NC_AUTH_JWT_SECRET: "test_jwt_secret_key_12345" NC_PUBLIC_URL: "http://localhost:8080" depends_on: postgres: condition: service_healthy volumes: - nocodb_data:/usr/app/data healthcheck: test: ["CMD-SHELL", "curl -f http://localhost:8080/api/v1/health || exit 1"] interval: 10s timeout: 5s retries: 10 networks: - scheduler_network # RTMP Server for streaming rtmp: image: tiangolo/nginx-rtmp ports: - "1935:1935" - "8081:80" volumes: - ./nginx-rtmp.conf:/etc/nginx/nginx.conf:ro - rtmp_recordings:/tmp/recordings networks: - scheduler_network # Initialization service - sets up test data init: build: context: . dockerfile: Dockerfile.init depends_on: nocodb: condition: service_healthy environment: NOCODB_URL: "http://nocodb:8080" NOCODB_EMAIL: "admin@test.com" NOCODB_PASSWORD: "admin123" volumes: - raw_movies:/raw_movies - config_data:/tmp - ./init-data.sh:/init-data.sh:ro networks: - scheduler_network command: ["/bin/bash", "/init-data.sh"] # Movie scheduler service scheduler: build: context: . dockerfile: Dockerfile depends_on: nocodb: condition: service_healthy rtmp: condition: service_started init: condition: service_completed_successfully environment: RAW_DIR: "/raw_movies" FINAL_DIR: "/final_movies" WHISPER_MODEL: "/models/ggml-base.bin" volumes: - raw_movies:/raw_movies - final_movies:/final_movies - config_data:/config:ro - ./scheduler.db:/app/scheduler.db - ./start-scheduler.sh:/start-scheduler.sh:ro networks: - scheduler_network restart: unless-stopped command: ["/bin/bash", "/start-scheduler.sh"] volumes: postgres_data: nocodb_data: raw_movies: final_movies: rtmp_recordings: config_data: networks: scheduler_network: driver: bridge