From ed45f8e3dee3bdbd94206a396de090481aca9164 Mon Sep 17 00:00:00 2001 From: Rafael Lopes Date: Fri, 24 Apr 2026 15:22:34 -0300 Subject: [PATCH] =?UTF-8?q?Fix:=20Corre=C3=A7=C3=A3o=20do=20Entrypoint?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/core/config.py | 2 +- infra/entrypoint.sh | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) 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."