Files
ExcaliDash/frontend/docker-entrypoint.sh
T
Adrian Acala 05b787bc27 Add backend URL configuration for frontend and update nginx setup
- Added BACKEND_URL environment variable to docker-compose for frontend service.
- Introduced a new entrypoint script to configure nginx with the BACKEND_URL at runtime.
- Created a template for nginx configuration to handle API and WebSocket requests dynamically.
- Updated README with instructions for configuring reverse proxy setups.

Fixes #12
2025-11-28 17:56:19 -08:00

16 lines
435 B
Bash

#!/bin/sh
set -e
# Set default backend URL if not provided
export BACKEND_URL="${BACKEND_URL:-backend:8000}"
echo "Configuring nginx with BACKEND_URL: ${BACKEND_URL}"
# Substitute environment variables in nginx config template
# Only substitute BACKEND_URL, preserve nginx variables like $http_upgrade
envsubst '${BACKEND_URL}' < /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf
# Execute the main command (nginx)
exec "$@"