Build [v1.9.11] (The Convergence: Manual Login & Runtime Discovery)

This commit is contained in:
Daniel Bedeleanu
2026-04-13 22:15:57 +03:00
parent bdf6d605cd
commit 9d7e4f0ca3
3 changed files with 75 additions and 28 deletions

View File

@@ -14,6 +14,17 @@ if [ -d "/app/logs" ]; then
chown -R nextjs:nodejs /app/logs
fi
# Generate network.json for frontend runtime discovery
echo "🐳 [Docker] Generating public/network.json..."
cat <<EOF > /app/public/network.json
{
"SERVER_IP": "${SERVER_IP:-localhost}",
"BACKEND_PORT": ${BACKEND_PORT:-8000},
"BACKEND_SSL_PORT": ${BACKEND_SSL_PORT:-8908}
}
EOF
chown nextjs:nodejs /app/public/network.json
# Hand off to the application server as the nextjs user
echo "🐳 [Docker] Starting Next.js standalone server as nextjs user..."
exec su-exec nextjs node server.js