Spaces:
Runtime error
Runtime error
| version: '3.8' | |
| services: | |
| # MongoDB service | |
| mongodb: | |
| image: mongo:7.0 | |
| container_name: telegram_streamer_mongodb | |
| restart: unless-stopped | |
| ports: | |
| - "27017:27017" | |
| environment: | |
| MONGO_INITDB_ROOT_USERNAME: admin | |
| MONGO_INITDB_ROOT_PASSWORD: password123 | |
| MONGO_INITDB_DATABASE: telegram_streamer | |
| volumes: | |
| - mongodb_data:/data/db | |
| networks: | |
| - streamer_network | |
| healthcheck: | |
| test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet | |
| interval: 10s | |
| timeout: 5s | |
| retries: 5 | |
| # Telegram Streamer application | |
| app: | |
| build: . | |
| container_name: telegram_streamer_app | |
| restart: unless-stopped | |
| ports: | |
| - "8000:8000" | |
| environment: | |
| # Telegram API (REPLACE WITH YOUR VALUES) | |
| API_ID: ${API_ID} | |
| API_HASH: ${API_HASH} | |
| BOT_TOKEN: ${BOT_TOKEN} | |
| # MongoDB connection | |
| MONGO_URI: mongodb://admin:password123@mongodb:27017/telegram_streamer?authSource=admin | |
| MONGO_DATABASE: telegram_streamer | |
| # Optional: Session strings for multi-session load balancing | |
| SESSION_STRINGS: ${SESSION_STRINGS:-} | |
| # Logging | |
| LOG_LEVEL: INFO | |
| depends_on: | |
| mongodb: | |
| condition: service_healthy | |
| networks: | |
| - streamer_network | |
| healthcheck: | |
| test: ["CMD", "curl", "-f", "http://localhost:8000/health"] | |
| interval: 30s | |
| timeout: 10s | |
| retries: 3 | |
| start_period: 10s | |
| # Optional: Mongo Express for database management | |
| mongo-express: | |
| image: mongo-express:latest | |
| container_name: telegram_streamer_mongo_express | |
| restart: unless-stopped | |
| ports: | |
| - "8081:8081" | |
| environment: | |
| ME_CONFIG_MONGODB_ADMINUSERNAME: admin | |
| ME_CONFIG_MONGODB_ADMINPASSWORD: password123 | |
| ME_CONFIG_MONGODB_URL: mongodb://admin:password123@mongodb:27017/ | |
| ME_CONFIG_BASICAUTH_USERNAME: admin | |
| ME_CONFIG_BASICAUTH_PASSWORD: admin | |
| depends_on: | |
| - mongodb | |
| networks: | |
| - streamer_network | |
| profiles: | |
| - debug | |
| volumes: | |
| mongodb_data: | |
| driver: local | |
| networks: | |
| streamer_network: | |
| driver: bridge | |