Sitecore XC Docker Compose files


Overview of how Docker Compose files are used in a Sitecore XC deployment and the information they contain about containers and configurations.

To deploy the containers, Sitecore Docker Compose requires the following files:


The Docker Compose files for each Sitecore XC topology are included in the Sitecore Commerce Container SDK.

Docker Compose file

The Docker Compose configuration file is a text file (docker-compose.yml) that contains information about the different containers and configuration of each Sitecore role in the deployment topology. The Docker Compose file is the main configuration file that the docker-compose command uses.

Environment variables file

The environment variable configuration file is a text file ( .env) that stores the configuration information for the environment you want to deploy. The sample .env file provides default values for any environment variables referenced in the Docker Compose file. You can edit this file outside the main Docker Compose configuration, that is, using a text editor without using docker-compose command line utility.

The environment variables are the preferred mechanism for passing configuration settings into containers.

The following example shows how, for example, the mssql service role in the compose.yml file uses an environment variable defined in the .env file to configure the SQL Server SA password (SA_PASSWORD):

```  mssql:
        isolation: ${ISOLATION}
        image: ${XP_SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2017-${XP_SITECORE_TAG}
        restart: unless-stopped
            ACCEPT_EULA: "Y"
                -type: bind
                source: c:\containers\mssql-data
            target: c:\data