[Re-opened discussion] When loading homepage, default homepage shows up for a short moment #3600
Replies: 3 comments
-
I made a small mistake in my Dockerfile change and forgot - ENV TIME_TO_START 10
+ ENV TIME_TO_START=10 :P |
Beta Was this translation helpful? Give feedback.
0 replies
-
This discussion has been automatically closed due to lack of community support. See our contributing guidelines for more details. |
Beta Was this translation helpful? Give feedback.
0 replies
-
This discussion has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion for related concerns. See our contributing guidelines for more details. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
Hi,
Unfortunately the original discussion here got closed and locked, thus re-opening here and summarizing the other thread: #2175
Problem statement
As described, when loading homepage for the first time, for a quick moment the default homepage is visible.
This behavior occurs every time the homepage-container is updated. Since I use homepage maybe every 1 week, and often in between the container is updated (watchtower does it for me automatically), I essentially get to see these loaders every time.
Root Cause
As @shamoon explained, the reason is that homepage needs to process the configs the first time it is being loaded.
Possible Solutions
We discussed that we could have the container load the configs autonomously (and not wait for the first user visit)
@benphelps pointed out that:
Two ideas that were pointed out how this could potentially be done:
Variant 1: Entry point combined with delayed curl:
@schklom suggested that modifying the entry point with a delayed curl could work:
Variant 2: Run one-off health check
@schklom suggested that adding a one-off healthcheck could work, right before "Entrypoint":
HEALTHCHECK wget http://localhost:3000
When I checked, I saw that there is already a health check, but when I tested, it did not preload the config.
We also briefly touched on whether we could hit a specific API (rather than just the website) that would force the config to load (potentially
/api/validate
or/api/revalidate
?).homepage/Dockerfile
Lines 62 to 66 in af16956
Hope we can pick the thread up there and discuss how the container could trigger the load of the configs automatically when the container is started, rather than waiting for the user to connect.
Other
No response
Beta Was this translation helpful? Give feedback.
All reactions