CommandBox was highlighted as a powerful web hosting solution, perfect for developers and businesses alike. Featuring a built-in server and command-line interface, CommandBox simplified web application management. Developers could deploy multiple application instances simultaneously, optimizing deve...
CommandBox was highlighted as a powerful web hosting solution, perfect for developers and businesses alike. Featuring a built-in server and command-line interface, CommandBox simplified web application management. Developers could deploy multiple application instances simultaneously, optimizing development workflows. CommandBox's efficient deployment processes ensured reliable web hosting, seamlessly integrating into existing workflows for scalability and feature enhancements.
Size: 3.25 MB
Language: en
Added: Jun 30, 2024
Slides: 21 pages
Slide Content
INTO THE BOX 2024
Web Hosting With
CommandBox
Daniel Garcia
SPEAKER ITB 2024
●Senior Developer at Ortus Solutions
●Help Co-Host the Modernize or Die podcast
●Been using ColdFusion since 1999 (version 4)
●Cinephile (loves movies)
●Regaler of useless knowledge (loves trivia)
●Smoker of Meats
●Part-time Radio DJ
●Part-time non-traditional grad student
○New Mexico State University - Go Aggies!
○Graduating December 2024!
INTO THE BOX 2024
Shameless Self-Promotion
ortussolutions.com
ortussolutions.com/podcast
INTO THE BOX 2024
Shameless Self-Promotion
Tune in Sunday nights at
masterzradio.com!
What is CommandBox?
CommandBox is a standalone, native tool for Windows, Mac, and Linux that will provide you with a
Command Line Interface (CLI) for developer productivity, tool interaction, package management, embedded
CFML server, application scaffolding, and some sweet ASCII art.
•Command Line for ColdFusion (CFML)
•Operating System integration for executing
commands
•Ability to create and execute commands
built using ColdFusion (CFML)
•ForgeBox integration for cloud package
management and installations
•ColdBox Platform, TestBox, and
ContentBox CMS Integrations
•Integrated servlet server with rewrite
capabilities
INTO THE BOX 2024
•Ability to create command recipes and
execution
•REPL (Read-Evaluate-Print-Loop) console
for immediate ColdFusion (CFML)
interaction
•Ability to interact with user via CLI and
create workflows and installers
•Open CommandBox, browse to the directory, and type start
•Can use Adobe ColdFusion, Lucee, or BoxLang (soon)
•Use Configuration as Code to streamline management
•Use environment variables for location specific settings and secrets
•Use cfconfig to configure the CF engine
•Store in version control to easily manage changes and share with others
INTO THE BOX 2024
Ways of using CommandBox for hosting
INTO THE BOX 2024
Standalone Reverse Proxy Multi-Site Docker
Standalone
•CommandBox serves the website itself
•Uses the Undertow web server
•Can use whatever CF engine and version you like
•Is very performant
•Supports SSL certs and rewrite rules
•Set your server ports
•Set your host name if needed
•Set your environment variables and cfconfig
INTO THE BOX 2024
Reverse Proxy
•A web server (like NGINX) sits in front and handles request
•SSL, server rules, etc can be handled by proxy
•Web server accepts request and proxies it to CommandBox
•CommandBox processes the request and returns the content
•Can support multiple sites running on standard ports (80/443)
•CommandBox is configured similarly to Standalone, except will
have unique ports per CommandBox site
•Each CommandBox site can use its own engine and version
•Can use any frontend proxy as long as it can communicate access
the CommandBox site
○Example: Use CloudFlare load balancer in front of server
INTO THE BOX 2024
Multi-Site
•Conceptually similar to reverse proxy
○A big difference is that CommandBox handles everything!
•Can support multiple sites within a single process
•Memory usage can be shared among all the sites
•All sites use the same engine and version
•SSL, server rules, etc are supported per site
•CommandBox accepts request and serves up appropriate site
based on host header
•Can support multiple sites running on standard ports (80/443)
•Entire configuration can be scripted and stored in version control
INTO THE BOX 2024
Docker
•Conceptually different than other options but configured similarly
•CommandBox serves the sites similar to other options
•Use containers for deployment
○This is different than a traditional virtual server
•Can use whatever CF engine and version you like
•Entire configuration can be scripted and stored in version control
•Deployment can be automated with CI/CD
INTO THE BOX 2024
CommandBox Service Manager
•Create and manage services for your sites
•Support on Windows, Mac, and Linux
○Not needed for Docker hosting
•Websites can start automatically on server startup
•Websites can be restarted to reload settings, etc.
○Can be scripted at part of CI/CD
•Commercial product, is $59 per server
•No limit on services per server
•Each server using it needs its own license regardless
of use case (Production, Staging, Development, etc)
•Is included with CommandBox Pro!
INTO THE BOX 2024
CommandBox Pro
•Includes everything from open source version and more!
•Comes with Support and Business Level SLAs
•Includes CommandBox Service Manager
•Includes one ForgeBox Pro subscription per server
•Incudes one Cache extension license of choice per server license
○Redis, Couchbase, MongoDB
•Licensed for either virtual servers or containers
○CommandBox PRO Server License
■$1699 CommandBox PRO per server license per year
■Free for non-production
○CommandBox Pro Container Pack
■$699 - Unlimited cores
■A 3-pack of container deployments burstable to 6
■Free for non-production
INTO THE BOX 2024
CommandBox Best Practices
•Use environment variables to store site specific values
•Use environment variables to store secrets
○Passwords, API Keys, authorization tokens, etc
•Use cfconfig to manage server configurations
•Do NOT hardcode server values in cfconfig or server.json unless
○They are the same for all instances of the server
○They do NOT contain sensitive information
■No SECRETS!
•Use Server Profiles to secure sites
○Development, Production, None
○Will enable/disable things like
■Directory Browsing
■Block CF Admin
■Block Sensitive Paths
■Block Flash Remoting
INTO THE BOX 2024
INTO THE BOX 2024
INTO THE BOX 2024
Demo Files
https://github.com/garciadev/itb-2024-hosting-with-commandbox
INTO THE BOX 2024
INTO THE BOX 2024
Thanks!
INTO THE BOX 2024
Daniel Garcia
Senior Developer
Ortus Solutions, Corp [email protected]
linkedin.com/in/danieljgarcia
INTO THE BOX 2024
THANK YOU TO OUR
SPONSORS
INTO THE BOX 2024