clareia / docker-compose.yml
emanoelopes's picture
Add Docker support with docker-compose configuration and environment example
160bec9
raw
history blame
1.33 kB
version: '3.8'
services:
sida:
build: .
container_name: sida-app
ports:
- "8501:8501"
volumes:
# Persistir dados processados
- ./data:/app/data
# Persistir datasets (opcional)
- ./datasets:/app/datasets
# Persistir arquivos de configuração
- ./gw_config.json:/app/gw_config.json
environment:
# Configurações do Streamlit
- STREAMLIT_SERVER_PORT=8501
- STREAMLIT_SERVER_ADDRESS=0.0.0.0
- STREAMLIT_SERVER_HEADLESS=true
- STREAMLIT_BROWSER_GATHER_USAGE_STATS=false
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8501/_stcore/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# Serviço opcional para desenvolvimento com hot-reload
sida-dev:
build: .
container_name: sida-dev
ports:
- "8502:8501"
volumes:
- .:/app
- ./data:/app/data
- ./datasets:/app/datasets
environment:
- STREAMLIT_SERVER_PORT=8501
- STREAMLIT_SERVER_ADDRESS=0.0.0.0
- STREAMLIT_SERVER_HEADLESS=true
- STREAMLIT_BROWSER_GATHER_USAGE_STATS=false
command: ["streamlit", "run", "webapp/home_1.py", "--server.port=8501", "--server.address=0.0.0.0", "--server.runOnSave=true"]
profiles:
- dev