When using CommandBox, you don’t need to update the CF engine the old way again. You just tell CommandBox what engine version you want and it gets it for you.
server start cfengine=lucee@5.4.4
The engine version does not go in CFConfig. It goes in the server.json. Really, these are basic things covered in the docs. I would really recommend you step back and read through the “embedded server” sections of https://commandbox.ortusbooks.com/ and the CFconfig docs: https://cfconfig.ortusbooks.com/ and then see if things are making more sense.
All the things a server.json sets are documented here:
and all the things CFConfig canset are documented here:
Just a brief review of the documentation would have made this clear.
If it’s any consolation, the way CommandBox starts and stops a server is right on par with how CLI tools for other languages like PHP or Node would work. It’s not a monolithic single web server you install. It’s a tool that can start as many servers in as may directories running as many versions of CF as you like and they can all be managed independently.
That’s the interactive shell. It’s not a requirement to use Commandbox, it just makes things easier, especially for Windows users who don’t have bash.
That would be incorrect. A server is attached to the shell that started it as much as a milkshake is attached to the McDonalds drive through window. Which is to say, not at all. When you start a server with the server start
command, whether you use the interactive shell or not, simply fires off a Java process that runs on your machine. This java server process is a separate Java process from the CLI itself and stays running regardless of what you do with the CLI process (such as exiting).
I’m not sure what would give you that impression as I said nothing of the sort. I even gave examples of the things each file controls.
Do “ports, CF engine, web root, and rewrites” sound the same as “datasources and mail servers”? I would hope not as those are different words that mean different things.
That’s not at all what I said. I’m not even sure where you’d get that idea from. A “server” involves a lot of moving parts. Each file controls a different aspect of the server as I explained. Adding a datasource connection to your data base is part of the “server” but a very different part than setting what port is bound to. Not even Adobe CF or Lucee configure those two things in the same place.
Again, a precursory review of the docs should be answering basic questions like this. I’ve already answered this in this very thread even. I want to help you here, but you’ve got to help us help you
Yes, if you put your datasources in your cfconfig.json file, then they will be loaded into the server every time it starts, which means
- first start ever
- update to new version
- after you forget the server
you always have all your config ready to go. One of the easiest ways to setup that JSON file is to add your settings manually to the CF admin and then export them to the JSON like so
cfconfig export .cfconfig.json
CFConfig is a powerful tool and can do a lot of things. Primarily it moves configuration from point A to point B where any point can be
- a JSON file
- a CommandBox server’s server home
- ANY CF server home even installed on Tomcat
So when you import a JSON file to a server, the settings are read from that JSON file stored in the XML files for that CF engine (Lucee/adobe). When you run a cfconfig set
command, that one single setting is written to the XML files for that engine. if you export settings like I showed above, the settings are read FROM the engine’s XML files and written to a JSON file. There’s like a million ways you can use it so there’s many ways it can fit into a workflow.
CFConfig handles CF engine passwords. But there’s not just “one way” you can do it. You can
- do a one time set with
cfconfig set
- do a manual import from a JSON file containing the password
- put a
.cfconfig.json
file with that exact name in the web root and it will get picked up automatically when you start the server - set a
cfconfig_adminPassword
environment variable which will get picked up automatically when you start the server.
These all do a similar thing and the end of the day and you can pick which one meets your needs.
CFConfig. See the docs I linked above that show what CFConfig handles. Just running
cfconfig show
will show you a JSON representation of all the Coldfusion settings CFConfig “sees” in your server’s XML files.
This is not a valid command. You’re mixing what CFConfig does and what the server.json does. Again, please spend some more time in the docs. It covers all these use cases with examples.