services: postgres: image: postgres:16-alpine environment: POSTGRES_DB: matchlivetv POSTGRES_USER: postgres POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-matchlivetv_dev} volumes: - postgres_data:/var/lib/postgresql/data ports: - "5432:5432" healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 5s timeout: 5s retries: 5 redis: image: redis:7-alpine volumes: - redis_data:/data ports: - "6379:6379" healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 5s timeout: 3s retries: 5 mediamtx: image: bluenviron/mediamtx:latest ports: - "1935:1935" - "8554:8554" - "8888:8888" - "9997:9997" volumes: - ./mediamtx.yml:/mediamtx.yml:ro - ./slates:/slates:ro - recordings:/recordings command: /mediamtx.yml healthcheck: test: ["CMD", "/mediamtx", "--help"] interval: 10s timeout: 5s retries: 3 start_period: 10s rails: build: context: ../backend dockerfile: Dockerfile command: bash -c "bundle check || bundle install && bundle exec rails db:prepare db:seed && bundle exec rails server -b 0.0.0.0 -p 3000" environment: RAILS_ENV: development BUNDLE_WITHOUT: "" BUNDLE_DEPLOYMENT: "0" DATABASE_URL: postgresql://postgres:${POSTGRES_PASSWORD:-matchlivetv_dev}@postgres:5432/matchlivetv REDIS_URL: redis://redis:6379/0 MEDIAMTX_API_URL: http://mediamtx:9997 MEDIAMTX_RTMP_URL: rtmp://mediamtx:1935 MEDIAMTX_WEBHOOK_SECRET: ${MEDIAMTX_WEBHOOK_SECRET:-mediamtx_webhook_dev_secret} RAILS_WEBHOOK_URL: http://rails:3000 SECRET_KEY_BASE: ${SECRET_KEY_BASE:-dev_secret_key_base_change_me_32chars_min} JWT_SECRET: ${JWT_SECRET:-matchlivetv_jwt_dev_secret} YOUTUBE_CLIENT_ID: ${YOUTUBE_CLIENT_ID:-} YOUTUBE_CLIENT_SECRET: ${YOUTUBE_CLIENT_SECRET:-} YOUTUBE_REDIRECT_URI: ${YOUTUBE_REDIRECT_URI:-http://localhost:3000/api/v1/youtube/callback} RAILS_LOG_TO_STDOUT: "true" PRIVACY_CONTROLLER_NAME: ${PRIVACY_CONTROLLER_NAME:-Emiliano Frascaro} PRIVACY_CONTROLLER_ADDRESS: ${PRIVACY_CONTROLLER_ADDRESS:-Via Guido De Ruggiero, 89 - 20142 - Milano (MI)} PRIVACY_CONTACT_EMAIL: ${PRIVACY_CONTACT_EMAIL:-privacy@matchlive.it} MAILER_FROM: ${MAILER_FROM:-Match Live TV } APP_PUBLIC_URL: ${APP_PUBLIC_URL:-http://localhost:3000} STRIPE_SECRET_KEY: ${STRIPE_SECRET_KEY:-} STRIPE_WEBHOOK_SECRET: ${STRIPE_WEBHOOK_SECRET:-} STRIPE_PREMIUM_LIGHT_PRICE_ID: ${STRIPE_PREMIUM_LIGHT_PRICE_ID:-} STRIPE_PREMIUM_FULL_PRICE_ID: ${STRIPE_PREMIUM_FULL_PRICE_ID:-} ports: - "3000:3000" depends_on: postgres: condition: service_healthy redis: condition: service_healthy mediamtx: condition: service_started volumes: - ../backend:/app - recordings:/recordings - bundle_cache:/usr/local/bundle healthcheck: test: ["CMD", "curl", "-f", "http://localhost:3000/up"] interval: 15s timeout: 5s retries: 10 start_period: 60s sidekiq: build: context: ../backend dockerfile: Dockerfile command: bundle exec sidekiq -C config/sidekiq.yml environment: RAILS_ENV: development BUNDLE_WITHOUT: "" BUNDLE_DEPLOYMENT: "0" DATABASE_URL: postgresql://postgres:${POSTGRES_PASSWORD:-matchlivetv_dev}@postgres:5432/matchlivetv REDIS_URL: redis://redis:6379/0 MEDIAMTX_API_URL: http://mediamtx:9997 MEDIAMTX_WEBHOOK_SECRET: ${MEDIAMTX_WEBHOOK_SECRET:-mediamtx_webhook_dev_secret} RAILS_WEBHOOK_URL: http://rails:3000 SECRET_KEY_BASE: ${SECRET_KEY_BASE:-dev_secret_key_base_change_me_32chars_min} JWT_SECRET: ${JWT_SECRET:-matchlivetv_jwt_dev_secret} YOUTUBE_CLIENT_ID: ${YOUTUBE_CLIENT_ID:-} YOUTUBE_CLIENT_SECRET: ${YOUTUBE_CLIENT_SECRET:-} depends_on: rails: condition: service_healthy volumes: - ../backend:/app - bundle_cache:/usr/local/bundle nginx: image: nginx:alpine ports: - "8080:80" volumes: - ./nginx.conf:/etc/nginx/nginx.conf:ro depends_on: - rails volumes: postgres_data: redis_data: recordings: bundle_cache: