Skip to content

I cannot start the container while pointing to an external MySQL DB #1851

Discussion options

You must be logged in to vote

Correct, that's the expected behavior. Shlink needs the database to be available when started, so if both the database and Shlink start at the same time, there can be a race condition.

Everything is documented here https://shlink.io/documentation/supported-db-engines/ (see "database availability").

In addition to depends_on option, I would also recommend setting some restart policy, like restart: always. That way, Shlink will restart if the database is not available yet.

There are plans to improve this, though, but it's tricky to do it right #469

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@maxacarvalho
Comment options

@maxacarvalho
Comment options

@acelaya
Comment options

Answer selected by acelaya
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1850 on July 26, 2023 18:19.