mirror of
https://github.com/invoiceninja/dockerfiles.git
synced 2025-12-31 19:47:25 +01:00
Use logging with timestamp (#346)
This commit is contained in:
@@ -109,10 +109,10 @@ file_env 'MAILGUN_SECRET'
|
||||
file_env 'S3_KEY'
|
||||
file_env 'S3_SECRET'
|
||||
|
||||
# Run Laravel stuff
|
||||
# Run IN/Laravel stuff
|
||||
if [[ "$1" == "supervisord" ]] || [[ "$1" == "php-fpm" ]]; then
|
||||
echo "Initialising Laravel..."
|
||||
. laravel-init.sh
|
||||
in_log INFO "Initialising Invoice Ninja..."
|
||||
. invoiceninja-init.sh
|
||||
fi
|
||||
|
||||
exec docker-php-entrypoint "$@"
|
||||
|
||||
@@ -12,14 +12,14 @@ docker_process_init_files() {
|
||||
# https://github.com/docker-library/postgres/issues/450#issuecomment-393167936
|
||||
# https://github.com/docker-library/postgres/pull/452
|
||||
if [ -x "$f" ]; then
|
||||
in_log "$0: running $f"
|
||||
in_log INFO "$0: running $f"
|
||||
"$f"
|
||||
else
|
||||
in_log "$0: sourcing $f"
|
||||
in_log INFO "$0: sourcing $f"
|
||||
. "$f"
|
||||
fi
|
||||
;;
|
||||
*) in_log "$0: ignoring $f" ;;
|
||||
*) in_log INFO "$0: ignoring $f" ;;
|
||||
esac
|
||||
echo
|
||||
done
|
||||
@@ -31,9 +31,8 @@ php artisan optimize
|
||||
# Check if DB works, if not crash the app.
|
||||
DB_READY=$(php artisan tinker --execute='echo app()->call("App\Utils\SystemHealth@dbCheck")["success"];')
|
||||
if [ "$DB_READY" != "1" ]; then
|
||||
echo "Error connecting to DB"
|
||||
php artisan migrate:status # Print verbose error
|
||||
exit 1
|
||||
in_error "Error connecting to DB"
|
||||
fi
|
||||
|
||||
php artisan migrate --force
|
||||
Reference in New Issue
Block a user