|
| 1 | +# |
| 2 | +# The docker-compose.yml in this solution is a stock Sitecore XP0 environment, without |
| 3 | +# any changes. This override represents all the additions/changes needed for this solution. |
| 4 | +# Note that some of the overrides point to 'empty' Dockerfiles. This is recommended, even if |
| 5 | +# you are not customizing an image, to enable retagging and later customization. See Sitecore |
| 6 | +# Containers documentation for details. |
| 7 | +# |
| 8 | + |
| 9 | +version: "2.4" |
| 10 | + |
| 11 | +services: |
| 12 | + |
| 13 | + # A servercore image with both the netcore and netframework SDKs. |
| 14 | + # See Dockerfile for more details. |
| 15 | + dotnetsdk: |
| 16 | + image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-dotnetsdk:${VERSION:-latest} |
| 17 | + build: |
| 18 | + context: ../../docker/build/dotnetsdk |
| 19 | + args: |
| 20 | + DOTNET_VERSION: ${DOTNET_VERSION} |
| 21 | + scale: 0 |
| 22 | + |
| 23 | + # The solution build image is added here so it can be referenced as a build dependency |
| 24 | + # for the images which use its output. Setting "scale: 0" means docker-compose will not |
| 25 | + # include it in the running environment. See Dockerfile for more details. |
| 26 | + solution: |
| 27 | + image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-solution:${VERSION:-latest} |
| 28 | + build: |
| 29 | + context: ../../. |
| 30 | + args: |
| 31 | + BUILD_CONFIGURATION: ${BUILD_CONFIGURATION} |
| 32 | + BUILD_IMAGE: ${REGISTRY}${COMPOSE_PROJECT_NAME}-dotnetsdk:${VERSION:-latest} |
| 33 | + depends_on: |
| 34 | + - dotnetsdk |
| 35 | + scale: 0 |
| 36 | + |
| 37 | + # This is our custom image for an ASP.NET Core Rendering Host. |
| 38 | + # If target is 'debug', it will use the SDK image as parent and run 'dotnet watch.' |
| 39 | + # Otherwise, it's a standard ASP.NET Core container. See Dockerfile for details. |
| 40 | + rendering: |
| 41 | + image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-rendering:${VERSION:-latest} |
| 42 | + build: |
| 43 | + context: ../../docker/build/rendering |
| 44 | + target: ${BUILD_CONFIGURATION} |
| 45 | + args: |
| 46 | + DEBUG_PARENT_IMAGE: ${REGISTRY}${COMPOSE_PROJECT_NAME}-dotnetsdk:${VERSION:-latest} |
| 47 | + SOLUTION_IMAGE: ${REGISTRY}${COMPOSE_PROJECT_NAME}-solution:${VERSION:-latest} |
| 48 | + volumes: |
| 49 | + - ..\..\.\:C:\solution |
| 50 | + environment: |
| 51 | + ASPNETCORE_ENVIRONMENT: "Development" |
| 52 | + ASPNETCORE_URLS: "http://*:80" |
| 53 | + # These values add to/override ASP.NET Core configuration values. |
| 54 | + # See rendering host Startup for details. |
| 55 | + LayoutService__Handler__Uri: "http://cm/sitecore/api/layout/render/jss" |
| 56 | + Analytics__SitecoreInstanceUri: "http://cm" |
| 57 | + JSS_EDITING_SECRET: ${JSS_EDITING_SECRET} |
| 58 | + depends_on: |
| 59 | + - solution |
| 60 | + - cm |
| 61 | + labels: |
| 62 | + - "traefik.enable=true" |
| 63 | + - "traefik.http.routers.rendering-secure.entrypoints=websecure" |
| 64 | + - "traefik.http.routers.rendering-secure.rule=Host(`${RENDERING_HOST}`)" |
| 65 | + - "traefik.http.routers.rendering-secure.tls=true" |
| 66 | + |
| 67 | + # Mount the Traefik configuration and certs. |
| 68 | + traefik: |
| 69 | + volumes: |
| 70 | + - ../../docker/traefik:C:/etc/traefik |
| 71 | + depends_on: |
| 72 | + - rendering |
| 73 | + |
| 74 | + # Mount our SQL data folder and use our custom image with the Headless Services (JSS) |
| 75 | + # module data added. See Dockerfile for details. |
| 76 | + mssql: |
| 77 | + volumes: |
| 78 | + - type: bind |
| 79 | + source: ${LOCAL_DATA_PATH}\sql |
| 80 | + target: c:\data |
| 81 | + |
| 82 | + # Mount our SQL data folder and use our custom image with the Headless Services (JSS) |
| 83 | + # module data added. See Dockerfile for details. |
| 84 | + mssql-init: |
| 85 | + image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp0-mssql-init:${VERSION:-latest} |
| 86 | + build: |
| 87 | + context: ../../docker/build/mssql-init |
| 88 | + args: |
| 89 | + PARENT_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-mssql-init:${SITECORE_VERSION} |
| 90 | + HEADLESS_SERVICES_IMAGE: ${HEADLESS_SERVICES_IMAGE} |
| 91 | + |
| 92 | + # Some modules (like SXA) also require additions to the Solr image. |
| 93 | + solr: |
| 94 | + volumes: |
| 95 | + - type: bind |
| 96 | + source: ${LOCAL_DATA_PATH}\solr |
| 97 | + target: c:\data |
| 98 | + |
| 99 | + # Mount our Solr data folder and use our retagged Solr image. |
| 100 | + # Some modules (like SXA) also require additions to the Solr image. |
| 101 | + solr-init: |
| 102 | + image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp0-solr-init:${VERSION:-latest} |
| 103 | + build: |
| 104 | + context: ../../docker/build/solr-init |
| 105 | + args: |
| 106 | + PARENT_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-solr-init:${SITECORE_VERSION} |
| 107 | + |
| 108 | + # Use our retagged Identity Server image. |
| 109 | + # Configure for a mounted license file instead of using SITECORE_LICENSE. |
| 110 | + id: |
| 111 | + image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-id6:${VERSION:-latest} |
| 112 | + build: |
| 113 | + context: ../../docker/build/id |
| 114 | + args: |
| 115 | + PARENT_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-id6:${SITECORE_VERSION} |
| 116 | + volumes: |
| 117 | + - ${HOST_LICENSE_FOLDER}:c:\license |
| 118 | + environment: |
| 119 | + SITECORE_LICENSE_LOCATION: c:\license\license.xml |
| 120 | + |
| 121 | + # Use our custom CM (XP0 Standalone) image with added modules and solution code. |
| 122 | + # Folders are mounted below for code deployment and log output. See Dockerfile for details. |
| 123 | + # Configure for a mounted license file instead of using SITECORE_LICENSE. |
| 124 | + cm: |
| 125 | + image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp0-cm:${VERSION:-latest} |
| 126 | + build: |
| 127 | + context: ../../docker/build/cm |
| 128 | + args: |
| 129 | + PARENT_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-cm:${SITECORE_VERSION} |
| 130 | + SOLUTION_IMAGE: ${REGISTRY}${COMPOSE_PROJECT_NAME}-solution:${VERSION:-latest} |
| 131 | + TOOLS_IMAGE: ${TOOLS_IMAGE} |
| 132 | + MANAGEMENT_SERVICES_IMAGE: ${MANAGEMENT_SERVICES_IMAGE} |
| 133 | + HEADLESS_SERVICES_IMAGE: ${HEADLESS_SERVICES_IMAGE} |
| 134 | + depends_on: |
| 135 | + - solution |
| 136 | + volumes: |
| 137 | + - ${LOCAL_DEPLOY_PATH}\platform:C:\deploy |
| 138 | + - ${LOCAL_DATA_PATH}\cm:C:\inetpub\wwwroot\App_Data\logs |
| 139 | + - ${HOST_LICENSE_FOLDER}:c:\license |
| 140 | + environment: |
| 141 | + SITECORE_LICENSE_LOCATION: c:\license\license.xml |
| 142 | + RENDERING_HOST_PUBLIC_URI: "https://${RENDERING_HOST}" |
| 143 | + ## Development Environment Optimizations |
| 144 | + SITECORE_DEVELOPMENT_PATCHES: DevEnvOn,CustomErrorsOff,HttpErrorsDetailed,DebugOn,DiagnosticsOff,InitMessagesOff,RobotDetectionOff |
| 145 | + Sitecore_AppSettings_exmEnabled:define: "no" # remove to turn on EXM |
| 146 | + SITECORE_JSS_EDITING_SECRET: ${JSS_EDITING_SECRET} |
| 147 | + entrypoint: powershell.exe -Command "& C:/tools/entrypoints/iis/Development.ps1" |
| 148 | + |
| 149 | + # Use our retagged XConnect image. |
| 150 | + # Configure for a mounted license folder instead of using SITECORE_LICENSE. |
| 151 | + # Note: XConnect roles expect a folder with license.xml, not the file itself. |
| 152 | + xconnect: |
| 153 | + image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp0-xconnect:${VERSION:-latest} |
| 154 | + build: |
| 155 | + context: ../../docker/build/xconnect |
| 156 | + args: |
| 157 | + PARENT_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-xconnect:${SITECORE_VERSION} |
| 158 | + volumes: |
| 159 | + - ${HOST_LICENSE_FOLDER}:c:\license |
| 160 | + environment: |
| 161 | + SITECORE_LICENSE_LOCATION: c:\license\ |
| 162 | + |
| 163 | + # Use our retagged XConnect Search Indexer image. |
| 164 | + # Configure for a mounted license folder instead of using SITECORE_LICENSE. |
| 165 | + xdbsearchworker: |
| 166 | + image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp0-xdbsearchworker:${VERSION:-latest} |
| 167 | + build: |
| 168 | + context: ../../docker/build/xdbsearchworker |
| 169 | + args: |
| 170 | + PARENT_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-xdbsearchworker:${SITECORE_VERSION} |
| 171 | + volumes: |
| 172 | + - ${HOST_LICENSE_FOLDER}:c:\license |
| 173 | + environment: |
| 174 | + SITECORE_LICENSE_LOCATION: c:\license\ |
| 175 | + |
| 176 | + # Use our retagged Marketing Automation Engine image. |
| 177 | + # Configure for a mounted license folder instead of using SITECORE_LICENSE. |
| 178 | + xdbautomationworker: |
| 179 | + image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp0-xdbautomationworker:${VERSION:-latest} |
| 180 | + build: |
| 181 | + context: ../../docker/build/xdbautomationworker |
| 182 | + args: |
| 183 | + PARENT_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-xdbautomationworker:${SITECORE_VERSION} |
| 184 | + volumes: |
| 185 | + - ${HOST_LICENSE_FOLDER}:c:\license |
| 186 | + environment: |
| 187 | + SITECORE_LICENSE_LOCATION: c:\license\ |
| 188 | + |
| 189 | + # Use our retagged Cortex Processing Engine image. |
| 190 | + # Configure for a mounted license folder instead of using SITECORE_LICENSE. |
| 191 | + cortexprocessingworker: |
| 192 | + image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp0-cortexprocessingworker:${VERSION:-latest} |
| 193 | + build: |
| 194 | + context: ../../docker/build/cortexprocessingworker |
| 195 | + args: |
| 196 | + PARENT_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-cortexprocessingworker:${SITECORE_VERSION} |
| 197 | + volumes: |
| 198 | + - ${HOST_LICENSE_FOLDER}:c:\license |
| 199 | + environment: |
| 200 | + SITECORE_LICENSE_LOCATION: c:\license\ |
0 commit comments