Replies: 4 comments 3 replies
-
|
You can just use a healthcheck command in your Dockerfile: |
Beta Was this translation helpful? Give feedback.
-
|
I think you are looking for #830 (comment) |
Beta Was this translation helpful? Give feedback.
-
|
I think I have answered my own question. |
Beta Was this translation helpful? Give feedback.
-
|
Do you know the Dockerfile Im testing some ideas, but when I ssh to the server and run Same thing happens when I access my Laravel container shell and run |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
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.shtoDockerfile(followed this discussion). There are a few stuff remain in theentrypoint.shthat 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 10into myDockerfileas 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