diff options
author | Ernst Widerberg <ernst@sunet.se> | 2022-06-07 16:19:23 +0200 |
---|---|---|
committer | Ernst Widerberg <ernst@sunet.se> | 2022-06-07 16:19:23 +0200 |
commit | 561754be8fa4d5bd55962e5ea2d918f799366430 (patch) | |
tree | 517b5dcd5f053c8492e8849c1e142c40881a5d53 | |
parent | 4eba70192d8747429d56ab2e2755772859cf2d25 (diff) |
Replace env.sh with .env readable by Docker per default
-rw-r--r-- | .env | 3 | ||||
-rw-r--r-- | env.sh | 3 | ||||
-rwxr-xr-x | make-inject-env.sh | 7 |
3 files changed, 6 insertions, 7 deletions
@@ -0,0 +1,3 @@ +PER_PAGE=5 +COLLECTOR_URL=https://localhost:1443 +JWT_URL=http://localhost:8000/api/v1.0/auth @@ -1,3 +0,0 @@ -export PER_PAGE=5 -export COLLECTOR_URL=https://localhost:1443 -export JWT_URL=http://localhost:8000/api/v1.0/auth diff --git a/make-inject-env.sh b/make-inject-env.sh index 405ca1c..d28a584 100755 --- a/make-inject-env.sh +++ b/make-inject-env.sh @@ -1,7 +1,6 @@ #!/usr/bin/env bash -source env.sh -INJECT_FILE_SRC="inject_template.js" -INJECT_FILE_DST="dist/inject.js" mkdir -p dist -envsubst < "${INJECT_FILE_SRC}" > "${INJECT_FILE_DST}" +INJECT_FILE_SRC=inject_template.js +INJECT_FILE_DST=dist/inject.js +env $(cat .env | xargs) envsubst < $INJECT_FILE_SRC > $INJECT_FILE_DST |