Merge branch 'master' of github.com:alexandernst/bitnami-docker-laravel

This commit is contained in:
Alexander Nestorov
2016-06-30 15:43:10 +02:00
3 changed files with 27 additions and 25 deletions

View File

@@ -33,7 +33,7 @@ USER bitnami
RUN mkdir /tmp/app && cd /tmp/app && composer create-project "laravel/laravel=5.2.31" /tmp/app --prefer-dist
ENV BITNAMI_APP_NAME=laravel
ENV BITNAMI_IMAGE_VERSION=5.2.31-r2
ENV BITNAMI_IMAGE_VERSION=5.2.31-r3
WORKDIR /app
EXPOSE 3000

View File

@@ -10,7 +10,7 @@ services:
myapp:
tty: true
image: bitnami/laravel:5.2.31-r1
image: bitnami/laravel:5.2.31-r3
environment:
- DB_HOST=mariadb
- DB_USERNAME=my_user

View File

@@ -42,32 +42,34 @@ log () {
echo -e "\033[0;33m$(date "+%H:%M:%S")\033[0;37m ==> $1."
}
if ! app_present; then
log "Creating laravel application"
\cp -r /tmp/app/ /
fi
if [ "${1}" == "php" -a "$2" == "artisan" -a "$3" == "serve" ]; then
if ! app_present; then
log "Creating laravel application"
\cp -r /tmp/app/ /
fi
if ! dependencies_up_to_date; then
log "Installing/Updating Laravel dependencies (composer)"
composer update
log "Dependencies updated"
fi
if ! dependencies_up_to_date; then
log "Installing/Updating Laravel dependencies (composer)"
composer update
log "Dependencies updated"
fi
wait_for_db
wait_for_db
if ! fresh_container; then
echo "#########################################################################"
echo " "
echo " App initialization skipped: "
echo " Delete the file $INIT_SEM and restart the container to reinitialize "
echo " You can alternatively run specific commands using docker-compose exec "
echo " e.g docker-compose exec myapp php artisan make:console FooCommand "
echo " "
echo "#########################################################################"
else
setup_db
log "Initialization finished"
touch $INIT_SEM
if ! fresh_container; then
echo "#########################################################################"
echo " "
echo " App initialization skipped: "
echo " Delete the file $INIT_SEM and restart the container to reinitialize "
echo " You can alternatively run specific commands using docker-compose exec "
echo " e.g docker-compose exec myapp php artisan make:console FooCommand "
echo " "
echo "#########################################################################"
else
setup_db
log "Initialization finished"
touch $INIT_SEM
fi
fi
exec /entrypoint.sh "$@"