chore: adiciona Docker, scripts e documentacao
- Adiciona Dockerfile e docker-compose para containerizacao - Adiciona docker-entrypoint.sh com inicializacao - Adiciona scripts/seed-admin.js para criar admin inicial - Adiciona docs/ com logos originais CambioReal - Atualiza README.md com instrucoes de uso - Atualiza queries.js com metricas de portfólio Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
32
docker-entrypoint.sh
Normal file
32
docker-entrypoint.sh
Normal file
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
echo "=== BI Agentes Startup ==="
|
||||
|
||||
# Check for Netbird setup key
|
||||
if [ -n "$NETBIRD_SETUP_KEY" ]; then
|
||||
echo "Connecting to Netbird network..."
|
||||
echo "Management URL: ${NETBIRD_MANAGEMENT_URL:-https://netbird.cambioreal.com}"
|
||||
|
||||
# Start netbird daemon directly (not via systemd - doesn't work in containers)
|
||||
MGMT_URL="${NETBIRD_MANAGEMENT_URL:-https://netbird.cambioreal.com}"
|
||||
|
||||
# Run netbird daemon in background
|
||||
netbird service run &
|
||||
sleep 3
|
||||
|
||||
# Connect using setup key and management URL
|
||||
netbird up --setup-key "$NETBIRD_SETUP_KEY" --management-url "$MGMT_URL" &
|
||||
|
||||
# Wait for connection
|
||||
echo "Waiting for Netbird connection..."
|
||||
sleep 10
|
||||
|
||||
# Check connection status
|
||||
netbird status || echo "Netbird connection pending..."
|
||||
else
|
||||
echo "WARNING: NETBIRD_SETUP_KEY not set. Database connection may fail."
|
||||
fi
|
||||
|
||||
echo "Starting BI Agentes server..."
|
||||
exec node server.js
|
||||
Reference in New Issue
Block a user