mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-07 07:55:16 +02:00
fix: use environment variable for BACKEND_URL
This commit is contained in:
parent
871a472985
commit
20b8dc60c1
3 changed files with 12 additions and 1 deletions
|
|
@ -151,7 +151,7 @@ services:
|
|||
image: ${REGISTRY:-dograhai}/dograh-ui:latest
|
||||
environment:
|
||||
# Server-side URL (SSR, internal Docker network)
|
||||
BACKEND_URL: "http://api:8000"
|
||||
BACKEND_URL: "${BACKEND_URL:-http://api:8000}"
|
||||
NODE_ENV: "oss"
|
||||
# Flag to enable/ disable posthog and sentry
|
||||
ENABLE_TELEMETRY: "${ENABLE_TELEMETRY:-true}"
|
||||
|
|
|
|||
|
|
@ -250,6 +250,14 @@ echo -e "${BLUE}[6/8] Updating environment variables...${NC}"
|
|||
if [[ -f ".env" ]]; then
|
||||
# Update BACKEND_API_ENDPOINT to use domain
|
||||
sed -i.bak "s|^BACKEND_API_ENDPOINT=.*|BACKEND_API_ENDPOINT=https://$DOMAIN_NAME|" .env
|
||||
# Update BACKEND_URL if present, otherwise add it
|
||||
if grep -q "^BACKEND_URL=" .env; then
|
||||
sed -i.bak "s|^BACKEND_URL=.*|BACKEND_URL=https://$DOMAIN_NAME|" .env
|
||||
else
|
||||
echo "" >> .env
|
||||
echo "# Backend URL for UI" >> .env
|
||||
echo "BACKEND_URL=https://$DOMAIN_NAME" >> .env
|
||||
fi
|
||||
# Update TURN_HOST to use domain
|
||||
sed -i.bak "s|^TURN_HOST=.*|TURN_HOST=$DOMAIN_NAME|" .env
|
||||
rm -f .env.bak
|
||||
|
|
|
|||
|
|
@ -173,6 +173,9 @@ cat > .env << ENV_EOF
|
|||
# Backend API endpoint (for remote deployment)
|
||||
BACKEND_API_ENDPOINT=https://$SERVER_IP
|
||||
|
||||
# Backend URL for UI
|
||||
BACKEND_URL=https://$SERVER_IP
|
||||
|
||||
# TURN Server Configuration (time-limited credentials via TURN REST API)
|
||||
TURN_HOST=$SERVER_IP
|
||||
TURN_SECRET=$TURN_SECRET
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue