OK.
I think I have it....
IN all the following - I have really made it as plain and simple as I can.
Not because I am trying to treat you like an idiot - or be patronising, either.
I have been a CFML developer since 2000 and it has only been the last year that I have started to realise the freedom of getting this all worked out correctly brings about for me.
Previously I always treated the CFML Server / it's parts (Tomcat / IIS / etc) and it's configuration and my application(s) as being one monolith.
I would install ACF or Lucee.
Then I would configure the CFML Server and make sure all the settings were right and all the needed datasources and mapping etc were all set up, correctly, too.
Then I would make sure that I had my code in the webroot / approot - and test the application.
A few hours - is what I normally allowed myself to setup and test a new server.
Whether it was a NEW (physical) server or a new CFML upgrade / re-install.
This is a waste of those few hours.
I now have this down to "literal" minutes.
1. Completely ignore the difference between Upgrading an existing server AND installing a new server.
a. The difference is not needed (in code - or in your mind).
2. Realize that the Lucee server / web settings are ALL stored in a file.
a. You do NOT need to configure Lucee via the web admin tool.
3. Realize that your application's files AND the Lucee config file are "separate"
a. Yes you need to configure Lucee for the requirements of your Application...
b. BUT they ARE separate : they can be treated separately.
c. Think along the lines of - I am a Lucee Hosting company....
i. I have a Lucee server to configure - that OTHERS can use.
ii. I have an application to run (as if I was some OTHER - on the Lucee Server of my hosting company)
So let's start with the Lucee Server.
I use CommandBox.
CommandBox lets you run CFML servers, easily, quickly.
CommandBox is just for the Hosting company - (in my example above)
It has NOTHING to do with the "configuration" of Lucee - from the perspective of your application (datasources / mappings)
CommandBox IS the actual CFML server and the Web Server and the configuration needed between the two.
CommandBox = Lucee AND IIS
CommandBox = Lucee AND Apache HTTPD
CommandBox = Lucee AND Tomcat
CommandBox = Lucee AND Tomcat and NGINX
(All the "pre" stuff you install / configure - just so you can open up the Lucee Web admin - to configure the datasources / mappings.)
CommandBox IS all of this AND does this part for you really easily.
The configuration for CommandBox (Min / Max Java Heap : SSL : which port to use : etc) is in "server.json"
server.json - can reside anywhere
if you only have one application / one host - place it in the approot.
You CAN get ALL the guff on CommandBox / server.json at
https://commandbox.ortusbooks.com/
"I" have all my settings in the server.json file.
I do NOT use any environment variables - I have no secrets in the server.json file.
I DO commit the server.json file into version control.
QUICK ASIDE
The documentation for CommandBox and CFConfig is awesome.
It is really well written and detailed.
If anything it is is too good.
If you read it from the start to the end - you're likely to feel dumber than when you started.
This is because CommandBox and CFConfig are "general" tools.
And by that I mean - they do NOT prescribe a set way to do any of the functions.
And the documentation is written with a prescription in mind either.
When you're reading from start to end - this makes the documentation a little hard to follow.
Initially they talk about a settings file...
Then they're talking about environment variables
Then there is also "conventions" that they use, too.
But if you think of the documentation as a "CookBook" - then it makes reading them a whole lot easier.
Want to set the Lucee Admin Password (or a datasource password) by environment variables (so you don't have passwords in code version control? - then go to the part of the documentation that talks about setting The Lucee Admin password via an environment variable.
Don't bother reading about how to do it in the 17 other ways - that you don't need.
Want to know how to setup HTTPS/SSL - "JUST" look up https / ssl only.
This is the only way that "I" have managed to not lose my mind in the (genuine) majesty of their documentation.