Set Admin Key case in Lucee Docker Application

I have Lucee running in a Docker Container (extending from commandbox container).

Because our container is extending Commandbox on docker, we are able to set things like Port, URL Rewrites etc via server.json (Thank you Ortus Solutions and Brad !!).

The Application is a REST API receiving and returning JSON objects for a Javascript UI. In our original server we had Language/Compiler > Key case set to “Preserve Case” so that all objects keys would be lower case… a necessity when App response is to be consumed by Case Sensitive Javascript.

The problem is we can’t find a way of setting this in our Dockerized App. We’ve explored CFConfig (thanks again Ortus !! ), but there doesn’t appear to be a setting in CFConfig for Key case.

Does anyone have any suggestions on how we can set Key case to “Preserve Case” in a Dockerized Lucee App?

Thanks in advance for any suggestions

When we create our Docker images, they’re set to run a script file to ‘warm up the server’ and run an initial healthcheck that then sets all the configuration settings. So if it’s not configurable via CFConfig, you could consider that…

Thanks Jedihomer. Are you able to elaborate on “run a script”. What sort of script is it? Are you aware of any documentation on this?

Thanks!!

Similar to how the official lucee images work… (lucee-dockerfiles/5.2 at master · lucee/lucee-dockerfiles · GitHub)

In the Dockerfile we add a .sh file which starts lucee and runs a curl to our healthcheck. Similar to
https://github.com/lucee/lucee-dockerfiles/blob/master/5.2/prewarm.sh

A little further down we run this file.

In the healthcheck app we have calls to the cfadmin tag setting everthing to UTF, UTC and other settings before stopping lucee.

The Dockerfile completes and we have now have an image with a mostly configured server.

The final things that are setup are when the image runs in production and DSN settings are passed in via environmentals etc.

I would suggest that:
a) you add a ticket to cfconfig for it. I would probably get to it soon as I :heart: cfconfig and would use it :slight_smile: or even add the feature
b) Check out this spreadsheet of Lucee Settings that can be modified via environment variables: Lucee Configuration - Google Sheets

That might help

1 Like

AS an update, just had a look and it has been setup:
https://luceeserver.atlassian.net/browse/LDEV-996

so you would just have to add the following line I guess:

ENV LUCEE.PRESERVE.CASE=TRUE
1 Like

Brilliant! Thanks guys… gives me some things to play around with. Cheers!