mirror of
https://github.com/bitnami/containers.git
synced 2026-03-06 06:58:01 +08:00
entrypoint: load the module inputs.json file
This commit is contained in:
@@ -1,16 +1,26 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
#!/bin/bash -e
|
||||
|
||||
function initialize {
|
||||
# Package can be "installed" or "unpacked"
|
||||
status=`nami inspect $1`
|
||||
if [[ "$status" == *'"lifecycle": "unpacked"'* ]]; then
|
||||
# Clean up inputs
|
||||
inputs=""
|
||||
if [[ -f /$1-inputs.json ]]; then
|
||||
inputs=--inputs-file=/$1-inputs.json
|
||||
fi
|
||||
nami initialize $1 $inputs
|
||||
fi
|
||||
}
|
||||
|
||||
if [ -f composer.json ]; then
|
||||
composer install
|
||||
fi
|
||||
|
||||
if [[ "$1" == "nami" && "$2" == "start" ]]; then
|
||||
status=`nami inspect php`
|
||||
if [[ "$status" == *'"lifecycle": "unpacked"'* ]]; then
|
||||
nami initialize php
|
||||
fi
|
||||
chown -R :$BITNAMI_APP_USER /bitnami/$BITNAMI_APP_NAME || true
|
||||
if [[ "$1" == "nami" && "$2" == "start" ]] || [[ "$1" == "/init.sh" ]]; then
|
||||
initialize php
|
||||
chown -R :$BITNAMI_APP_USER /bitnami/php || true
|
||||
echo "Starting application ..."
|
||||
fi
|
||||
|
||||
exec /entrypoint.sh "$@"
|
||||
|
||||
2
bitnami/php-fpm/rootfs/php-inputs.json
Normal file
2
bitnami/php-fpm/rootfs/php-inputs.json
Normal file
@@ -0,0 +1,2 @@
|
||||
{
|
||||
}
|
||||
Reference in New Issue
Block a user