From 561754be8fa4d5bd55962e5ea2d918f799366430 Mon Sep 17 00:00:00 2001 From: Ernst Widerberg Date: Tue, 7 Jun 2022 16:19:23 +0200 Subject: Replace env.sh with .env readable by Docker per default --- .env | 3 +++ env.sh | 3 --- make-inject-env.sh | 7 +++---- 3 files changed, 6 insertions(+), 7 deletions(-) create mode 100644 .env delete mode 100644 env.sh 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 -- cgit v1.1