mirror of
https://github.com/shlinkio/shlink.git
synced 2025-03-31 13:54:55 +03:00
Updated docker entry point to make sure debugging and verbosity of commands works as expected
This commit is contained in:
parent
d8735e6a91
commit
13d70cd12a
2 changed files with 9 additions and 6 deletions
|
@ -22,7 +22,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com), and this
|
||||||
* *Nothing*
|
* *Nothing*
|
||||||
|
|
||||||
### Fixed
|
### 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
|
## [2.9.3] - 2021-11-15
|
||||||
|
|
|
@ -1,24 +1,27 @@
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# If SHELL_VERBOSITY was not explicitly provided, run commands in quite mode (-q)
|
||||||
|
[ $SHELL_VERBOSITY ] && flags="" || flags="-q"
|
||||||
|
|
||||||
cd /etc/shlink
|
cd /etc/shlink
|
||||||
|
|
||||||
echo "Creating fresh database if needed..."
|
echo "Creating fresh database if needed..."
|
||||||
php bin/cli db:create -n -q
|
php bin/cli db:create -n ${flags}
|
||||||
|
|
||||||
echo "Updating database..."
|
echo "Updating database..."
|
||||||
php bin/cli db:migrate -n -q
|
php bin/cli db:migrate -n ${flags}
|
||||||
|
|
||||||
echo "Generating proxies..."
|
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..."
|
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
|
# Try to download GeoLite2 db file only if the license key env var was defined
|
||||||
if [ ! -z "${GEOLITE_LICENSE_KEY}" ]; then
|
if [ ! -z "${GEOLITE_LICENSE_KEY}" ]; then
|
||||||
echo "Downloading GeoLite2 db file..."
|
echo "Downloading GeoLite2 db file..."
|
||||||
php bin/cli visit:download-db -n -q
|
php bin/cli visit:download-db -n ${flags}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Periodicaly run visit:locate every hour
|
# Periodicaly run visit:locate every hour
|
||||||
|
|
Loading…
Add table
Reference in a new issue