docker-entrypoint.sh 599 B

1234567891011121314151617181920
  1. #!/usr/bin/env sh
  2. set -e
  3. cd /etc/shlink
  4. echo "Creating fresh database if needed..."
  5. php bin/cli db:create -n -q
  6. echo "Updating database..."
  7. php bin/cli db:migrate -n -q
  8. echo "Generating proxies..."
  9. php vendor/doctrine/orm/bin/doctrine.php orm:generate-proxies -n -q
  10. echo "Clearing entities cache..."
  11. php vendor/doctrine/orm/bin/doctrine.php orm:clear-cache:metadata -n -q
  12. # When restarting the container, swoole might think it is already in execution
  13. # This forces the app to be started every second until the exit code is 0
  14. until php vendor/bin/laminas mezzio:swoole:start; do sleep 1 ; done