Is the installation tool required or can Shlink be setup with just env variables? #1721
-
How Shlink is set up
SummaryHi there! Quick question about the Shlink setup: The installation tool page in the docs says
I would prefer to use environment variables and there are several steps which are missing in the docs. With just the env vars, the db never got initialized, I solved that by running When accessing the created URLs I get a 500 server error and the logs said This I could solve by running Since I never ran Am I missing something else which is not created by only using env vars and not running the installation tool? AUTHOR EDIT: See the answer here #1721 (comment) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
The intention is that you can use either the installation tool, or environment variables. The fact that That said, it is true that there's a gap in the docs on how to properly support this use case. Some contextOn the very beginning of the project, the installation tool was the only way to set-up Shlink. A couple of years after, the official docker image was introduced, and support for env vars was added. Also, an entry point script was created, which covered some of the extra tasks performed by the installation tool. At first it was not possible to use env vars for non-docker setups, but I realized it would be useful to support them, allowing for better automation of Shlink deployments on non-container contexts. However, I made some assumptions here by mistake, and as you figured out, if the installation tool is never invoked, there are a couple missing critical steps that make Shlink not work. You mostly figured out everything (I'm impressed, BTW 😅). Next stepsI'm not sure what's the best approach here. I could just document this to begin with, but I feel Shlink should provide some kind of tooling, or be smarter about this. I need to give it a thought. Also, this is related shlinkio/shlink-installer#176 |
Beta Was this translation helpful? Give feedback.
-
The original discussion diverted a bit, so just providing an answer here. Shlink now has an See more information on the docs https://shlink.io/documentation/command-line-interface/installation-tool/#init |
Beta Was this translation helpful? Give feedback.
The original discussion diverted a bit, so just providing an answer here.
Shlink now has an
init
command that can be used to set up an instance where configuration is provided via env vars, without having to go through the interactive installation process.See more information on the docs https://shlink.io/documentation/command-line-interface/installation-tool/#init