Public Repository

Last pushed: 11 days ago
Short Description
The Official CommandBox Docker Package from Ortus Solutions for orchestrating CFML servers
Full Description

Tags

  • :latest, :3.6.0 - Latest stable version
  • :snapshot - Development/BE version

Description

CommandBox allows you to configure your entire CFML engine environment from a single file in the root of your project. For more information on how to leverage CommandBox in developing and deploying your applications, see the official documentation.

Current CFML engines supported are:

  • Lucee: 4+ & 5+
  • Adobe Coldfusion 10+

You may also specify a custom WAR for deployment, using the server.json configuration.

Usage

This section assumes you are using the Official Docker Image

By default, the directory /app in the container is mapped as Commandbox home. To deploy a new application, first pull the image:

docker pull ortussolutions/commandbox

Then, from the root of your project, start with

docker run -v "/path/to/your/app:/app" ortussolutions/commandbox

By default the exposed ports of the container are 8080 (insecure) and 8443 (secure - if enabled in your server.json) so, once the container comes online, you may access your application via browser using the applicable port. You may also specify both port arguments in your run command to assign the exposed

docker pull -expose-list 80 443 -e "PORT=80" -e "SSL_PORT=443" -v "/path/to/your/app:/app" ortussolutions/commandbox

To create your own, customized Docker image, use our Dockerfile repository as the baseline to begin your customizations.

Environment Variables

The CommandBox Docker image support the use of environmental variables for the configuration of your servers. Specifically, the image includes the cfconfig CommandBox module, which allows you to provide custom settings for your engine, including the admin password.

  • $PORT - The port which your server should start on. The default is 8080.
  • $SSL_PORT - If applicable, the ssl port used by your server The default is 8443.
  • $CFENGINE - Using the server.json syntax, allows you to specify the CFML engine for your container
  • $HEALTHCHECK_URI - Specifies the URI endpoint for container health checks. By default, this is set http://127.0.0.1:${PORT}/ at 1 minute intervals with 5 retries and a timeout of 30s
  • $cfconfig_[engine setting] - Any environment variable provided which includes the cfconfig_ prefix will be determined to be a cfconfig setting and the value after the prefix is presumed to be the setting name. The command cfconfig set ${settingName}=${value} will be run to populate your setting in to the $SERVER_HOME_DIRECTORY.
  • $CFCONFIG - A cfconfig-compatible JSON file may be provided with this environment variable. The file will be loaded and applied to your server. If an adminPassword key exists, it will be applied as the Server and Web context passwords for Lucee engines
  • $SERVER_HOME_DIRECTORY - When provided, a custom path to your server home directory will be assigned. By default, this path is set as /root/serverHome ( Note: You may also provide this variable in your app's customized server.json file )

About 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. It seamlessly integrates to work with any of our *Box products but it is also open for extensibility for any ColdFusion (CFML) project as it is also written in ColdFusion (CFML) using our concepts of CommandBox Commands. It tightly integrates with our contribution community; ForgeBox, so developers can share modules world-wide.

Learn more about CommandBox at https://www.ortussolutions.com/products/commandbox

Issues

Please submit issues to our repository: https://github.com/Ortus-Solutions/docker-commandbox/issues

Docker Pull Command
Owner
ortussolutions

Comments (0)