a year ago
Description: An easy to use, open-source, link shortener
Category: Other
7 Replies
a year ago
Try to use the private network to connect to the database whenever possible, and use ${{secret(32)}}
for the web password too!
a year ago
Try to use the private network to connect to the database whenever possible, and use
${{secret(32)}}
for the web password too!
Thanks for the feedback.
Definitely makes more sense to use private networking for the database; I'll make sure it works well in my project and update the template if it does.
Don't know why I didn't think to use
${{ secret(32) }}
for the password as I use secret for the API key.
a year ago
Private networking won't work with for the Postgres connection; the Shlink docker image doesn't seem to support IPv6 networking out of the box. This is a known issue for Shlink as they have a few tickets closed as stale that mention it.
I marked it as a known issue in my repo as well, updated the description for the template, and will see if I can resolve with a wrapper on their image down the line. The public network will have to do for now 😔
I did put the automatic password generation in place though. Thanks Brody 👍
a year ago
it's an alpine-based image https://docs.railway.app/guides/private-networking#workaround-for-alpine-based-images
with that variable set, I was able to have shlink connect to the database via the private network without issue.
some additional feedback that I didn't think of before -
use health checks,
/rest/health
for theShlink
service and something would need to be added to the nginx config for the frontend to serve as a health check.use capital case service names, e.g
shlink
->Shlink
,slink web client
->Slink Web Client
as it looks more professional (for lack of a better word)
a year ago
with that variable set, I was able to have shlink connect to the database via the private network without issue.
Really? I've had to deal with Alpine images and private network before so I was aware of the variable. I set ENABLE_ALPINE_PRIVATE_NETWORKING=true
and was still getting networking errors when talking to the database.
Was that, and changing the DB_HOST
/DB_PORT
variables in Shlink, the only changes you made?
Edit: I just got it working? afaik I did all of this yesterday and was getting generic host unreachable errors still. Must have messed up somewhere.