Source Installation
Deploy ContentBox into any Adobe or Lucee CFML Engine
In this section you will deploy ContentBox so it can run on any running Adobe or Lucee CFML engine. The first step is to use CommandBox and our contentbox-cli
package so we can install and configure ContentBox for usage in any CFML Engine. We won't be using CommandBox as our server, just as a package manager and CLI.
Install CommandBox
![](https://contentbox.ortusbooks.com/~gitbook/image?url=https%3A%2F%2Ffiles.gitbook.com%2Fv0%2Fb%2Fgitbook-legacy-files%2Fo%2Fassets%252F-LA-UVvYQ9YKIVXFz01w%252F-LA-UcIjNIclM_mn00Gl%252F-LA-UmLcoyZgINuAvL99%252FCommandBoxLogo.png%3Fgeneration%3D1523647992482088%26alt%3Dmedia&width=768&dpr=4&quality=100&sign=ef79e36f&sv=1)
CommandBox is a ColdFusion (CFML) Command Line Interface (CLI), REPL, Package Manager and Embedded Server. We will leverage the CLI in CommandBox to install, deploy and configure ContentBox.
Requirements
MacOS, Windows or Linux
JDK 8+
A clean, empty directory on your machine
Download CommandBox
You can download CommandBox from the official site: http://www.ortussolutions.com/products/commandbox#download and install it in your preferred Operating System (Windows, Mac, Unix).
Starting CommandBox
Once you download and expand CommandBox you will have the box.exe
or box
binary, which you can place in your Windows Path or *Unix /usr/bin
folder to have it available system-wide. Then open the binary and CommandBox will unpack itself your user's directory: {User}/.CommandBox
. This happens only once and the next thing you know, you are in the CommandBox interactive shell!
We will be able to execute a-la-carte commands from our command line or go into the interactive shell for multiple commands. We recommend the interactive shell as it is faster and can remain open in your project root.
Install ContentBox-CLI
We can now install the contentbox-cli
package:
Once installed you can always run contentbox help
to get the list of available commands and help information.
Creating Your Database
Create a database in your RDBMS of choice. Make sure you note the name of the database, the connection details and the credentials for it.
If you are using MySQL, make sure you use utf8mb4
for your database collation.
Creating Your Datasource
Now go to your CFML engine administrator and register the contentbox
datasource that points to the database you just created.
Resources
You can use ANY name for the datasource, but we will use contentbox
for ease of use.
Creating A ContentBox Site
Now that we have our CLI installed, database and datasource created, go or create a new directory where we will create our site. Most likely this folder will be your web root in your CFML engine installation or a sub-folder within that web root. Let's assume it's the web root of your current CFML Engine installation.
The wizard will take you by the hand and ask you all the relevant questions about your installation:
Name of your site
Which CFML Engine you will be running ContentBox on (Lucee5, Adobe 2018+)
Password for the ColdBox HMVC Reinits
Database of choice (MySQL5+, MSSQL, PostgreSQL, Oracle)
Database credentials
Development or production site
Latest ContentBox version, specific or
be
bleeding edgeDeploy a CommandBox server or not. This should be false, as we are only deploying our code to the CFML engine we have already installed.
Confirm your settings and the installer will configure the entire site for you including ORM dialects, environment variables and much much more.
Tip: You can use the `install --help` command and see how you can install ContentBox in an automated fashion with no user-interaction.
Web Installer
Now that we have installed ContentBox on disk and configured your CLI to connect to your database for delivering database migrations, we can finalize the installation via the web installer. Now open the installer by navigating to the root of the project. Let's assume you are running your CFML engine on port 8500:
ContentBox will automagically create all the necessary database tables, indexes, and constraints for you. After it does this, it will present you with our ContentBox installer, where you will fill in:
Administrator Account
Site Information
Notification Emails
Email Information
URL Rewriting
Enjoy your ContentBox installation!
Caution: We recommend that after you install ContentBox that you remove the installer and data source wizard modules from the disk. You can do so manually or via the Dashboard once you log in. {Root}/modules/contentbox-installer and {Root}/modules/contentbox-dsncreator
Last updated