diff options
author | Jose Fuentes <jsfuentescastillo@gmail.com> | 2018-12-13 20:27:35 +0100 |
---|---|---|
committer | Jose Fuentes <jsfuentescastillo@gmail.com> | 2018-12-13 20:27:35 +0100 |
commit | d6127082e9dba7978c67ddfd23df4a5fff883366 (patch) | |
tree | 094bbe9823d56dae794133b2fa38398c186b4fbe /stacksmith/user-scripts/boot.sh | |
parent | 38e8f522931f0912e86cf35dcc288faa2a47245a (diff) | |
download | wekan-d6127082e9dba7978c67ddfd23df4a5fff883366.tar.gz wekan-d6127082e9dba7978c67ddfd23df4a5fff883366.tar.bz2 wekan-d6127082e9dba7978c67ddfd23df4a5fff883366.zip |
Add stacksmith scripts
Diffstat (limited to 'stacksmith/user-scripts/boot.sh')
-rwxr-xr-x | stacksmith/user-scripts/boot.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/stacksmith/user-scripts/boot.sh b/stacksmith/user-scripts/boot.sh new file mode 100755 index 00000000..2e3f1921 --- /dev/null +++ b/stacksmith/user-scripts/boot.sh @@ -0,0 +1,22 @@ +#!/bin/bash +set -eux + +#!/bin/bash + +set -euo pipefail + +# This file will store the config env variables needed by the app +readonly CONF=/build/env.config + +cat >"${CONF}" <<'EOF' +export MONGO_URL=mongodb://{{DATABASE_USER}}:{{DATABASE_PASSWORD}}@{{DATABASE_HOST}}:{{DATABASE_PORT}}/{{DATABASE_NAME}} +export ROOT_URL=http://localhost +export PORT=3000 +EOF + +sed -i -e "s/{{DATABASE_USER}}/${DATABASE_USER}/" "${CONF}" +sed -i -e "s/{{DATABASE_PASSWORD}}/${DATABASE_PASSWORD}/" "${CONF}" +sed -i -e "s/{{DATABASE_HOST}}/${DATABASE_HOST}/" "${CONF}" +sed -i -e "s/{{DATABASE_PORT}}/${DATABASE_PORT}/" "${CONF}" +sed -i -e "s/{{DATABASE_NAME}}/${DATABASE_NAME}/" "${CONF}" + |