Replies: 3 comments 2 replies
-
You can just use a healthcheck command in your Dockerfile: |
Beta Was this translation helpful? Give feedback.
1 reply
-
I think you are looking for #830 (comment) |
Beta Was this translation helpful? Give feedback.
1 reply
-
I think I have answered my own question. |
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
-
Hi,
Im trying to achieve zero-downtime deployment in my Laravel app and after months of trying different approaches, Im able to get the 502 downtime down to second, but still have not got it working (zero downtime).
For the context, Im using https://github.com/jackbrycesmith/laravel-caprover-template and I have moved everything from
entrypoint.sh
toDockerfile
(followed this discussion). There are a few stuff remain in theentrypoint.sh
that cant be moved (here is my current file):The problem is: if the new version/deployment does not have migration to run, the downtime is almost zero (which is great). Otherwise, the downtime will equal to the time it takes to run the migration.
I end up with putting
RUN sleep 10
into myDockerfile
as a leeway but that is not a great solution.So my next attempt is to write a script and put that at the end of
Dockerfile
(or after runningentrypoint.sh
) to manually and constantly check the current being deployed container is up and running:The question is: how to get
<container_name_or_id>
var?I asked ChatGPT and got this answer but not sure if there is better approach?
P/S: or is there a way to fire local request to the app URL to check if its 200 OK?
Cheers,
Beta Was this translation helpful? Give feedback.
All reactions