(I have a feeling I had asked this before, but can...
# lucee
a
(I have a feeling I had asked this before, but can't find reference to it). What do ppl use as their docker healthcheck... check, with a container built from the lucee/lucee image? I don't want to ping anything our-application-specific, as that is overreaching for just the container healthcheck. it should be just checking that the
lucee/lucee
"stuff" is up and running. We're using the lucee-nginx variant, so am OK to add Nginx into the mix as well, so making a curl is viable. Am currently thinking I'll put a subdir in the docroot with a stub Application.cfc (so it blocks the upstream Application.cfc which has framework shit in it), and a healthcheck.cfm which just emits
lucee.server.version
(or whatever it is) or something like that..? if curling that returns 200-OK, then... healthy, otherwise... not healthy...?
p
if you are just seeking to verify a port is up and running or if lucee has some commandline way of checking status can just do a
HEALTHCHECK CMD
and check it via a command
a
Yeah I know how healthchecks work. I wanna know what to check.
if lucee has some commandline way
That's the bit I'm asking about.
For our PHP containers we just do
cmd php /path/to/file/that/just/exits/with/0.php
. this tests PHP runs, and exits with a success exit code. I'm after how ppl are doing equiv on Lucee.
(our Nginx container does similar, but via php-fpm)
d
e
I do an isolated directory with its own application.cfc and a check that grabs the database time from the main apps data source.
q
I usually create a healthcheck.cfm file that sits somewhere in my app that is blank except for a "OK" message. If it processes without a 500 error, all is good. The way I have my apps running, I use a lot of ORM, and it makes sure the ORM is loaded and app is warm too -- so bonus there.
a
Yeah we've gone with the subdir / blocking Application.cfc /
<cfoutput>OK</cfoutput>
in index.cfm. And we just curl that with
-f
so we get a 0 / non-0 exit code. Done.
Cheers for all the input from various bods.
👍🏻 1