Files
wekan/entrypoint.sh.tmpl
Moritz 4729fb7824
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
chore: publish 3.3.0+v7.91 release
2025-06-10 14:50:29 +02:00

33 lines
719 B
Bash

#!/bin/bash
set -eu
file_env() {
local var="$1"
local fileVar="${var}_FILE"
local def="${2:-}"
if [ "${!var:-}" ] && [ "${!fileVar:-}" ]; then
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
exit 1
fi
local val="$def"
if [ "${!var:-}" ]; then
val="${!var}"
elif [ "${!fileVar:-}" ]; then
val="$(< "${!fileVar}")"
fi
export "$var"="$val"
unset "$fileVar"
}
file_env "OAUTH2_SECRET"
# https://github.com/wekan/wekan/issues/3585#issuecomment-1021522132
#bash -c "ulimit -s 65500; exec node --stack-size=65500 /build/main.js"
# https://github.com/wekan/wekan/pull/5588
#bash -c "ulimit -n 65500; exec node /build/main.js"
bash -c "exec node /build/main.js"