Merge branch 'develop' into v480

* develop:
  Update Docker files slightly (yes I am a nitpicker).
  - Fixed copying Dockerfile.amd64 to Dockerfile.arm in the 2nd last commit
  entrypoint.sh: Wait for DB to start up
  Misc Optimizations: Changes on Dockerfile*

# Conflicts:
#	.deploy/docker/entrypoint.sh
This commit is contained in:
James Cole
2019-03-24 14:56:08 +01:00
6 changed files with 277 additions and 71 deletions

View File

@@ -51,6 +51,18 @@ echo "Discover packages..."
php artisan package:discover
echo "Run various artisan commands..."
. $FIREFLY_PATH/.env
if [[ -z "$DB_PORT" ]]; then
if [[ $DB_CONNECTION == "pgsql" ]]; then
DB_PORT=5432
elif [[ $DB_CONNECTION == "mysql" ]]; then
DB_PORT=3306
fi
fi
if [[ ! -z "$DB_PORT" ]]; then
$FIREFLY_PATH/.deploy/docker/wait-for-it.sh "${DB_HOST}:${DB_PORT}" -- echo "db is up. Time to execute artisan commands"
fi
#env $(grep -v "^\#" .env | xargs)
php artisan cache:clear
php artisan migrate --seed
php artisan firefly:decrypt-all
@@ -91,4 +103,4 @@ php artisan cache:clear
php artisan firefly:instructions install
echo "Go!"
exec apache2-foreground
exec apache2-foreground