LogoLogo
HomeAPIBlog
3.0.0-SNAPSHOT
3.0.0-SNAPSHOT
  • INTRODUCTION
    • Getting Started
      • Running Local Development Servers
      • Beginner Tutorial: Hello World
      • Beginner Tutorial: Hello Database
      • Tutorial: Wheels, AJAX, and You
    • Frameworks and Wheels
    • Requirements
    • Manual Installation
    • Upgrading
    • Screencasts
  • Command Line Tools
    • CLI Overview
    • Quick Start Guide
    • Command Reference
      • Core Commands
        • wheels init
        • wheels info
        • wheels reload
        • wheels deps
        • wheels destroy
        • wheels watch
      • Code Generation
        • wheels generate app
        • wheels generate app-wizard
        • wheels generate controller
        • wheels generate model
        • wheels generate view
        • wheels generate property
        • wheels generate route
        • wheels generate resource
        • wheels generate api-resource
        • wheels generate frontend
        • wheels generate test
        • wheels generate snippets
        • wheels scaffold
      • Database Commands
        • wheels dbmigrate info
        • wheels dbmigrate latest
        • wheels dbmigrate up
        • wheels dbmigrate down
        • wheels dbmigrate reset
        • wheels dbmigrate exec
        • wheels dbmigrate create blank
        • wheels dbmigrate create table
        • wheels dbmigrate create column
        • wheels dbmigrate remove table
        • wheels db schema
        • wheels db seed
      • Testing Commands
        • wheels test
        • wheels test run
        • wheels test coverage
        • wheels test debug
      • Configuration Commands
        • wheels config list
        • wheels config set
        • wheels config env
      • Environment Management
        • wheels env
        • wheels env setup
        • wheels env list
        • wheels env switch
      • Plugin Management
        • wheels plugins
        • wheels plugins list
        • wheels plugins install
        • wheels plugins remove
      • Code Analysis
        • wheels analyze
        • wheels analyze code
        • wheels analyze performance
        • wheels analyze security
      • Security Commands
        • wheels security
        • wheels security scan
      • Performance Commands
        • wheels optimize
        • wheels optimize performance
      • Documentation Commands
        • wheels docs
        • wheels docs generate
        • wheels docs serve
      • CI/CD Commands
        • wheels ci init
      • Docker Commands
        • wheels docker init
        • wheels docker deploy
      • Deployment Commands
        • wheels deploy
        • wheels deploy audit
        • wheels deploy exec
        • wheels deploy hooks
        • wheels deploy init
        • wheels deploy lock
        • wheels deploy logs
        • wheels deploy proxy
        • wheels deploy push
        • wheels deploy rollback
        • wheels deploy secrets
        • wheels deploy setup
        • wheels deploy status
        • wheels deploy stop
    • CLI Development Guides
      • Creating Commands
      • Service Architecture
      • Migrations Guide
      • Testing Guide
  • Working with Wheels
    • Conventions
    • Configuration and Defaults
    • Directory Structure
    • Switching Environments
    • Testing Your Application
    • Using the Test Environment
    • Contributing to Wheels
    • Submitting Pull Requests
    • Documenting your Code
  • Handling Requests with Controllers
    • Request Handling
    • Rendering Content
    • Redirecting Users
    • Sending Files
    • Sending Email
    • Responding with Multiple Formats
    • Using the Flash
    • Using Filters
    • Verification
    • Event Handlers
    • Routing
    • URL Rewriting
      • Apache
      • IIS
      • Tomcat
      • Nginx
    • Obfuscating URLs
    • Caching
    • Nesting Controllers
    • CORS Requests
  • Displaying Views to Users
    • Pages
    • Partials
    • Linking Pages
    • Layouts
    • Form Helpers and Showing Errors
    • Displaying Links for Pagination
    • Date, Media, and Text Helpers
    • Creating Custom View Helpers
    • Localization
  • Database Interaction Through Models
    • Object Relational Mapping
    • Creating Records
    • Reading Records
    • Updating Records
    • Deleting Records
    • Column Statistics
    • Dynamic Finders
    • Getting Paginated Data
    • Associations
    • Nested Properties
    • Object Validation
    • Object Callbacks
    • Calculated Properties
    • Transactions
    • Dirty Records
    • Soft Delete
    • Automatic Time Stamps
    • Database Migrations
      • Migrations in Production
    • Using Multiple Data Sources
  • Plugins
    • Installing and Using Plugins
    • Developing Plugins
    • Publishing Plugins
  • Project Documentation
    • Overview
  • External Links
    • Source Code
    • Issue Tracker
    • Sponsor Us
    • Community
Powered by GitBook
LogoLogo
On this page
  • Synopsis
  • Description
  • Options
  • Examples
  • Basic initialization
  • Initialize with Adobe ColdFusion
  • Production setup with Nginx
  • Initialize with PostgreSQL
  • Full stack with Redis
  • What It Does
  • Generated Files
  • Dockerfile Example
  • docker-compose.yml Example
  • Configuration Options
  • Development Mode
  • Production Mode
  • Use Cases
  • Environment Variables
  • Notes
  • See Also

Was this helpful?

Edit on GitHub
Export as PDF
  1. Command Line Tools
  2. Command Reference
  3. Docker Commands

wheels docker init

Initialize Docker configuration for your Wheels application.

Synopsis

wheels docker init [options]

Description

The wheels docker init command creates Docker configuration files for containerizing your Wheels application. It generates a Dockerfile, docker-compose.yml, and supporting configuration files optimized for Wheels applications.

Options

Option
Description
Default

--engine

CFML engine (lucee5, lucee6, adobe2018, adobe2021, adobe2023)

lucee6

--database

Database system (mysql, postgresql, sqlserver, none)

mysql

--port

Application port

8080

--with-nginx

Include Nginx reverse proxy

false

--with-redis

Include Redis for caching

false

--production

Generate production-ready configuration

false

--force

Overwrite existing Docker files

false

--help

Show help information

Examples

Basic initialization

wheels docker init

Initialize with Adobe ColdFusion

wheels docker init --engine=adobe2023

Production setup with Nginx

wheels docker init --production --with-nginx --port=80

Initialize with PostgreSQL

wheels docker init --database=postgresql

Full stack with Redis

wheels docker init --with-nginx --with-redis --database=postgresql

What It Does

  1. Creates Dockerfile optimized for CFML applications:

    • Base image selection based on engine

    • Dependency installation

    • Application file copying

    • Environment configuration

  2. Generates docker-compose.yml with:

    • Application service

    • Database service (if selected)

    • Nginx service (if selected)

    • Redis service (if selected)

    • Network configuration

    • Volume mappings

  3. Additional files:

    • .dockerignore - Excludes unnecessary files

    • docker-entrypoint.sh - Container startup script

    • Configuration files for selected services

Generated Files

Dockerfile Example

FROM ortussolutions/commandbox:lucee5

# Set working directory
WORKDIR /app

# Copy application files
COPY . /app

# Install dependencies
RUN box install

# Expose port
EXPOSE 8080

# Start server
CMD ["box", "server", "start", "--console"]

docker-compose.yml Example

version: '3.8'

services:
  app:
    build: .
    ports:
      - "8080:8080"
    environment:
      - WHEELS_ENV=development
      - DB_HOST=database
    depends_on:
      - database
    volumes:
      - ./:/app

  database:
    image: mysql:8.0
    environment:
      - MYSQL_ROOT_PASSWORD=wheels
      - MYSQL_DATABASE=wheels_app
    volumes:
      - db_data:/var/lib/mysql

volumes:
  db_data:

Configuration Options

Development Mode

  • Hot reload enabled

  • Source code mounted as volume

  • Debug ports exposed

  • Development databases

Production Mode

  • Optimized image size

  • Security hardening

  • Health checks

  • Restart policies

  • Resource limits

Use Cases

  1. Local Development: Consistent development environment across team

  2. Testing: Isolated test environments with different configurations

  3. CI/CD: Containerized testing in pipelines

  4. Deployment: Production-ready containers for cloud deployment

Environment Variables

Common environment variables configured:

Variable
Description

WHEELS_ENV

Application environment

WHEELS_DATASOURCE

Database connection name

DB_HOST

Database hostname

DB_PORT

Database port

DB_NAME

Database name

DB_USER

Database username

DB_PASSWORD

Database password

Notes

  • Requires Docker and Docker Compose installed

  • Database passwords are set to defaults in development

  • Production configurations should use secrets management

  • The command detects existing Docker files and prompts before overwriting

See Also

PreviousDocker CommandsNextwheels docker deploy

Last updated 2 days ago

Was this helpful?

- Deploy using Docker

- General deployment commands

- Initialize CI configuration

wheels docker deploy
wheels deploy
wheels ci init