mirror of
https://github.com/shlinkio/shlink.git
synced 2024-11-21 16:38:37 -06:00
Update docker entry point to use new shlink-installer init command
This commit is contained in:
parent
bd41ebef9f
commit
794d926e3a
@ -49,7 +49,7 @@
|
||||
"shlinkio/shlink-config": "^2.4",
|
||||
"shlinkio/shlink-event-dispatcher": "dev-main#8c677ae as 3.0",
|
||||
"shlinkio/shlink-importer": "dev-main#6b63b12 as 5.1",
|
||||
"shlinkio/shlink-installer": "dev-develop#0e015f8 as 8.4",
|
||||
"shlinkio/shlink-installer": "dev-develop#9b7a090 as 8.4",
|
||||
"shlinkio/shlink-ip-geolocation": "^3.2",
|
||||
"shlinkio/shlink-json": "^1.0",
|
||||
"spiral/roadrunner": "^2023.1",
|
||||
|
@ -1,29 +1,17 @@
|
||||
#!/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 ${flags}
|
||||
flags="--clear-db-cache"
|
||||
|
||||
echo "Updating database..."
|
||||
php bin/cli db:migrate -n ${flags}
|
||||
|
||||
echo "Generating proxies..."
|
||||
php bin/doctrine orm:generate-proxies -n ${flags}
|
||||
|
||||
echo "Clearing entities cache..."
|
||||
php bin/doctrine orm:clear-cache:metadata -n ${flags}
|
||||
|
||||
# Try to download GeoLite2 db file only if the license key env var was defined and skipping was not explicitly set
|
||||
if [ ! -z "${GEOLITE_LICENSE_KEY}" ] && [ "${SKIP_INITIAL_GEOLITE_DOWNLOAD}" != "true" ]; then
|
||||
echo "Downloading GeoLite2 db file..."
|
||||
php bin/cli visit:download-db -n ${flags}
|
||||
# Skip downloading GeoLite2 db file if the license key env var was not defined or skipping was explicitly set
|
||||
if [ -z "${GEOLITE_LICENSE_KEY}" ] || [ "${SKIP_INITIAL_GEOLITE_DOWNLOAD}" == "true" ]; then
|
||||
flags="${flags} --skip-download-geolite"
|
||||
fi
|
||||
|
||||
php vendor/bin/shlink-installer init ${flags}
|
||||
|
||||
# Periodically run visit:locate every hour, if ENABLE_PERIODIC_VISIT_LOCATE=true was provided and running as root
|
||||
if [ "${ENABLE_PERIODIC_VISIT_LOCATE}" = "true" ] && [ "${SHLINK_USER_ID}" = "root" ]; then
|
||||
echo "Configuring periodic visit location..."
|
||||
|
Loading…
Reference in New Issue
Block a user