adds app-entrypoint.sh to initialize ruby module at launch

This commit is contained in:
Sameer Naik
2017-01-11 21:10:33 +05:30
parent 3cb7e1b6ae
commit 5909a76c94
2 changed files with 24 additions and 1 deletions

View File

@@ -0,0 +1,19 @@
#!/bin/bash -e
function initialize {
# Package can be "installed" or "unpacked"
status=`nami inspect $1`
if [[ "$status" == *'"lifecycle": "unpacked"'* ]]; then
inputs=""
if [[ -f /$1-inputs.json ]]; then
inputs=--inputs-file=/$1-inputs.json
fi
nami initialize $1 $inputs
fi
}
for module in ruby; do
initialize $module
done
exec /entrypoint.sh "$@"