2019-08-16 19:38:26 +03:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
set -e
|
|
|
|
|
|
|
|
cd /etc/shlink
|
|
|
|
|
|
|
|
echo "Creating fresh database if needed..."
|
|
|
|
php bin/cli db:create -n -q
|
|
|
|
|
|
|
|
echo "Updating database..."
|
|
|
|
php bin/cli db:migrate -n -q
|
|
|
|
|
|
|
|
echo "Generating proxies..."
|
|
|
|
php vendor/doctrine/orm/bin/doctrine.php orm:generate-proxies -n -q
|
|
|
|
|
2020-04-06 21:52:33 +03:00
|
|
|
echo "Clearing entities cache..."
|
|
|
|
php vendor/doctrine/orm/bin/doctrine.php orm:clear-cache:metadata -n -q
|
|
|
|
|
2019-08-16 19:38:26 +03:00
|
|
|
# When restarting the container, swoole might think it is already in execution
|
|
|
|
# This forces the app to be started every second until the exit code is 0
|
2020-01-01 23:11:53 +03:00
|
|
|
until php vendor/mezzio/mezzio-swoole/bin/mezzio-swoole start; do sleep 1 ; done
|