Files
containers/bitnami/codeigniter/rootfs/app-entrypoint.sh
2017-02-15 12:12:41 +05:30

27 lines
600 B
Bash
Executable File

#!/bin/bash
set -e
PROJECT_DIRECTORY=/app/$CODEIGNITER_PROJECT_NAME
DEPLOY="$@"
log () {
echo -e "\033[0;33m$(date "+%H:%M:%S")\033[0;37m ==> $1."
}
nami restart mariadb
echo "Starting application ..."
if [ "$1" == "php" -a "$2" == "-S" ] ; then
if [ ! -d $PROJECT_DIRECTORY ] ; then
log "Creating example Codeigniter application"
nami execute codeigniter createProject $CODEIGNITER_PROJECT_NAME
log "Codeigniter app created"
else
log "App already created"
cd $PROJECT_DIRECTORY
fi
DEPLOY="$@ -t $PROJECT_DIRECTORY"
fi
exec /entrypoint.sh $DEPLOY