I34 controlled startup - #36
Merged
Merged
Conversation
QSparks
marked this pull request as ready for review
July 27, 2026 21:07
Nospamas
approved these changes
Jul 29, 2026
| const delay = (milliseconds) => | ||
| new Promise((resolve) => setTimeout(resolve, milliseconds)); | ||
|
|
||
| const waitForStartupUrl = async (url) => { |
Contributor
There was a problem hiding this comment.
For consistency with other parts of this stack is it worth considering moving this statup logic into bash and running it before starting the server proper?
QSparks
added a commit
that referenced
this pull request
Aug 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, a pull or redeploy could start all Swarm services at roughly the same time because Swarm does not use depends_on for readiness.
The importer can take time to populate the DB, so some downstream containers would fail to start and exhaust their max_attempts before upstream services were ready.
This would often require a full stop/pull/start cycle.
The new flow makes startup and redeployment deterministic:
CHYP_IMPORT_IDskips the import if it already completed.BBOXwaits for the matching import to finish before starting.appandVarnishwait forBBOXto serve that exact import.Varnishstarts with an empty tile cache only after the new dataset is ready.Normal Portainer Pull and redeploy should now be able to replace services without manually stopping the whole stack first.
PostGISuses stop-first when it is replaced, but the database remains on shared persistent storage.If PostgreSQL crashes during the final swap, the database should contain either the previous dataset or the fully committed new dataset, not a partially published state.
Resolves #34