Built multi stage image for v5

This commit is contained in:
Holger Lösken
2020-05-27 19:08:42 +02:00
parent 4350619c64
commit b190c8e633
3 changed files with 66 additions and 38 deletions

View File

@@ -12,7 +12,7 @@ BAK_LOGO_PATH=/var/www/app/docker-backup-public/logo/
if [ ! -d /var/www/app/storage ]; then
cp -Rp $BAK_STORAGE_PATH /var/www/app/storage
else
if [ -d $BAK_STORAGE_PATH]; then
if [ -d $BAK_STORAGE_PATH ]; then
IN_STORAGE_BACKUP="$(ls $BAK_STORAGE_PATH)"
for path in $IN_STORAGE_BACKUP; do
if [ ! -e "/var/www/app/storage/$path" ]; then
@@ -45,4 +45,10 @@ fi
chown invoiceninja:www-data /var/www/app/storage
chown invoiceninja:www-data /var/www/app/public
# Database migrations and seeding
php artisan migrate --force
php artisan db:seed --force
php artisan optimize
exec docker-php-entrypoint "$@"