Sign inSign up

txpropfinders/suitecrm

By txpropfinders

•Updated about 2 months ago

Docker image for SuiteCRM

Image
0

1.6K

txpropfinders/suitecrm repository overview

⁠SuiteCRM 8 Docker Image

A customized, multi-architecture Docker image for SuiteCRM 8 designed for production and development deployments.

This image packages SuiteCRM with Apache and PHP while keeping the database in a separate container or on an external database server.

⁠Features

  • SuiteCRM 8
  • Production and development images
  • Multi-architecture support:
    • linux/amd64
    • linux/arm64
  • Apache web server
  • PHP version matched to the supported SuiteCRM release
  • Automatic first-time SuiteCRM installation
  • Configurable PHP settings through environment variables
  • Configurable Apache settings through environment variables
  • Built-in SuiteCRM cron support
  • Built-in SuiteCRM worker support
  • Cron and worker can be enabled or disabled independently
  • Persistent SuiteCRM application storage
  • MariaDB/MySQL kept separate from the SuiteCRM image
  • Supports a Docker-managed MariaDB container or external database
  • Database connectivity and authentication checks during startup
  • SuiteCRM version detection
  • Optional SuiteCRM version-to-version upgrade support
  • MariaDB upgrade support when using the official MariaDB container
  • Development images with SuiteCRM development tooling
  • Designed for Docker Compose, Portainer, reverse proxies, and Cloudflare Tunnel deployments

⁠Image Repository

docker.io/txpropfinders/suitecrm

⁠Production Images

Use a normal version tag for production:

txpropfinders/suitecrm:8.10.2

The latest tag points to the latest production image built by this project:

txpropfinders/suitecrm:latest

⁠Development Images

Development images use the -dev suffix:

txpropfinders/suitecrm:8.10.2-dev

The latest development image is:

txpropfinders/suitecrm:latest-dev

Development images include additional development tooling such as Composer, Git, Node.js, Yarn, and Angular CLI according to the requirements of the applicable SuiteCRM release.


⁠Supported Architectures

Images are built for:

linux/amd64
linux/arm64

This allows the same image tags to be used on standard Intel/AMD systems and ARM64 systems such as ARM-based cloud instances.


⁠Database

The database is not included inside the SuiteCRM image.

SuiteCRM connects to a separate MariaDB or MySQL server.

You can use:

  • a separate MariaDB Docker container;
  • a separate MySQL Docker container; or
  • an external MariaDB/MySQL database server.

This separation allows the SuiteCRM application and database to be upgraded, backed up, and managed independently.


⁠Quick Start

Create a .env file:


SUITECRM_TAG=8.10.2
SUITECRM_HTTP_PORT=8080

MYSQL_ROOT_PASSWORD=CHANGE_ME_ROOT_PASSWORD
MYSQL_HOST=database
MYSQL_PORT=3306
MYSQL_DATABASE=suitecrm
MYSQL_USER=suitecrm
MYSQL_PASSWORD=CHANGE_ME_DATABASE_PASSWORD

SUITECRM_AUTO_INSTALL=yes

SUITECRM_USERNAME=admin
SUITECRM_PASSWORD=CHANGE_ME_ADMIN_PASSWORD
[email protected]

SUITECRM_HOST=crm.example.com
SUITECRM_SITE_URL=https://crm.example.com
SUITECRM_ENABLE_HTTPS=yes

SUITECRM_DEMO_DATA=no
SUITECRM_VALIDATE_USER_IP=FALSE

APP_ENV=prod

SUITECRM_CRON_ENABLED=yes
SUITECRM_CRON_INTERVAL=60

SUITECRM_WORKER_ENABLED=yes
SUITECRM_WORKER_MEMORY_LIMIT=256M
SUITECRM_WORKER_TIME_LIMIT=3600

PHP_MEMORY_LIMIT=512M
PHP_UPLOAD_MAX_FILESIZE=100M
PHP_POST_MAX_SIZE=110M
PHP_MAX_EXECUTION_TIME=300
PHP_MAX_INPUT_TIME=300
PHP_MAX_INPUT_VARS=10000
PHP_DATE_TIMEZONE=America/Chicago

PHP_DISPLAY_ERRORS=Off
PHP_DISPLAY_STARTUP_ERRORS=Off
PHP_LOG_ERRORS=On
PHP_ERROR_REPORTING=E_ALL

PHP_OPCACHE_ENABLE=1
PHP_OPCACHE_MEMORY_CONSUMPTION=256
PHP_OPCACHE_MAX_ACCELERATED_FILES=20000
PHP_OPCACHE_REVALIDATE_FREQ=60

APACHE_SERVER_NAME=crm.example.com
APACHE_DOCUMENT_ROOT=/var/www/html/public
APACHE_LOG_LEVEL=warn
APACHE_TIMEOUT=300

TZ=America/Chicago

⁠Docker Compose with MariaDB

The following example runs MariaDB as a separate container. MariaDB is not installed inside the SuiteCRM image.

services:
  database:
    image: mariadb:11.4
    container_name: suitecrm-database
    restart: unless-stopped

    environment:
      MARIADB_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
      MARIADB_DATABASE: ${MYSQL_DATABASE}
      MARIADB_USER: ${MYSQL_USER}
      MARIADB_PASSWORD: ${MYSQL_PASSWORD}
      TZ: ${TZ}

    volumes:
      - suitecrm_db_data:/var/lib/mysql

    networks:
      - suitecrm_internal

    healthcheck:
      test: ["CMD-SHELL", "healthcheck.sh --connect --innodb_initialized"]
      interval: 10s
      timeout: 5s
      retries: 12
      start_period: 30s

  suitecrm:
    image: txpropfinders/suitecrm:${SUITECRM_TAG:-8.10.2}
    container_name: suitecrm
    restart: unless-stopped

    depends_on:
      database:
        condition: service_healthy

    ports:
      - "${SUITECRM_HTTP_PORT:-8080}:80"

    environment:
      MYSQL_HOST: ${MYSQL_HOST}
      MYSQL_PORT: ${MYSQL_PORT}
      MYSQL_DATABASE: ${MYSQL_DATABASE}
      MYSQL_USER: ${MYSQL_USER}
      MYSQL_PASSWORD: ${MYSQL_PASSWORD}

      SUITECRM_AUTO_INSTALL: ${SUITECRM_AUTO_INSTALL}
      SUITECRM_USERNAME: ${SUITECRM_USERNAME}
      SUITECRM_PASSWORD: ${SUITECRM_PASSWORD}
      SUITECRM_EMAIL: ${SUITECRM_EMAIL}
      SUITECRM_HOST: ${SUITECRM_HOST}
      SUITECRM_SITE_URL: ${SUITECRM_SITE_URL}
      SUITECRM_ENABLE_HTTPS: ${SUITECRM_ENABLE_HTTPS}
      SUITECRM_DEMO_DATA: ${SUITECRM_DEMO_DATA}
      SUITECRM_VALIDATE_USER_IP: ${SUITECRM_VALIDATE_USER_IP}

      APP_ENV: ${APP_ENV}

      SUITECRM_CRON_ENABLED: ${SUITECRM_CRON_ENABLED}
      SUITECRM_CRON_INTERVAL: ${SUITECRM_CRON_INTERVAL}

      SUITECRM_WORKER_ENABLED: ${SUITECRM_WORKER_ENABLED}
      SUITECRM_WORKER_MEMORY_LIMIT: ${SUITECRM_WORKER_MEMORY_LIMIT}
      SUITECRM_WORKER_TIME_LIMIT: ${SUITECRM_WORKER_TIME_LIMIT}

      PHP_MEMORY_LIMIT: ${PHP_MEMORY_LIMIT}
      PHP_UPLOAD_MAX_FILESIZE: ${PHP_UPLOAD_MAX_FILESIZE}
      PHP_POST_MAX_SIZE: ${PHP_POST_MAX_SIZE}
      PHP_MAX_EXECUTION_TIME: ${PHP_MAX_EXECUTION_TIME}
      PHP_MAX_INPUT_TIME: ${PHP_MAX_INPUT_TIME}
      PHP_MAX_INPUT_VARS: ${PHP_MAX_INPUT_VARS}
      PHP_DATE_TIMEZONE: ${PHP_DATE_TIMEZONE}
      PHP_DISPLAY_ERRORS: ${PHP_DISPLAY_ERRORS}
      PHP_DISPLAY_STARTUP_ERRORS: ${PHP_DISPLAY_STARTUP_ERRORS}
      PHP_LOG_ERRORS: ${PHP_LOG_ERRORS}
      PHP_ERROR_REPORTING: ${PHP_ERROR_REPORTING}

      PHP_OPCACHE_ENABLE: ${PHP_OPCACHE_ENABLE}
      PHP_OPCACHE_MEMORY_CONSUMPTION: ${PHP_OPCACHE_MEMORY_CONSUMPTION}
      PHP_OPCACHE_MAX_ACCELERATED_FILES: ${PHP_OPCACHE_MAX_ACCELERATED_FILES}
      PHP_OPCACHE_REVALIDATE_FREQ: ${PHP_OPCACHE_REVALIDATE_FREQ}

      APACHE_SERVER_NAME: ${APACHE_SERVER_NAME}
      APACHE_DOCUMENT_ROOT: ${APACHE_DOCUMENT_ROOT}
      APACHE_LOG_LEVEL: ${APACHE_LOG_LEVEL}
      APACHE_TIMEOUT: ${APACHE_TIMEOUT}

      TZ: ${TZ}

    volumes:
      - suitecrm_app_data:/var/www/html

    networks:
      - suitecrm_internal

volumes:
  suitecrm_app_data:
  suitecrm_db_data:

networks:
  suitecrm_internal:
    driver: bridge

Start the containers:

docker compose up -d

View the SuiteCRM startup log:

docker compose logs -f suitecrm

SuiteCRM will be available at:

http://SERVER-IP:8080

or through the hostname configured by your reverse proxy.


⁠Automatic Installation

When:

SUITECRM_AUTO_INSTALL=yes

the container performs the initial SuiteCRM installation automatically.

During first startup the container:

  1. initializes the persistent application directory;
  2. waits for the configured database server;
  3. verifies database TCP connectivity;
  4. verifies database authentication;
  5. runs the SuiteCRM command-line installer;
  6. configures the application;
  7. starts Apache;
  8. starts cron when enabled; and
  9. starts the SuiteCRM worker when enabled and applicable.

After installation completes, opening the configured SuiteCRM URL should display the SuiteCRM login application instead of the web installer.


⁠Persistent Storage

SuiteCRM application data is stored at:

/var/www/html

Example:

volumes:
  - suitecrm_app_data:/var/www/html

The database should also use persistent storage:

volumes:
  - suitecrm_db_data:/var/lib/mysql

Do not remove these volumes unless you intentionally want to remove the associated persistent data.


⁠External Database

The SuiteCRM image does not require the database to run in Docker.

For an external MariaDB/MySQL server configure:


MYSQL_HOST=database.example.com
MYSQL_PORT=3306
MYSQL_DATABASE=suitecrm
MYSQL_USER=suitecrm
MYSQL_PASSWORD=CHANGE_ME

Do not include the database service in your Compose file when using an external database.

The external database server must permit connections from the SuiteCRM container/host.


⁠Cron

SuiteCRM cron processing is integrated into the image.

Enable it with:

SUITECRM_CRON_ENABLED=yes

Disable it with:

SUITECRM_CRON_ENABLED=no

The execution interval can be configured with:

SUITECRM_CRON_INTERVAL=60

A separate SuiteCRM image or cron container is not required by this project.


⁠Worker

The SuiteCRM background worker can be enabled with:

SUITECRM_WORKER_ENABLED=yes

or disabled with:

SUITECRM_WORKER_ENABLED=no

Worker limits can be configured with:


SUITECRM_WORKER_MEMORY_LIMIT=256M
SUITECRM_WORKER_TIME_LIMIT=3600

For SuiteCRM releases that use Symfony Messenger background processing, the worker runs from the same SuiteCRM container.


⁠PHP Configuration

Common PHP settings can be changed without rebuilding the image.

Example:


PHP_MEMORY_LIMIT=512M
PHP_UPLOAD_MAX_FILESIZE=100M
PHP_POST_MAX_SIZE=110M
PHP_MAX_EXECUTION_TIME=300
PHP_MAX_INPUT_TIME=300
PHP_MAX_INPUT_VARS=10000

PHP_DATE_TIMEZONE=America/Chicago

PHP_DISPLAY_ERRORS=Off
PHP_DISPLAY_STARTUP_ERRORS=Off
PHP_LOG_ERRORS=On
PHP_ERROR_REPORTING=E_ALL

OPcache can also be configured:


PHP_OPCACHE_ENABLE=1
PHP_OPCACHE_MEMORY_CONSUMPTION=256
PHP_OPCACHE_MAX_ACCELERATED_FILES=20000
PHP_OPCACHE_REVALIDATE_FREQ=60

⁠Apache Configuration

Apache settings are configurable at runtime:


APACHE_SERVER_NAME=crm.example.com
APACHE_DOCUMENT_ROOT=/var/www/html/public
APACHE_LOG_LEVEL=warn
APACHE_TIMEOUT=300

The standard SuiteCRM 8 document root is:

/var/www/html/public

Apache rewrite support is enabled for SuiteCRM routing and API requests.


⁠Development Images

Development images use the -dev suffix:

txpropfinders/suitecrm:8.10.2-dev

For development, use settings such as:


SUITECRM_TAG=8.10.2-dev

APP_ENV=dev

SUITECRM_DEMO_DATA=yes

PHP_DISPLAY_ERRORS=On
PHP_DISPLAY_STARTUP_ERRORS=On

PHP_OPCACHE_ENABLE=0
PHP_OPCACHE_REVALIDATE_FREQ=0

Development images contain additional development tooling required for working with SuiteCRM source and frontend components.

For example, the SuiteCRM 8.10.x development environment requires Node.js 20.11.1 or later in the 20.x line, Angular CLI 18, and Yarn 4.10.3 according to the SuiteCRM compatibility requirements.

Do not use the development image for a normal production deployment.


⁠Upgrading SuiteCRM

Always back up your SuiteCRM files and database before performing an upgrade.

Changing:

SUITECRM_TAG=8.10.1

to:

SUITECRM_TAG=8.10.2

does not silently authorize an application/database upgrade.

Automatic upgrading is disabled by default:


SUITECRM_AUTO_UPGRADE=no
UPGRADE_BACKUP_CONFIRMED=no

When the image version and installed SuiteCRM version differ, the container can detect the mismatch.

After creating and verifying your backup, automatic upgrading can be explicitly authorized:


SUITECRM_TAG=8.10.2
SUITECRM_AUTO_UPGRADE=yes
UPGRADE_BACKUP_CONFIRMED=yes

The upgrade implementation uses SuiteCRM's application upgrade process rather than simply overwriting an existing installation.

A manual upgrade can also be started with:

docker compose run --rm suitecrm suitecrm-upgrade

After a successful upgrade, review SuiteCRM for any required post-upgrade or migration tasks.


⁠MariaDB Upgrades

MariaDB is managed independently from SuiteCRM.

When using the official MariaDB Docker image, its upgrade functionality can be enabled with:

MARIADB_AUTO_UPGRADE=1

Database engine upgrades should be planned separately from SuiteCRM application upgrades.

Always create and verify a full database backup before changing major MariaDB versions.


⁠Reverse Proxy

SuiteCRM can be placed behind a reverse proxy such as:

  • Nginx
  • Nginx Proxy Manager
  • Apache
  • Cloudflare Tunnel

The container itself listens on port:

80

The host-side port is configurable:

SUITECRM_HTTP_PORT=8080

For example:

ports:
  - "${SUITECRM_HTTP_PORT:-8080}:80"

Changing SUITECRM_HTTP_PORT does not change the internal Apache port.


⁠Production Recommendations

For production deployments:


APP_ENV=prod

PHP_DISPLAY_ERRORS=Off
PHP_DISPLAY_STARTUP_ERRORS=Off
PHP_LOG_ERRORS=On

PHP_OPCACHE_ENABLE=1

SUITECRM_DEMO_DATA=no

Use strong passwords for:

MYSQL_ROOT_PASSWORD
MYSQL_PASSWORD
SUITECRM_PASSWORD

Do not commit production passwords or secrets to a public Git repository.

Use HTTPS through a properly configured reverse proxy or secure ingress service.

Maintain regular backups of both:

/var/www/html

and the SuiteCRM database.


⁠Important Upgrade Notice

Application upgrades and database-server upgrades are separate operations.

For example:

SuiteCRM 8.10.1 → 8.10.2

is a SuiteCRM application/schema upgrade.

Whereas:

MariaDB 11.4 → 11.8

is a database-server upgrade.

Do not assume that changing both image tags at the same time is safe. Back up the deployment and upgrade one component at a time.


⁠About SuiteCRM

SuiteCRM is an open-source Customer Relationship Management platform.

This Docker image is a customized container packaging/deployment project and is not the official SuiteCRM Docker image.

SuiteCRM itself is maintained by the SuiteCRM project. Refer to the official SuiteCRM documentation for application requirements, compatibility information, administration, customization, and upgrade guidance.

Tag summary

Content type

Image

Digest

sha256:5b4851ea1…

Size

322.3 MB

Last updated

about 2 months ago

docker pull txpropfinders/suitecrm