Hey guys, we’re on track to release CommandBox 3.1.0 and ForgeBox 2.0 at Into The Box. You guys have done a great job at beating up on the multi-server support for me.
I need some eyeballs to help test https://ortussolutions.atlassian.net/browse/COMMANDBOX-345
I think it’s pretty close, but all the weird scenarios were starting to turn my brain to mush. I tried to think of every common scenario and provide a best default for each one, but there are some edge cases where it’s just impossible to infer what the user intended.
You’ll need the latest BE of CommandBox
Basically, every command has been refactored to take the same , , and parameters. I’ve encapsulated the logic to try to find the correct server settings from those three pieces of information and re-used it everywhere
This means you can interact with servers by name:
server start brad server log brad server stop brad
by JSON config file
server start path/to/myServer.json server log path/to/myServer.json server stop path/to/myServer.json
or by webroot
server start directory=path/to/webroot server log directory=path/to/webroot server stop directory=path/to/webroot
, , and also can point to a specific JSON file now.
// Must use named parameters when setting. server set serverConfigFile=myServer.json name=myServer server show name myServer.json // Or even this more readable shortcut server show myServer.json name server clear name myServer.json // Or even this more readable shortcut server clear myServer.json name
If you provide a server name on startup, we’ll create a separate server.json for you with the expectation that you’re wanting more than one server with diff settings to start/stop separately.
start cfengine=adobe@10 name=myCF10Server start cfengine=adobe@11 name=myCF11Server
and can be started later as
start myCF10Server start myCF11Server
start server-myCF10Server.json start server-myCF11Server.json
files (or whatever you choose to name them) will now obey their , which if not absolute, will be taken as a relative path to the location of the JSON file. That means you can have a set up like:
- myproject/ - server.json (with web.webroot set to "www" - www/ - index.cfm
Then you can do and the server will be started in the folder.
In fact, since you can specify the path to the server.json in your start command, you can be in directory A, starting a JSON file in directory B, that points to a web root in directory C!
Please give this a looksy and let me know if I’ve broken anything. This last ticket took a bit more refactoring than I’m usually comfortable doing this close to a release so I want to make sure there’s no nasty regressions.
ColdBox Platform Evangelist
Ortus Solutions, Corp