mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
Add stacksmith scripts
This commit is contained in:
parent
38e8f52293
commit
d6127082e9
3 changed files with 117 additions and 0 deletions
22
stacksmith/user-scripts/boot.sh
Executable file
22
stacksmith/user-scripts/boot.sh
Executable file
|
|
@ -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}"
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue