TubeScript-API/docker-compose.yml

35 lines
972 B
YAML

services:
# Servicio FastAPI - Backend API
tubescript-api:
build:
context: .
dockerfile: Dockerfile.api
container_name: tubescript_api
command: uvicorn main:app --host 0.0.0.0 --port 8000 --reload
ports:
- "8000:8000"
volumes:
- ./:/app:rw
- ./cookies.txt:/app/cookies.txt:ro
- ./stream_config.json:/app/stream_config.json:ro
- ./streams_state.json:/app/streams_state.json
- ./data:/app/data
environment:
- PYTHONUNBUFFERED=1
- API_COOKIES_PATH=/app/cookies.txt
# Optional: set API_PROXY when you want the container to use a SOCKS/HTTP proxy (e.g. tor)
- API_PROXY=${API_PROXY:-}
restart: unless-stopped
networks:
- tubescript-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/docs"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
networks:
tubescript-network:
name: tubescript-network