DaCrow13
commited on
Commit
·
698f424
1
Parent(s):
764b731
Fix Grafana startup: use system config and explict binary path
Browse files
docker/scripts/start_space.sh
CHANGED
|
@@ -115,17 +115,26 @@ else
|
|
| 115 |
GRAFANA_ROOT_URL="http://localhost:3000/grafana/"
|
| 116 |
fi
|
| 117 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 118 |
echo "$(date) - Starting Grafana with Root URL: $GRAFANA_ROOT_URL"
|
| 119 |
-
|
| 120 |
-
#
|
| 121 |
-
|
| 122 |
-
|
|
|
|
| 123 |
cfg:paths.data=/tmp/grafana_data \
|
| 124 |
cfg:paths.logs=/tmp/grafana_logs \
|
| 125 |
cfg:paths.plugins=/usr/share/grafana/plugins \
|
| 126 |
cfg:paths.provisioning=/etc/grafana/provisioning \
|
| 127 |
cfg:server.root_url="$GRAFANA_ROOT_URL" \
|
| 128 |
cfg:server.serve_from_sub_path=true \
|
|
|
|
|
|
|
|
|
|
|
|
|
| 129 |
> /tmp/grafana.log 2>&1 &
|
| 130 |
|
| 131 |
# Wait for Grafana to start
|
|
|
|
| 115 |
GRAFANA_ROOT_URL="http://localhost:3000/grafana/"
|
| 116 |
fi
|
| 117 |
|
| 118 |
+
# Locate Grafana binary
|
| 119 |
+
GRAFANA_BIN=$(which grafana-server || echo "/usr/sbin/grafana-server")
|
| 120 |
+
echo "$(date) - Found Grafana binary at: $GRAFANA_BIN"
|
| 121 |
+
|
| 122 |
echo "$(date) - Starting Grafana with Root URL: $GRAFANA_ROOT_URL"
|
| 123 |
+
|
| 124 |
+
# We use the default config file /etc/grafana/grafana.ini but override paths dynamically
|
| 125 |
+
# This ensures we don't miss any distro-specific defaults.
|
| 126 |
+
$GRAFANA_BIN --homepath=/usr/share/grafana \
|
| 127 |
+
--config=/etc/grafana/grafana.ini \
|
| 128 |
cfg:paths.data=/tmp/grafana_data \
|
| 129 |
cfg:paths.logs=/tmp/grafana_logs \
|
| 130 |
cfg:paths.plugins=/usr/share/grafana/plugins \
|
| 131 |
cfg:paths.provisioning=/etc/grafana/provisioning \
|
| 132 |
cfg:server.root_url="$GRAFANA_ROOT_URL" \
|
| 133 |
cfg:server.serve_from_sub_path=true \
|
| 134 |
+
cfg:server.http_port=3000 \
|
| 135 |
+
cfg:auth.anonymous.enabled=true \
|
| 136 |
+
cfg:auth.anonymous.org_role=Viewer \
|
| 137 |
+
cfg:security.allow_embedding=true \
|
| 138 |
> /tmp/grafana.log 2>&1 &
|
| 139 |
|
| 140 |
# Wait for Grafana to start
|