67 lines
1.8 KiB
YAML
67 lines
1.8 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
# Servicio FastAPI - Backend API
|
|
tubescript-api:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: tubescript_api
|
|
ports:
|
|
- "8080:8000"
|
|
volumes:
|
|
- ./cookies.txt:/app/cookies.txt:ro # Solo lectura
|
|
- ./stream_config.json:/app/stream_config.json
|
|
- ./streams_state.json:/app/streams_state.json
|
|
- ./data:/app/data # Directorio para datos persistentes
|
|
environment:
|
|
- PYTHONUNBUFFERED=1
|
|
restart: unless-stopped
|
|
networks:
|
|
- tubescript-network
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8000/docs"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
|
|
# Servicio Streamlit - Frontend Panel Web
|
|
streamlit-panel:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: streamlit_panel
|
|
command: streamlit run streamlit_app.py --server.port=8501 --server.address=0.0.0.0 --server.headless=true --browser.gatherUsageStats=false
|
|
ports:
|
|
- "8501:8501"
|
|
volumes:
|
|
- ./cookies.txt:/app/cookies.txt:ro # Solo lectura
|
|
- ./stream_config.json:/app/stream_config.json
|
|
- ./streams_state.json:/app/streams_state.json
|
|
- ./data:/app/data # Directorio para datos persistentes
|
|
environment:
|
|
- PYTHONUNBUFFERED=1
|
|
- API_URL=${API_URL:-http://tubescript-api:8000} # URL de la API, configurable desde .env
|
|
restart: unless-stopped
|
|
depends_on:
|
|
tubescript-api:
|
|
condition: service_healthy
|
|
networks:
|
|
- tubescript-network
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8501"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
|
|
networks:
|
|
tubescript-network:
|
|
driver: bridge
|
|
|
|
volumes:
|
|
data:
|
|
driver: local
|
|
|