Skip to content

Commit

Permalink
docker: Fix upgrades (#6680)
Browse files Browse the repository at this point in the history
Until now, the Docker image was not performing actions that are
necessary for an upgrade completion. That is considered an
anti-pattern.

See https://snipe-it.readme.io/docs/upgrading for more information.
  • Loading branch information
lubo authored and snipe committed Feb 14, 2019
1 parent cd1ef1d commit 9183de5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,9 @@ then
cp -ax /var/www/html/vendor/laravel/passport/database/migrations/* /var/www/html/database/migrations/
fi

php artisan migrate --force
php artisan config:clear
php artisan config:cache

. /etc/apache2/envvars
exec apache2 -DNO_DETACH < /dev/null
5 changes: 5 additions & 0 deletions docker/entrypoint_alpine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,10 @@ if [ ! -f "/var/www/html/database/migrations/*create_oauth*" ]
then
cp -a /var/www/html/vendor/laravel/passport/database/migrations/* /var/www/html/database/migrations/
fi

php artisan migrate --force
php artisan config:clear
php artisan config:cache

export APACHE_LOG_DIR=/var/log/apache2
exec httpd -DNO_DETACH < /dev/null

0 comments on commit 9183de5

Please sign in to comment.