Supporting Images Used in Examples documentation for the dotCMS Content Management System

dotCMS provides the following Docker images which can be used to run the necessary supporting applications in Docker containers. These are not generally recommend for use your production environments. We recommend you use your own images and/or managed services when running dotCMS.

Supporting Docker Images

Docker ImageDescriptionNotes
PostgreSQLOpen source database engineAlthough most production environments will have their own database servers available, this container enables delivery of the full dotCMS stack in Docker containers, for demonstration, testing, and debugging purposes.
ElasticSearchContent search and indexing servicesHaving ElasticSearch in its own container allows it to be scaled independently of the other parts of the system, and offloads the CPU and memory needed to run it from the main dotCMS container.
HAProxyLoad balancer and proxy serverThis is not needed for environments which already have a load balancer, but is provided as part of the dotCMS Docker reference implementation because:
  • It enables delivery of containers for the entire stack that can be run with minimal environmental dependencies, which is important to quickly reproduce environments for testing and debugging multiple instances configured in a cluster.
  • It provides a reference of what configuration settings are needed to match the load balancer settings used in our internal testing.
HazelcastDistributed cache providerHaving a separate caching container allows caching to be scaled independently of the other layers.
Hazelcast Management Center (Optional)A management center for the Hazelcast cacheProvides insight into the internal details of the caches and the nodes hosting those caches. Completely optional; the full stack of other containers will run without this container.

Image Options

Each of the dotCMS Docker images has a number of options that you can set which control how the container is configured and run. You may use these options to change how the containers run without the need to modify the image.

For more information about any of these images, and the options you may set on them, please click on the name of the image in the table above.

PostgreSQL Docker Container

This PostgreSQL container is provided as part of the dotCMS Docker stack for demonstration and testing purposes. You may use the database server and container of your choice in place of this container; please see the Database Configuration documentation for more information on how to configure dotCMS to use a different database.

OptionDefault ValueDescription
POSTGRES_CMS_USERdotcmsdbuserUsername that dotCMS will use to connect to database.
  • This must be a valid database user account, with proper database permissions.
POSTGRES_CMS_PASSWORDpasswordPassword that dotCMS will use to connect to database.
`POSTGRES_CMS_DBNAMEdotcmsName of the database that is created to store dotCMS data.
POSTGRES_ADMIN_PASSWORDemptyPassword for the postgres admin user account.

ElasticSearch Docker Container

OptionDefault ValueDescription
PROVIDER_ELASTICSEARCH_HEAP_SIZE1024mJava heap size used for ElasticSearch JVM.
  • The optimum value depends heavily on number of contentlets and the amout of data being indexed.
PROVIDER_ELASTICSEARCH_DNSNAMESempty
(do not attempt
discovery)
IP address or hostname of other external Elasticsearch services.
  • If empty, dotCMS will not attempt to discover other Elasticsearch services.
  • If running a dotCMS cluster, this MUST be set the same on all clustered dotCMS nodes.
PROVIDER_ELASTICSEARCH_SVC_DELAY_MINSERVICE_DELAY_DEFAULT_MIN
Set in Dockerfile to 1
Minimum time (in seconds) to wait before attempting to discover Hazelcast service nodes.
  • This delay permits the Hazelcast nodes to startup and be available for discovery before Elasticsearch attempts to access them.
PROVIDER_ELASTICSEARCH_SVC_DELAY_STEPSERVICE_DELAY_DEFAULT_STEP
Set in Dockerfile to 3
Time (in seconds) to wait between discovery attempts.
PROVIDER_ELASTICSEARCH_SVC_DELAY_MAXSERVICE_DELAY_DEFAULT_MAX
Set in Dockerfile to 30
Maximum time (in seconds) to wait before finishing service discovery.
PROVIDER_ELASTICSEARCH_SVC_REFRESH10Frequency (in seconds) for background Elasticsearch process to refresh service discovery.
PROVIDER_ELASTICSEARCH_CLUSTER_NAMEdotCMSContentIndexElasticsearch cluster name.
  • When using dotCMS clusters, all clustered nodes must have the same Elasticsearch cluster name.
PROVIDER_ELASTICSEARCH_PORT_TRANSPORT9300TCP port used for Elasticsearch transport protocol.
PROVIDER_ELASTICSEARCH_ENABLE_HTTPfalseEnable Elasticsearch HTTP REST API.
  • NOTE: For security purposes, it is recommended that you disable Elasticsearch HTTP REST API.
If you do wish to enable Elasicsearch HTTP REST API, you must do both of the following:
  1. Set this option to true.
  2. Set both PROVIDER_ELASTICSEARCH_ADDR_HTTP and PROVIDER_ELASTICSEARCH_PORT_HTTP options to appropriate values.
PROVIDER_ELASTICSEARCH_ADDR_HTTP127.0.0.1IP address for Elasticsearch HTTP REST API to bind to.
  • To make this accessible outside of the container, you need to either:
    • Assign a specific IP to the container and use that IP address, or
    • Set this option to 0.0.0.0, which will bind it to all IP addresses of the container.
  • If this option is set to 127.0.0.1 (the default), Elasticsearch binds to localhost and is not available outside the container (even if PROVIDER_ELASTICSEARCH_ENABLE_HTTP is set to true).
PROVIDER_ELASTICSEARCH_PORT_HTTP9200TCP port used for the Elasticsearch HTTP REST API.
PROVIDER_ELASTICSEARCH_NODE_MASTERtrueEligibility for election as the master Elasticsearch node.
  • If set to false, this node will never be elected as the master ES node.
PROVIDER_ELASTICSEARCH_NODE_DATAtrueCan this node hold data and perform data related operations.
  • If set to false, Elasticsearch data will not be stored on this node.

HAProxy Docker Container

This Docker image is built on top of the Docker image provided by HAProxy. Please see the HAProxy configuration documentation for more information. It is recommended that you review the following settings and make appropriate changes when using the HAProxy container provided with the dotCMS Docker image:

OptionDefault ValueDescription
CMS_DNSNAMESdotcmsIP address or hostname of dotCMS service.
  • Can be a multi-valued DNS record for round robin load balancing.
CMS_PORT_HTTP8081dotCMS port to direct HTTP traffic.
CMS_PORT_HTTPS8082dotCMS port ot direct HTTPS traffic.
HAPROXY_CERT_PATHemptyPath to HAProxy certificate(s).
  • Cert file format must be the concatenated subject certificate + intermediates certificate(s) + private key.
HAPROXY_ADMIN_PASSWORDemptyPassword for the 'admin' user of the HAProxy admininstration interface.
  • An empty password disables HAProxy admin functionality.
HAPROXY_MAINTENANCE_PAGEemptyPath to raw HTTP response for 503 Server Unavailable maintenance page.
  • An empty setting disables this functionality.
HAPROXY_REDIRECT_HTTPS_ALLfalseRedirect all HTTP requests to HTTPS.
  • If true, forces all requests to be HTTPS.
  • If set to true, make sure certificate(s) are properly configured.
HAPROXY_SERVICE_DELAY_MINSERVICE_DELAY_DEFAULT_MIN
Set in Dockerfile to 1
Minimum time (in seconds) to wait before attempting to discover dotCMS service nodes.
  • This delay permits the dotCMS nodes to startup and be available for discovery before HAProxy begins directing requests to them.
HAPROXY_SERVICE_DELAY_STEPSERVICE_DELAY_DEFAULT_STEP
Set in Dockerfile to 3
Time (in seconds) to wait between discovery attempts.
HAPROXY_SERVICE_DELAY_MAXSERVICE_DELAY_DEFAULT_MAX
Set in Dockerfile to 30
Maximum time (in seconds) to wait before finishing service discovery.
HAPROXY_SERVICE_REFRESH10Frequency (in seconds) the background process runs discovery.

Hazelcast Docker Container

OptionDefault ValueDescription
PROVIDER_HAZELCAST_HEAP_MIN128mMinimum Java heap size used for Hazelcast JVM.
  • Performance testing and tuning will be needed to determine the optimal value for this setting.
PROVIDER_HAZELCAST_HEAP_MAX1024mMaximum Java heap size used for Hazelcast JVM.
  • Performance testing and tuning will be needed to determine the optimal value for this setting.
PROVIDER_HAZELCAST_DNSNAMESemptyIP address or hostnames of other Hazelcast instances.
  • For single hazelcast instances, this can be left empty.
  • For multiple Hazelcast instances, this can be a multiple value DNS name or a comma seperated list of IP addresses and hostnames.
PROVIDER_HAZELCAST_SVC_DELAY_MINSERVICE_DELAY_DEFAULT_MIN
Set in Dockerfile to 1
Minimum time (in seconds) to wait before attempting to discover Hazelcast service nodes.
  • This delay permits the Hazelcast nodes to startup and be available for discovery before the container finshes starting.
PROVIDER_HAZELCAST_SVC_DELAY_STEPSERVICE_DELAY_DEFAULT_STEP
Set in Dockerfile to 3
Time (in seconds) to wait between discovery attempts.
PROVIDER_HAZELCAST_SVC_DELAY_MAXSERVICE_DELAY_DEFAULT_MAX
Set in Dockerfile to 30
Maximum time (in seconds) to wait before finishing service discovery.
PROVIDER_HAZELCAST_GROUPNAMEdotCMSHazelcast groupname.
  • All clustered Hazelcast instances must use the same Hazelcast groupname.
  • All dotCMS instances must have the same PROVIDER_HAZELCAST_GROUPNAME setting.
PROVIDER_HAZELCAST_PORT5701Port for Hazelcast to bind to.
  • All clients must be configured to use this port number.
PROVIDER_HAZELCAST_MANCENTER_URLemptyURL of optional Hazelcast Management Center application.
  • If empty , no Management Center is utilized.

Hazelcast Management Center Docker Container

This image is completely optional, but can be used to gain additional insight into cache communications. The free version of the Hazelcast Management Center allows you to run one or two Hazelcast nodes. For support of three or more Hazelcast nodes, you must contact Hazelcast to purchase a license.

There are no dotCMS-specific configuration options in this container. When you first access the UI, you will be prompted to create your username and password.

Files and Folders

The Docker image will copy files from specific locations in the path where the Docker image is located, to specific locations within the Docker image itself. Many of these locations are, in turn, mapped by the image into specific locations in the standard dotCMS image where these files are expected to be found.

To copy files into the Docker image when it is executed, you must place the appropriate folders as specified in the second column in the table below.

Files Placed in This FolderAre Copied to This Folder in the Docker ImageWhich Corresponds to this Folder in the dotCMS Distribution
[localpath]/data/shared/data/shared