summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErnst Widerberg <ernst@sunet.se>2022-06-07 16:19:23 +0200
committerErnst Widerberg <ernst@sunet.se>2022-06-07 16:19:23 +0200
commit561754be8fa4d5bd55962e5ea2d918f799366430 (patch)
tree517b5dcd5f053c8492e8849c1e142c40881a5d53
parent4eba70192d8747429d56ab2e2755772859cf2d25 (diff)
Replace env.sh with .env readable by Docker per default
-rw-r--r--.env3
-rw-r--r--env.sh3
-rwxr-xr-xmake-inject-env.sh7
3 files changed, 6 insertions, 7 deletions
diff --git a/.env b/.env
new file mode 100644
index 0000000..a6f491e
--- /dev/null
+++ b/.env
@@ -0,0 +1,3 @@
+PER_PAGE=5
+COLLECTOR_URL=https://localhost:1443
+JWT_URL=http://localhost:8000/api/v1.0/auth
diff --git a/env.sh b/env.sh
deleted file mode 100644
index 57c6c9a..0000000
--- a/env.sh
+++ /dev/null
@@ -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