summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJose Fuentes <jsfuentescastillo@gmail.com>2018-12-14 09:35:48 +0100
committerJose Fuentes <jsfuentescastillo@gmail.com>2018-12-14 11:06:00 +0100
commit7b3e2c58e29de6477dfcd2e2051d241c67266c85 (patch)
tree8cb4047dae5cc26ad91441e5c3667bdf5b7792a2
parentd6127082e9dba7978c67ddfd23df4a5fff883366 (diff)
downloadwekan-7b3e2c58e29de6477dfcd2e2051d241c67266c85.tar.gz
wekan-7b3e2c58e29de6477dfcd2e2051d241c67266c85.tar.bz2
wekan-7b3e2c58e29de6477dfcd2e2051d241c67266c85.zip
Pipefail error
-rw-r--r--Stackerfile.yml9
-rwxr-xr-xstacksmith/user-scripts/boot.sh5
-rwxr-xr-xstacksmith/user-scripts/run.sh1
3 files changed, 14 insertions, 1 deletions
diff --git a/Stackerfile.yml b/Stackerfile.yml
new file mode 100644
index 00000000..26c403c0
--- /dev/null
+++ b/Stackerfile.yml
@@ -0,0 +1,9 @@
+appId: wekan-public/apps/77b94f60-dec9-0136-304e-16ff53095928
+appVersion: "0"
+files:
+ userUploads:
+ - README.md
+ userScripts:
+ build: stacksmith/user-scripts/build.sh
+ boot: stacksmith/user-scripts/boot.sh
+ run: stacksmith/user-scripts/run.sh
diff --git a/stacksmith/user-scripts/boot.sh b/stacksmith/user-scripts/boot.sh
index 2e3f1921..19ea8825 100755
--- a/stacksmith/user-scripts/boot.sh
+++ b/stacksmith/user-scripts/boot.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-set -eux
+set -euxo pipefail
#!/bin/bash
@@ -8,6 +8,9 @@ set -euo pipefail
# This file will store the config env variables needed by the app
readonly CONF=/build/env.config
+# EMAIL_URL can also be set here by injecting another env variable in the template
+# ROOT_URL can also be set at runtime, by querying AWS api or by using ingress annotations in the template for k8s.
+
cat >"${CONF}" <<'EOF'
export MONGO_URL=mongodb://{{DATABASE_USER}}:{{DATABASE_PASSWORD}}@{{DATABASE_HOST}}:{{DATABASE_PORT}}/{{DATABASE_NAME}}
export ROOT_URL=http://localhost
diff --git a/stacksmith/user-scripts/run.sh b/stacksmith/user-scripts/run.sh
index 20d4743b..e7cc6df6 100755
--- a/stacksmith/user-scripts/run.sh
+++ b/stacksmith/user-scripts/run.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -euxo pipefail
readonly CONF=/build/env.config