diff --git a/CHANGELOG.md b/CHANGELOG.md index b7f49abe..b5729915 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,7 +22,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com), and this * *Nothing* ### Fixed -* *Nothing* +* [#1206](https://github.com/shlinkio/shlink/issues/1206) Fixed debugging of the docker image, so that it does not run the commands with `-q` when the `SHELL_VERBOSITY` env var has been provided. ## [2.9.3] - 2021-11-15 diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh index dff3ae98..8f48e20a 100644 --- a/docker/docker-entrypoint.sh +++ b/docker/docker-entrypoint.sh @@ -1,24 +1,27 @@ #!/usr/bin/env sh set -e +# If SHELL_VERBOSITY was not explicitly provided, run commands in quite mode (-q) +[ $SHELL_VERBOSITY ] && flags="" || flags="-q" + cd /etc/shlink echo "Creating fresh database if needed..." -php bin/cli db:create -n -q +php bin/cli db:create -n ${flags} echo "Updating database..." -php bin/cli db:migrate -n -q +php bin/cli db:migrate -n ${flags} echo "Generating proxies..." -php vendor/doctrine/orm/bin/doctrine.php orm:generate-proxies -n -q +php vendor/doctrine/orm/bin/doctrine.php orm:generate-proxies -n ${flags} echo "Clearing entities cache..." -php vendor/doctrine/orm/bin/doctrine.php orm:clear-cache:metadata -n -q +php vendor/doctrine/orm/bin/doctrine.php orm:clear-cache:metadata -n ${flags} # Try to download GeoLite2 db file only if the license key env var was defined if [ ! -z "${GEOLITE_LICENSE_KEY}" ]; then echo "Downloading GeoLite2 db file..." - php bin/cli visit:download-db -n -q + php bin/cli visit:download-db -n ${flags} fi # Periodicaly run visit:locate every hour