Update to latest shlink-installer

This commit is contained in:
Alejandro Celaya 2023-09-22 10:00:19 +02:00
parent 637d8334f4
commit b0ec0601c1
4 changed files with 13 additions and 12 deletions

View file

@ -4,12 +4,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com), and this project adheres to [Semantic Versioning](https://semver.org). The format is based on [Keep a Changelog](https://keepachangelog.com), and this project adheres to [Semantic Versioning](https://semver.org).
## [Unreleased] ## [3.6.4] - 2023-09-22
### Added ### Added
* *Nothing* * *Nothing*
### Changed ### Changed
* *Nothing* * [#1866](https://github.com/shlinkio/shlink/issues/1866) The `INITIAL_API_KEY` env var is now only relevant for the official docker image.
Going forward, new non-docker Shlink installations provisioned with env vars that also wish to provide an initial API key, should do it by using the `vendor/bin/shlink-installer init --initial-api-key=%SOME_KEY%` command, instead of using `INITIAL_API_KEY`.
### Deprecated ### Deprecated
* *Nothing* * *Nothing*
@ -20,6 +22,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com), and this
### Fixed ### Fixed
* [#1819](https://github.com/shlinkio/shlink/issues/1819) Fix incorrect timeout when running DB commands during Shlink start-up. * [#1819](https://github.com/shlinkio/shlink/issues/1819) Fix incorrect timeout when running DB commands during Shlink start-up.
* [#1870](https://github.com/shlinkio/shlink/issues/1870) Make sure shared locks include the cache prefix when using Redis. * [#1870](https://github.com/shlinkio/shlink/issues/1870) Make sure shared locks include the cache prefix when using Redis.
* [#1866](https://github.com/shlinkio/shlink/issues/1866) Fix error when starting docker image with `INITIAL_API_KEY` env var.
## [3.6.3] - 2023-06-14 ## [3.6.3] - 2023-06-14

View file

@ -45,11 +45,11 @@
"php-middleware/request-id": "^4.1", "php-middleware/request-id": "^4.1",
"pugx/shortid-php": "^1.1", "pugx/shortid-php": "^1.1",
"ramsey/uuid": "^4.7", "ramsey/uuid": "^4.7",
"shlinkio/shlink-common": "dev-main#5a8bd5a as 5.6", "shlinkio/shlink-common": "^5.6",
"shlinkio/shlink-config": "^2.4", "shlinkio/shlink-config": "^2.4",
"shlinkio/shlink-event-dispatcher": "^3.0", "shlinkio/shlink-event-dispatcher": "^3.0",
"shlinkio/shlink-importer": "^5.1", "shlinkio/shlink-importer": "^5.1",
"shlinkio/shlink-installer": "^8.4.2", "shlinkio/shlink-installer": "^8.5",
"shlinkio/shlink-ip-geolocation": "^3.2", "shlinkio/shlink-ip-geolocation": "^3.2",
"shlinkio/shlink-json": "^1.0", "shlinkio/shlink-json": "^1.0",
"spiral/roadrunner": "^2023.1", "spiral/roadrunner": "^2023.1",

View file

@ -86,6 +86,9 @@ return [
InstallationCommand::API_KEY_GENERATE->value => [ InstallationCommand::API_KEY_GENERATE->value => [
'command' => 'bin/cli ' . Command\Api\GenerateKeyCommand::NAME, 'command' => 'bin/cli ' . Command\Api\GenerateKeyCommand::NAME,
], ],
InstallationCommand::API_KEY_CREATE->value => [
'command' => 'bin/cli ' . Command\Api\InitialApiKeyCommand::NAME,
],
], ],
], ],

View file

@ -10,18 +10,13 @@ if [ -z "${GEOLITE_LICENSE_KEY}" ] || [ "${SKIP_INITIAL_GEOLITE_DOWNLOAD}" == "t
flags="${flags} --skip-download-geolite" flags="${flags} --skip-download-geolite"
fi fi
# TODO If INITIAL_API_KEY was provided, create an initial API key
#if [ -n "${INITIAL_API_KEY}" ]; then
# flags="${flags} --initial-api-key=${INITIAL_API_KEY}"
#fi
php vendor/bin/shlink-installer init ${flags}
# If INITIAL_API_KEY was provided, create an initial API key # If INITIAL_API_KEY was provided, create an initial API key
if [ -n "${INITIAL_API_KEY}" ]; then if [ -n "${INITIAL_API_KEY}" ]; then
php bin/cli api-key:initial "${INITIAL_API_KEY}" flags="${flags} --initial-api-key=${INITIAL_API_KEY}"
fi 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 # Periodically run visit:locate every hour, if ENABLE_PERIODIC_VISIT_LOCATE=true was provided and running as root
# FIXME: ENABLE_PERIODIC_VISIT_LOCATE is deprecated. Remove cron support in Shlink 4.0.0 # FIXME: ENABLE_PERIODIC_VISIT_LOCATE is deprecated. Remove cron support in Shlink 4.0.0
if [ "${ENABLE_PERIODIC_VISIT_LOCATE}" = "true" ] && [ "${SHLINK_USER_ID}" = "root" ]; then if [ "${ENABLE_PERIODIC_VISIT_LOCATE}" = "true" ] && [ "${SHLINK_USER_ID}" = "root" ]; then