mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-06-14 00:21:01 +00:00
Better docker for the frontend (#240)
* Exclude vscode local settings * Switch the image to nginx with ENV support * Add some doc * Fix travis config * Ignore coverage data * Remove version labels * Fix the Dockerfile according to the recent refactoring * Cleanup * Change maintainer According to @woss request * Fix travis config
This commit is contained in:
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This script is used when the docker container starts and does the magic to
|
||||
# bring the ENV variables to the generated static UI.
|
||||
|
||||
TARGET=./env-config.js
|
||||
|
||||
# Recreate config file
|
||||
echo -n > $TARGET
|
||||
|
||||
declare -a vars=(
|
||||
"SUBSTRATE_TELEMETRY_URL"
|
||||
"SUBSTRATE_TELEMETRY_SAMPLE"
|
||||
)
|
||||
|
||||
echo "window.process_env = {" >> $TARGET
|
||||
for VAR in ${vars[@]}; do
|
||||
echo " $VAR: \"${!VAR}\"," >> $TARGET
|
||||
done
|
||||
echo "}" >> $TARGET
|
||||
Reference in New Issue
Block a user