forked from cerc-io/stack-orchestrator
Simple implementation of LACONIC_HOSTED_ENDPOINT (#342)
This commit is contained in:
parent
99aa1fa27e
commit
172300d7bd
@ -2,5 +2,7 @@ services:
|
|||||||
laconic-console:
|
laconic-console:
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
image: cerc/laconic-console-host:local
|
image: cerc/laconic-console-host:local
|
||||||
|
environment:
|
||||||
|
- LACONIC_HOSTED_ENDPOINT=${LACONIC_HOSTED_ENDPOINT:-http://localhost}
|
||||||
ports:
|
ports:
|
||||||
- "80"
|
- "80"
|
||||||
|
@ -26,9 +26,10 @@ do
|
|||||||
kv_pair=(${kv_pair_string//=/ })
|
kv_pair=(${kv_pair_string//=/ })
|
||||||
template_string_to_replace=${kv_pair[0]}
|
template_string_to_replace=${kv_pair[0]}
|
||||||
template_value_to_substitute=${kv_pair[1]}
|
template_value_to_substitute=${kv_pair[1]}
|
||||||
|
template_value_to_substitute_expanded=${template_value_to_substitute//LACONIC_HOSTED_ENDPOINT/${LACONIC_HOSTED_ENDPOINT}}
|
||||||
# Run find and sed to do the substitution of one variable over all files
|
# Run find and sed to do the substitution of one variable over all files
|
||||||
# See: https://stackoverflow.com/a/21479607/1701505
|
# See: https://stackoverflow.com/a/21479607/1701505
|
||||||
echo "Substituting: ${template_string_to_replace} = ${template_value_to_substitute}"
|
echo "Substituting: ${template_string_to_replace} = ${template_value_to_substitute_expanded}"
|
||||||
# Note: we do not escape our strings, on the expectation they do not container the '#' char.
|
# Note: we do not escape our strings, on the expectation they do not container the '#' char.
|
||||||
find ${webapp_files_dir} -type f -exec sed -i 's#'${template_string_to_replace}'#'${template_value_to_substitute}'#g' {} +
|
find ${webapp_files_dir} -type f -exec sed -i 's#'${template_string_to_replace}'#'${template_value_to_substitute_expanded}'#g' {} +
|
||||||
done
|
done
|
||||||
|
@ -2,5 +2,5 @@
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
wns:
|
wns:
|
||||||
server: 'http://localhost:9473/api'
|
server: 'LACONIC_HOSTED_ENDPOINT:9473/api'
|
||||||
webui: 'http://localhost:9473/console'
|
webui: 'LACONIC_HOSTED_ENDPOINT:9473/console'
|
||||||
|
Loading…
Reference in New Issue
Block a user