Skip to content

Commit

Permalink
Update to latest shlink-installer
Browse files Browse the repository at this point in the history
  • Loading branch information
acelaya committed Sep 22, 2023
1 parent 637d833 commit b0ec060
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

## [Unreleased]
## [3.6.4] - 2023-09-22
### Added
* *Nothing*

### 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
* *Nothing*
Expand All @@ -20,6 +22,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com), and this
### Fixed
* [#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.
* [#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
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@
"php-middleware/request-id": "^4.1",
"pugx/shortid-php": "^1.1",
"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-event-dispatcher": "^3.0",
"shlinkio/shlink-importer": "^5.1",
"shlinkio/shlink-installer": "^8.4.2",
"shlinkio/shlink-installer": "^8.5",
"shlinkio/shlink-ip-geolocation": "^3.2",
"shlinkio/shlink-json": "^1.0",
"spiral/roadrunner": "^2023.1",
Expand Down
3 changes: 3 additions & 0 deletions config/autoload/installer.global.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@
InstallationCommand::API_KEY_GENERATE->value => [
'command' => 'bin/cli ' . Command\Api\GenerateKeyCommand::NAME,
],
InstallationCommand::API_KEY_CREATE->value => [
'command' => 'bin/cli ' . Command\Api\InitialApiKeyCommand::NAME,
],
],
],

Expand Down
11 changes: 3 additions & 8 deletions docker/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,13 @@ if [ -z "${GEOLITE_LICENSE_KEY}" ] || [ "${SKIP_INITIAL_GEOLITE_DOWNLOAD}" == "t
flags="${flags} --skip-download-geolite"
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 [ -n "${INITIAL_API_KEY}" ]; then
php bin/cli api-key:initial "${INITIAL_API_KEY}"
flags="${flags} --initial-api-key=${INITIAL_API_KEY}"
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
# 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
Expand Down

0 comments on commit b0ec060

Please sign in to comment.