I have integrated a legacy app with ColdBox - how do I deploy it?

This is clearly a newbie question. I watched a ton of cfcasts videos, including the two on getting my legacy app into ColdBox. I have things working great on my desktop with an embedded CF2021 server on port 127.0.0.1:8080.

I’m ready to get this running on one of our linux servers. I can’t figure out this is supposed to be done.

All of the app’s software is in a single directory (/kgs). Do I just install CommandBox on the server and repeat everything I’ve done? Or could I just move the /kgs directory to the server and do a bunch of configuration?

I’m coming up empty researching this simple question. If someone does help me out, I’m sure I’m going to feel pretty stupid.

Once I do get it running on the linux server, will I still need to run Apache in front of it to deal with the < 1024 ports (80, 443)?

Kurt

There’s a lot of “right” answers here. If you already have CF running on your production server, then you just need to move the code into the web root of that server. A note not on that-- ColdBox’s rewrites do care if they are in a sub folder or not so if you’ve been developing with ColdBox in the web root, but plan to have it in a folder on production, you’ll likely need to adjust a few things to account for that. (I recommend making your dev setup match production)

If this is a brand new server that doesn’t have any CF engine installed and you were hoping to use CommandBox, that’s perfectly fine, but to be clear ColdBox in no way requires CommandBox at all. To run CommandBox on production, you’ll want to look into

  • Server profiles to ensure everything is locked down
  • Our paid CommandBox Service Manager module to help you setup a OS-level service that auto-starts on boot
  • Extracting out any sensitive or tier-specific data from your configuration and using a .env file or actual env vars.

Not necessarily. You can run CommandBox as root so it can bind to those ports, or you can setup port forwarding in Linux pass them to the actual ports CommandBox is listening on. CommandBox’s built-in server is fast, secure, and powerful.