diff --git a/app/core/config.py b/app/core/config.py index 347256a..ff503e2 100644 --- a/app/core/config.py +++ b/app/core/config.py @@ -5,7 +5,7 @@ load_dotenv() # PostgreSQL DB_HOST = os.getenv("DB_HOST") -DB_PORT = int(os.getenv("DB_PORT")) +DB_PORT = int(os.getenv("DB_PORT", "5432")) DB_NAME = os.getenv("DB_NAME", "wifi_etl") DB_USER = os.getenv("DB_USER", "postgres") DB_PASSWORD = os.getenv("DB_PASSWORD") diff --git a/infra/entrypoint.sh b/infra/entrypoint.sh index 37ed3cc..49d2539 100644 --- a/infra/entrypoint.sh +++ b/infra/entrypoint.sh @@ -1,14 +1,8 @@ #!/bin/bash echo "=== WiFi ETL Container Starting ===" -# Exporta variáveis do .env para o ambiente do cron -if [ -f /app/.env ]; then - set -a - source /app/.env - set +a - # Persiste no ambiente do cron - printenv | grep -v "^_=" >> /etc/environment -fi +# Persiste variáveis de ambiente para o cron +printenv | grep -v "^_=" >> /etc/environment echo "Executando primeira corrida ETL..." cd /app && python -m app.main || echo "ETL inicial falhou (ver logs). O cron continuará rodando."