9 lines
496 B
Plaintext
9 lines
496 B
Plaintext
#!/command/with-contenv bash
|
|
set -euo pipefail
|
|
OPTIONS_FILE=/data/options.json
|
|
HOST=$(jq -r '.opensearch_host // "http://localhost"' "$OPTIONS_FILE" 2>/dev/null || echo "http://localhost")
|
|
PORT=$(jq -r '.opensearch_port // 9200' "$OPTIONS_FILE" 2>/dev/null || echo 9200)
|
|
OPTS_HOSTS="${HOST}:${PORT}"
|
|
echo "[s6-run] Starting OpenSearch Dashboards connecting to ${OPTS_HOSTS}"
|
|
exec /usr/share/opensearch-dashboards/bin/opensearch-dashboards --opensearch.hosts="${OPTS_HOSTS}" --server.host=0.0.0.0
|