Fix: Correção do Entrypoint
All checks were successful
Deploy WiFi-ETL Prod / deploy (push) Successful in 46s

This commit is contained in:
Rafael Alves Lopes 2026-04-24 15:22:34 -03:00
parent 78bf95fb1e
commit ed45f8e3de
2 changed files with 3 additions and 9 deletions

View File

@ -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")

View File

@ -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."