mirror of
https://github.com/Gimanh/taskview-community.git
synced 2026-09-16 23:55:10 +00:00
10 lines
367 B
Bash
Executable File
10 lines
367 B
Bash
Executable File
#!/bin/sh
|
|
# Generates runtime config for the SPA from environment variables.
|
|
# Runs automatically at container start (nginx docker-entrypoint.d).
|
|
set -e
|
|
|
|
if [ -n "${TASKVIEW_API_URL:-}" ]; then
|
|
echo "window.__TASKVIEW_CONFIG__ = { apiUrl: \"${TASKVIEW_API_URL}\" };" > /usr/share/nginx/html/config.js
|
|
echo "TaskView runtime config: apiUrl=${TASKVIEW_API_URL}"
|
|
fi
|