├── .gitattributes
├── .gitignore
├── GettingStartedSetup
├── SetupDependecies
│ └── run
│ │ ├── sitecore-xm1
│ │ └── docker-compose.override.yml
│ │ ├── sitecore-xp0
│ │ └── docker-compose.override.yml
│ │ └── sitecore-xp1
│ │ └── docker-compose.override.yml
└── SitecoreHeadless_WithContainers.ps1
├── LICENSE
├── README.md
├── custom-images
├── .dockerignore
├── .env
├── Directory.Build.targets
├── DockerExamples.sln
├── Dockerfile
├── Packages.props
├── README.md
├── clean-install.ps1
├── docker-compose.override.yml
├── docker-compose.xm1.override.yml
├── docker-compose.xm1.yml
├── docker-compose.xp1.override.yml
├── docker-compose.xp1.yml
├── docker-compose.yml
├── docker
│ ├── .gitignore
│ ├── build
│ │ ├── cd
│ │ │ └── Dockerfile
│ │ ├── cm
│ │ │ ├── Dockerfile
│ │ │ └── transforms
│ │ │ │ └── Web.config.xdt
│ │ ├── cortexprocessing
│ │ │ └── Dockerfile
│ │ ├── cortexprocessingworker
│ │ │ └── Dockerfile
│ │ ├── cortexreporting
│ │ │ └── Dockerfile
│ │ ├── id
│ │ │ └── Dockerfile
│ │ ├── mssql-init
│ │ │ └── Dockerfile
│ │ ├── prc
│ │ │ └── Dockerfile
│ │ ├── redis
│ │ │ └── Dockerfile
│ │ ├── rep
│ │ │ └── Dockerfile
│ │ ├── solr-init
│ │ │ └── Dockerfile
│ │ ├── xconnect
│ │ │ └── Dockerfile
│ │ ├── xdbautomation
│ │ │ └── Dockerfile
│ │ ├── xdbautomationrpt
│ │ │ └── Dockerfile
│ │ ├── xdbautomationworker
│ │ │ └── Dockerfile
│ │ ├── xdbcollection
│ │ │ └── Dockerfile
│ │ ├── xdbrefdata
│ │ │ └── Dockerfile
│ │ ├── xdbsearch
│ │ │ └── Dockerfile
│ │ └── xdbsearchworker
│ │ │ └── Dockerfile
│ ├── clean.ps1
│ ├── data
│ │ ├── cd
│ │ │ └── .gitkeep
│ │ ├── cm
│ │ │ └── .gitkeep
│ │ ├── devicedetection
│ │ │ └── .gitkeep
│ │ ├── mssql
│ │ │ └── .gitkeep
│ │ └── solr
│ │ │ └── .gitkeep
│ ├── deploy
│ │ ├── website
│ │ │ └── .gitkeep
│ │ └── xconnect
│ │ │ └── .gitkeep
│ └── traefik
│ │ ├── certs
│ │ └── .gitkeep
│ │ └── config
│ │ └── dynamic
│ │ └── certs_config.yaml
├── down.ps1
├── init.ps1
├── nuget.config
└── src
│ ├── App.XConnect.Demo
│ ├── App.XConnect.Demo.csproj
│ ├── App.config
│ ├── Program.cs
│ └── Properties
│ │ └── AssemblyInfo.cs
│ ├── App.XConnect.ModelBuilder
│ ├── App.XConnect.ModelBuilder.csproj
│ ├── App.config
│ ├── Program.cs
│ └── Properties
│ │ └── AssemblyInfo.cs
│ ├── DockerExamples.Website
│ ├── App_Config
│ │ └── Include
│ │ │ └── DockerExamples.XConnect.config
│ ├── DockerExamples.Website.csproj
│ ├── DockerExamples.Website.wpp.targets
│ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ └── PublishProfiles
│ │ │ └── DockerDeploy.pubxml
│ ├── Web.config.xdt
│ ├── images
│ │ └── docker-logo.png
│ └── layouts
│ │ └── Sample Inner Sublayout.ascx
│ ├── DockerExamples.XConnect.Model
│ ├── DemoFacet.cs
│ ├── DemoModel.cs
│ ├── DockerExamples.XConnect.Model.csproj
│ ├── DockerExamples.XConnect.Model.wpp.targets
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── Web.config
│ └── DockerExamples.XConnect
│ ├── App_Data
│ ├── Config
│ │ └── Sitecore
│ │ │ └── MarketingAutomation
│ │ │ └── sc.DockerExamples.DemoModel.xml
│ └── Models
│ │ └── DockerExamples.XConnect.Model.DemoModel, 1.0.json
│ ├── DockerExamples.XConnect.csproj
│ ├── DockerExamples.XConnect.wpp.targets
│ └── Properties
│ ├── AssemblyInfo.cs
│ └── PublishProfiles
│ └── DockerDeploy.pubxml
└── getting-started
├── .env
├── .gitignore
├── clean.ps1
├── device-detection-data
└── .gitkeep
├── docker-compose.yml
├── init.ps1
├── mssql-data
└── .gitkeep
├── solr-data
└── .gitkeep
└── traefik
├── certs
└── .gitkeep
└── config
└── dynamic
└── certs_config.yaml
/.gitattributes:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | # Do not adjust line endings on Sitecore .item files
5 | *.item -text
6 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Ignore thumbnails created by Windows
2 | Thumbs.db
3 | # Ignore files built by Visual Studio
4 | *.obj
5 | *.exe
6 | *.pdb
7 | *.user
8 | *.aps
9 | *.pch
10 | *.vspscc
11 | *_i.c
12 | *_p.c
13 | *.ncb
14 | *.suo
15 | *.tlb
16 | *.tlh
17 | *.bak
18 | *.zip
19 | *.cache
20 | *.ilk
21 | *.log
22 | [Bb]in
23 | [Dd]ebug*/
24 | *.lib
25 | *.sbr
26 | obj/
27 | [Rr]elease*/
28 | _ReSharper*/
29 | [Tt]est[Rr]esult*
30 | .vs/
31 | .vscode/
32 | packages/
33 | # Device Detection Data files
34 | docker/devicedetection/*.lock
35 | docker/devicedetection/*.hash
--------------------------------------------------------------------------------
/GettingStartedSetup/SetupDependecies/run/sitecore-xm1/docker-compose.override.yml:
--------------------------------------------------------------------------------
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://cd/sitecore/api/layout/render/jss"
56 | Analytics__SitecoreInstanceUri: "http://cd"
57 | JSS_EDITING_SECRET: ${JSS_EDITING_SECRET}
58 | depends_on:
59 | - solution
60 | - cd
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 | # Redis
75 | redis:
76 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-redis:${VERSION:-latest}
77 | build:
78 | context: ../../docker/build/redis
79 | args:
80 | PARENT_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-redis:${SITECORE_VERSION}
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:
85 | volumes:
86 | - type: bind
87 | source: ${LOCAL_DATA_PATH}\sql
88 | target: c:\data
89 |
90 | # Mount our SQL data folder and use our custom image with the Headless Services (JSS)
91 | # module data added. See Dockerfile for details.
92 | mssql-init:
93 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xm1-mssql-init:${VERSION:-latest}
94 | build:
95 | context: ../../docker/build/mssql-init
96 | args:
97 | PARENT_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xm1-mssql-init:${SITECORE_VERSION}
98 | HEADLESS_SERVICES_IMAGE: ${HEADLESS_SERVICES_IMAGE}
99 |
100 | # Some modules (like SXA) also require additions to the Solr image.
101 | solr:
102 | volumes:
103 | - type: bind
104 | source: ${LOCAL_DATA_PATH}\solr
105 | target: c:\data
106 |
107 | # Mount our Solr data folder and use our retagged Solr image.
108 | # Some modules (like SXA) also require additions to the Solr image.
109 | solr-init:
110 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xm1-solr-init:${VERSION:-latest}
111 | build:
112 | context: ../../docker/build/solr-init
113 | args:
114 | PARENT_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xm1-solr-init:${SITECORE_VERSION}
115 |
116 | # Use our retagged Identity Server image.
117 | # Configure for a mounted license file instead of using SITECORE_LICENSE.
118 | id:
119 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-id6:${VERSION:-latest}
120 | build:
121 | context: ../../docker/build/id
122 | args:
123 | PARENT_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-id6:${SITECORE_VERSION}
124 | volumes:
125 | - ${HOST_LICENSE_FOLDER}:c:\license
126 | environment:
127 | SITECORE_LICENSE_LOCATION: c:\license\license.xml
128 |
129 | # Use our custom CD (XP1) image with added modules and solution code.
130 | # Folders are mounted below for code deployment and log output. See Dockerfile for details.
131 | # Configure for a mounted license file instead of using SITECORE_LICENSE.
132 | cd:
133 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xm1-cd:${VERSION:-latest}
134 | build:
135 | context: ../../docker/build/cd
136 | args:
137 | PARENT_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xm1-cd:${SITECORE_VERSION}
138 | SOLUTION_IMAGE: ${REGISTRY}${COMPOSE_PROJECT_NAME}-solution:${VERSION:-latest}
139 | TOOLS_IMAGE: ${TOOLS_IMAGE}
140 | MANAGEMENT_SERVICES_IMAGE: ${MANAGEMENT_SERVICES_IMAGE}
141 | HEADLESS_SERVICES_IMAGE: ${HEADLESS_SERVICES_IMAGE}
142 | depends_on:
143 | - solution
144 | volumes:
145 | - ${LOCAL_DEPLOY_PATH}\cd:C:\deploy
146 | - ${LOCAL_DATA_PATH}\cd:C:\inetpub\wwwroot\App_Data\logs
147 | - ${HOST_LICENSE_FOLDER}:c:\license
148 | environment:
149 | SITECORE_LICENSE_LOCATION: c:\license\license.xml
150 | # Use our custom CM (XP0 Standalone) image with added modules and solution code.
151 | # Folders are mounted below for code deployment and log output. See Dockerfile for details.
152 | # Configure for a mounted license file instead of using SITECORE_LICENSE.
153 | cm:
154 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xm1-cm:${VERSION:-latest}
155 | build:
156 | context: ../../docker/build/cm
157 | args:
158 | PARENT_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xm1-cm:${SITECORE_VERSION}
159 | SOLUTION_IMAGE: ${REGISTRY}${COMPOSE_PROJECT_NAME}-solution:${VERSION:-latest}
160 | TOOLS_IMAGE: ${TOOLS_IMAGE}
161 | MANAGEMENT_SERVICES_IMAGE: ${MANAGEMENT_SERVICES_IMAGE}
162 | HEADLESS_SERVICES_IMAGE: ${HEADLESS_SERVICES_IMAGE}
163 | depends_on:
164 | - solution
165 | volumes:
166 | - ${LOCAL_DEPLOY_PATH}\platform:C:\deploy
167 | - ${LOCAL_DATA_PATH}\cm:C:\inetpub\wwwroot\App_Data\logs
168 | - ${HOST_LICENSE_FOLDER}:c:\license
169 | environment:
170 | SITECORE_LICENSE_LOCATION: c:\license\license.xml
171 | RENDERING_HOST_PUBLIC_URI: "https://${RENDERING_HOST}"
172 | ## Development Environment Optimizations
173 | SITECORE_DEVELOPMENT_PATCHES: DevEnvOn,CustomErrorsOff,HttpErrorsDetailed,DebugOn,DiagnosticsOff,InitMessagesOff,RobotDetectionOff
174 | Sitecore_AppSettings_exmEnabled:define: "no" # remove to turn on EXM
175 | SITECORE_JSS_EDITING_SECRET: ${JSS_EDITING_SECRET}
176 | entrypoint: powershell.exe -Command "& C:/tools/entrypoints/iis/Development.ps1"
177 |
--------------------------------------------------------------------------------
/GettingStartedSetup/SetupDependecies/run/sitecore-xp0/docker-compose.override.yml:
--------------------------------------------------------------------------------
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\
201 |
--------------------------------------------------------------------------------
/GettingStartedSetup/SetupDependecies/run/sitecore-xp1/docker-compose.override.yml:
--------------------------------------------------------------------------------
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://cd/sitecore/api/layout/render/jss"
56 | Analytics__SitecoreInstanceUri: "http://cd"
57 | JSS_EDITING_SECRET: ${JSS_EDITING_SECRET}
58 | depends_on:
59 | - solution
60 | - cd
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 | # Redis
75 | redis:
76 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-redis:${VERSION:-latest}
77 | build:
78 | context: ../../docker/build/redis
79 | args:
80 | PARENT_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-redis:${SITECORE_VERSION}
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:
85 | volumes:
86 | - type: bind
87 | source: ${LOCAL_DATA_PATH}\sql
88 | target: c:\data
89 |
90 | # Mount our SQL data folder and use our custom image with the Headless Services (JSS)
91 | # module data added. See Dockerfile for details.
92 | mssql-init:
93 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp1-mssql-init:${VERSION:-latest}
94 | build:
95 | context: ../../docker/build/mssql-init
96 | args:
97 | PARENT_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-mssql-init:${SITECORE_VERSION}
98 | HEADLESS_SERVICES_IMAGE: ${HEADLESS_SERVICES_IMAGE}
99 |
100 | # Some modules (like SXA) also require additions to the Solr image.
101 | solr:
102 | volumes:
103 | - type: bind
104 | source: ${LOCAL_DATA_PATH}\solr
105 | target: c:\data
106 |
107 | # Mount our Solr data folder and use our retagged Solr image.
108 | # Some modules (like SXA) also require additions to the Solr image.
109 | solr-init:
110 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp1-solr-init:${VERSION:-latest}
111 | build:
112 | context: ../../docker/build/solr-init
113 | args:
114 | PARENT_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-solr-init:${SITECORE_VERSION}
115 |
116 | # Use our retagged Identity Server image.
117 | # Configure for a mounted license file instead of using SITECORE_LICENSE.
118 | id:
119 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-id6:${VERSION:-latest}
120 | build:
121 | context: ../../docker/build/id
122 | args:
123 | PARENT_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-id6:${SITECORE_VERSION}
124 | volumes:
125 | - ${HOST_LICENSE_FOLDER}:c:\license
126 | environment:
127 | SITECORE_LICENSE_LOCATION: c:\license\license.xml
128 |
129 | # Use our custom CD (XP1) image with added modules and solution code.
130 | # Folders are mounted below for code deployment and log output. See Dockerfile for details.
131 | # Configure for a mounted license file instead of using SITECORE_LICENSE.
132 | cd:
133 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp1-cd:${VERSION:-latest}
134 | build:
135 | context: ../../docker/build/cd
136 | args:
137 | PARENT_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-cd:${SITECORE_VERSION}
138 | SOLUTION_IMAGE: ${REGISTRY}${COMPOSE_PROJECT_NAME}-solution:${VERSION:-latest}
139 | TOOLS_IMAGE: ${TOOLS_IMAGE}
140 | MANAGEMENT_SERVICES_IMAGE: ${MANAGEMENT_SERVICES_IMAGE}
141 | HEADLESS_SERVICES_IMAGE: ${HEADLESS_SERVICES_IMAGE}
142 | depends_on:
143 | - solution
144 | volumes:
145 | - ${LOCAL_DEPLOY_PATH}\cd:C:\deploy
146 | - ${LOCAL_DATA_PATH}\cd:C:\inetpub\wwwroot\App_Data\logs
147 | - ${HOST_LICENSE_FOLDER}:c:\license
148 | environment:
149 | SITECORE_LICENSE_LOCATION: c:\license\license.xml
150 | # Use our custom CM (XP0 Standalone) image with added modules and solution code.
151 | # Folders are mounted below for code deployment and log output. See Dockerfile for details.
152 | # Configure for a mounted license file instead of using SITECORE_LICENSE.
153 | cm:
154 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp1-cm:${VERSION:-latest}
155 | build:
156 | context: ../../docker/build/cm
157 | args:
158 | PARENT_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-cm:${SITECORE_VERSION}
159 | SOLUTION_IMAGE: ${REGISTRY}${COMPOSE_PROJECT_NAME}-solution:${VERSION:-latest}
160 | TOOLS_IMAGE: ${TOOLS_IMAGE}
161 | MANAGEMENT_SERVICES_IMAGE: ${MANAGEMENT_SERVICES_IMAGE}
162 | HEADLESS_SERVICES_IMAGE: ${HEADLESS_SERVICES_IMAGE}
163 | depends_on:
164 | - solution
165 | volumes:
166 | - ${LOCAL_DEPLOY_PATH}\platform:C:\deploy
167 | - ${LOCAL_DATA_PATH}\cm:C:\inetpub\wwwroot\App_Data\logs
168 | - ${HOST_LICENSE_FOLDER}:c:\license
169 | environment:
170 | SITECORE_LICENSE_LOCATION: c:\license\license.xml
171 | RENDERING_HOST_PUBLIC_URI: "https://${RENDERING_HOST}"
172 | ## Development Environment Optimizations
173 | SITECORE_DEVELOPMENT_PATCHES: DevEnvOn,CustomErrorsOff,HttpErrorsDetailed,DebugOn,DiagnosticsOff,InitMessagesOff,RobotDetectionOff
174 | Sitecore_AppSettings_exmEnabled:define: "no" # remove to turn on EXM
175 | SITECORE_JSS_EDITING_SECRET: ${JSS_EDITING_SECRET}
176 | entrypoint: powershell.exe -Command "&C:/tools/entrypoints/iis/Development.ps1"
177 |
178 | # Use our retagged Prc image.
179 | # Configure for a mounted license folder instead of using SITECORE_LICENSE.
180 | # Note: Prc roles expect a folder with license.xml, not the file itself.
181 | prc:
182 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp1-prc:${VERSION:-latest}
183 | build:
184 | context: ../../docker/build/prc
185 | args:
186 | PARENT_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-prc:${SITECORE_VERSION}
187 | volumes:
188 | - ${HOST_LICENSE_FOLDER}:c:\license
189 | environment:
190 | SITECORE_LICENSE_LOCATION: c:\license\license.xml
191 |
192 | # Use our retagged xdbcollection image.
193 | # Configure for a mounted license folder instead of using SITECORE_LICENSE.
194 | # Note: xdbcollection roles expect a folder with license.xml, not the file itself.
195 | xdbcollection:
196 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp1-xdbcollection:${VERSION:-latest}
197 | build:
198 | context: ../../docker/build/xdbcollection
199 | args:
200 | PARENT_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-xdbcollection:${SITECORE_VERSION}
201 | volumes:
202 | - ${HOST_LICENSE_FOLDER}:c:\license
203 | environment:
204 | SITECORE_LICENSE_LOCATION: c:\license\
205 |
206 | # Use our retagged xdbsearch image.
207 | # Configure for a mounted license folder instead of using SITECORE_LICENSE.
208 | # Note: xdbsearch roles expect a folder with license.xml, not the file itself.
209 | xdbsearch:
210 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp1-xdbsearch:${VERSION:-latest}
211 | build:
212 | context: ../../docker/build/xdbsearch
213 | args:
214 | PARENT_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-xdbsearch:${SITECORE_VERSION}
215 | volumes:
216 | - ${HOST_LICENSE_FOLDER}:c:\license
217 | environment:
218 | SITECORE_LICENSE_LOCATION: c:\license\
219 |
220 | # Use our retagged xdbautomation image.
221 | # Configure for a mounted license folder instead of using SITECORE_LICENSE.
222 | # Note: xdbautomation roles expect a folder with license.xml, not the file itself.
223 | xdbautomation:
224 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp1-xdbautomation:${VERSION:-latest}
225 | build:
226 | context: ../../docker/build/xdbautomation
227 | args:
228 | PARENT_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-xdbautomation:${SITECORE_VERSION}
229 | volumes:
230 | - ${HOST_LICENSE_FOLDER}:c:\license
231 | environment:
232 | SITECORE_LICENSE_LOCATION: c:\license\
233 |
234 | # Use our retagged xdbautomationrpt image.
235 | # Configure for a mounted license folder instead of using SITECORE_LICENSE.
236 | # Note: xdbautomationrpt roles expect a folder with license.xml, not the file itself.
237 | xdbautomationrpt:
238 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp1-xdbautomationrpt:${VERSION:-latest}
239 | build:
240 | context: ../../docker/build/xdbautomationrpt
241 | args:
242 | PARENT_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-xdbautomationrpt:${SITECORE_VERSION}
243 | volumes:
244 | - ${HOST_LICENSE_FOLDER}:c:\license
245 | environment:
246 | SITECORE_LICENSE_LOCATION: c:\license\
247 |
248 | # Use our retagged cortexprocessing image.
249 | # Configure for a mounted license folder instead of using SITECORE_LICENSE.
250 | # Note: cortexprocessing roles expect a folder with license.xml, not the file itself.
251 | cortexprocessing:
252 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp1-cortexprocessing:${VERSION:-latest}
253 | build:
254 | context: ../../docker/build/cortexprocessing
255 | args:
256 | PARENT_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-cortexprocessing:${SITECORE_VERSION}
257 | volumes:
258 | - ${HOST_LICENSE_FOLDER}:c:\license
259 | environment:
260 | SITECORE_LICENSE_LOCATION: c:\license\
261 |
262 | # Use our retagged cortexreporting image.
263 | # Configure for a mounted license folder instead of using SITECORE_LICENSE.
264 | # Note: cortexreporting roles expect a folder with license.xml, not the file itself.
265 | cortexreporting:
266 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp1-cortexreporting:${VERSION:-latest}
267 | build:
268 | context: ../../docker/build/cortexreporting
269 | args:
270 | PARENT_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-cortexreporting:${SITECORE_VERSION}
271 | volumes:
272 | - ${HOST_LICENSE_FOLDER}:c:\license
273 | environment:
274 | SITECORE_LICENSE_LOCATION: c:\license\
275 |
276 | # Use our retagged xdbrefdata image.
277 | # Configure for a mounted license folder instead of using SITECORE_LICENSE.
278 | # Note: xdbrefdata roles expect a folder with license.xml, not the file itself.
279 | xdbrefdata:
280 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp1-xdbrefdata:${VERSION:-latest}
281 | build:
282 | context: ../../docker/build/xdbrefdata
283 | args:
284 | PARENT_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-xdbrefdata:${SITECORE_VERSION}
285 | volumes:
286 | - ${HOST_LICENSE_FOLDER}:c:\license
287 | environment:
288 | SITECORE_LICENSE_LOCATION: c:\license\
289 |
290 | # Use our retagged XConnect Search Indexer image.
291 | # Configure for a mounted license folder instead of using SITECORE_LICENSE.
292 | xdbsearchworker:
293 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp1-xdbsearchworker:${VERSION:-latest}
294 | build:
295 | context: ../../docker/build/xdbsearchworker
296 | args:
297 | PARENT_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-xdbsearchworker:${SITECORE_VERSION}
298 | volumes:
299 | - ${HOST_LICENSE_FOLDER}:c:\license
300 | environment:
301 | SITECORE_LICENSE_LOCATION: c:\license\
302 |
303 | # Use our retagged Marketing Automation Engine image.
304 | # Configure for a mounted license folder instead of using SITECORE_LICENSE.
305 | xdbautomationworker:
306 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp1-xdbautomationworker:${VERSION:-latest}
307 | build:
308 | context: ../../docker/build/xdbautomationworker
309 | args:
310 | PARENT_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-xdbautomationworker:${SITECORE_VERSION}
311 | volumes:
312 | - ${HOST_LICENSE_FOLDER}:c:\license
313 | environment:
314 | SITECORE_LICENSE_LOCATION: c:\license\
315 |
316 | # Use our retagged Cortex Processing Engine image.
317 | # Configure for a mounted license folder instead of using SITECORE_LICENSE.
318 | cortexprocessingworker:
319 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp1-cortexprocessingworker:${VERSION:-latest}
320 | build:
321 | context: ../../docker/build/cortexprocessingworker
322 | args:
323 | PARENT_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-cortexprocessingworker:${SITECORE_VERSION}
324 | volumes:
325 | - ${HOST_LICENSE_FOLDER}:c:\license
326 | environment:
327 | SITECORE_LICENSE_LOCATION: c:\license\
328 |
--------------------------------------------------------------------------------
/GettingStartedSetup/SitecoreHeadless_WithContainers.ps1:
--------------------------------------------------------------------------------
1 | $RootScriptPath = Get-Location;
2 | $MachineName = $env:computername;
3 |
4 | function SitecoreHeadless-Environment-Autotmation {
5 |
6 | try
7 | {
8 | if ((Test-Path $RootScriptPath))
9 | {
10 | Write-Host "The {$RootScriptPath} folder does exist.";
11 |
12 | try
13 | {
14 | Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass;
15 | $envLicenseFileSourcePath = ("{0}\\SetupDependecies\\license.xml" -f $RootScriptPath);
16 | $envRunFolderSourcePath = ("{0}\\SetupDependecies\\run" -f $RootScriptPath);
17 | $envDestPath = ("{0}\\MyProject" -f $RootScriptPath);
18 | if ($cleanInstall)
19 | {
20 | Write-Host "The {$envLicenseDestPath} folder is recursively being removed before executing clean npm install.";
21 | Remove-Item .\MyProject -Force -Recurse;
22 | }
23 | dotnet new -i Sitecore.DevEx.Templates --nuget-source https://sitecore.myget.org/F/sc-packages/api/v3/index.json
24 | echo y | dotnet new sitecore.aspnet.gettingstarted -n MyProject;
25 |
26 | Copy-Item $envLicenseFileSourcePath $envDestPath -Force;
27 | Write-Host "The {$envLicenseFileSourcePath} file was just copied.";
28 |
29 | if ($switchRunFolderSource)
30 | {
31 | Copy-Item $envRunFolderSourcePath $envDestPath -Force -Recurse;
32 | Write-Host "The {$envRunFolderSourcePath} folder was just copied.";
33 | }
34 |
35 | cd $envDestPath;
36 | iisreset /stop;
37 | powershell.exe -executionpolicy bypass -file .\init.ps1 -InitEnv -LicenseXmlPath ".\license.xml" -AdminPassword "b";
38 | powershell.exe -executionpolicy bypass -file .\up.ps1;
39 | }
40 | catch
41 | {
42 | Quit ("An Exception error occured in the npm packages restore automation method. {0}." -f $Error[0]);
43 | }
44 | }
45 | }
46 | catch
47 | {
48 | Quit ("An Exception error occured in the SitecoreHeadless-Environment-Autotmation method. {0}." -f $Error[0]);
49 | }
50 | }
51 |
52 | function Quit($Text)
53 | {
54 | Write-Warning $Text;
55 | cd $RootScriptPath;
56 | Break Script;
57 | }
58 |
59 | [bool] $cleanInstall = $false;
60 | [bool] $switchRunFolderSource = $false;
61 | if ($args[0])
62 | {
63 | $cleanInstall = $true;
64 | }
65 | if ($args[1])
66 | {
67 | $switchRunFolderSource = $true;
68 | }
69 | Write-Host "The cleanInstall param is set to {$cleanInstall}.";
70 | Write-Host "The switchRunFolderSource param is set to {$switchRunFolderSource}.";
71 |
72 |
73 | Set-ItemProperty 'HKLM:\System\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled' -value 1 -Force;
74 | Write-Host "SitecoreHeadless-Environment Autotmation Setup with Dependencies - Started";
75 | SitecoreHeadless-Environment-Autotmation;
76 | Write-Host "SitecoreHeadless-Environment Autotmation Setup with Dependencies - Completed";
77 | cd -Path $RootScriptPath;
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 Sitecore
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Sitecore Docker Examples
2 |
3 | This repository contains companion code for the [Sitecore Containers documentation](https://doc.sitecore.com/xp/en/developers/latest/developer-tools/containers-in-sitecore-development.html). Together, these are meant to help you get started using [Docker](https://www.docker.com/) containers with Sitecore.
4 |
5 | Briefly, here's what you'll find in this repo:
6 |
7 | * Example for running an out of the box Sitecore instance (see `getting-started`).
8 | * Example solution for creating custom Sitecore images, with recommended folder structure for container development (see `custom-images`).
9 | * Sample PowerShell scripts for container-based Sitecore instance preparation (`init.ps1`) and cleanup (`clean.ps1`).
10 | * Docker compose files for building Sitecore instances in various topologies (see `custom-images`).
11 |
12 | Please refer to the [Sitecore Containers documentation](https://doc.sitecore.com/xp/en/developers/latest/developer-tools/containers-in-sitecore-development.html) for complete details, including running the examples and recommended usage.
13 |
14 | ## Are Docker Examples supported by Sitecore?
15 |
16 | Sitecore maintains the Sitecore Containers documentation and Docker Examples, but example code is not supported by Sitecore Product Support Services. Please do not submit support tickets regarding Docker Examples.
17 |
18 | ## How can I get help with Docker Examples?
19 |
20 | Start with the [Sitecore Containers documentation](https://doc.sitecore.com/xp/en/developers/latest/developer-tools/containers-in-sitecore-development.html). For technical issues in particular, check out the [Troubleshooting guide](https://doc.sitecore.com/xp/en/developers/latest/developer-tools/troubleshooting-docker.html)
21 |
22 | Beyond that, for usage questions regarding Docker Examples installation or code, or general questions about Sitecore Containers, please utilize [Sitecore StackExchange](https://sitecore.stackexchange.com/questions/tagged/docker) or [#docker](https://sitecorechat.slack.com/messages/docker) on [Sitecore Community Slack](https://sitecore.chat/).
23 |
24 | You can use GitHub to submit [issues](https://github.com/Sitecore/docker-examples/issues/new) for Docker Examples, but please do not submit usage questions.
25 |
26 | ## Steps to setup on the your local Windows machine:
27 |
28 | 1. Download and install Docker Desktop for Windows: https://docs.docker.com/desktop/install/windows-install/
29 | - See documentation to learn more: https://docs.docker.com/get-started/overview/
30 | 2. Create a folder on your local drive, e.g. 'C:\Sitecore Headless'
31 | - Open the folder 'C:\Sitecore Headless' in Windows File Explorer
32 | - Open GitBash command prompt and execute the following git command:
33 | - git clone https://github.com/Sitecore/docker-examples.git
34 | - Open Windows Powershell as Administrator
35 | - Execute the following powersell commands:
36 | - cd "C:\Sitecore Headless"
37 | - Copy-Item "C:\Sitecore Headless\docker-examples\GettingStartedSetup\SetupDependecies" "C:\Sitecore Headless" -Force;
38 | - Copy-Item "C:\Sitecore Headless\docker-examples\GettingStartedSetup\SitecoreHeadless_WithContainers.ps1" "C:\Sitecore Headless" -Force;
39 | - Manually copy your company's own license file into the "C:\Sitecore Headless\SetupDependecies" folder.
40 | - powershell.exe -executionpolicy bypass -file .\SitecoreHeadless_WithContainers.ps1 true true
41 | - Note the first 'true' param in the above command is for a $cleanInstall, i.e. removes the 'MyProject' folder instance created from any previous installation.
42 | - Note the second 'true' param the above command is for a $switchRunFolderSource (optional param), i.e. copies the content of the 'C:\Sitecore Headless\docker-examples\GettingStartedSetup\SetupDependecies\run' folder into
43 | the newly created 'MyProject' folder instance created from this installation.
44 | - The $switchRunFolderSource param is only if you require custom 'run' folder scripts,
45 | i.e. any script commands changes from 'powershell.exe -Command "& C:\tools\entrypoints\iis\Development.ps1' to 'powershell.exe -Command "& C:/tools/entrypoints/iis/Development.ps1'
46 | - Note this is only in instance when your windows instance an issue with the backslashes in the script command.
47 |
--------------------------------------------------------------------------------
/custom-images/.dockerignore:
--------------------------------------------------------------------------------
1 | # folders
2 | .git
3 | .gitignore
4 | .vs
5 | .vscode
6 | build
7 | docker
8 | packages
9 | **/bin/
10 | **/obj/
11 | **/out/
12 |
13 | # files
14 | *Dockerfile
15 | docker-compose*
16 | **/*.md
17 | *.ps1
--------------------------------------------------------------------------------
/custom-images/.env:
--------------------------------------------------------------------------------
1 | COMPOSE_PROJECT_NAME=docker-examples
2 | REGISTRY=
3 | VERSION=
4 |
5 | SOLR_PORT=8984
6 | HTTPS_PORT=443
7 | TRAEFIK_MANAGEMENT_PORT=8079
8 | MSSQL_PORT=14330
9 | XCONNECT_PORT=8081
10 |
11 | SOLUTION_BUILD_IMAGE=mcr.microsoft.com/dotnet/framework/sdk:4.8
12 | SOLUTION_BASE_IMAGE=mcr.microsoft.com/windows/nanoserver:1809
13 | BUILD_CONFIGURATION=debug
14 |
15 | LOCAL_DEPLOY_PATH=.\docker\deploy
16 | LOCAL_DATA_PATH=.\docker\data
17 |
18 | CD_HOST=cd.dockerexamples.localhost
19 | CM_HOST=cm.dockerexamples.localhost
20 | ID_HOST=id.dockerexamples.localhost
21 |
22 | SITECORE_DOCKER_REGISTRY=scr.sitecore.com/sxp/
23 | SITECORE_TOOLS_REGISTRY=scr.sitecore.com/tools/
24 | SITECORE_MODULE_REGISTRY=scr.sitecore.com/sxp/modules/
25 | SITECORE_VERSION=10.3.1-ltsc2019
26 | TOOLS_VERSION=10.3.0-1809
27 | SPE_VERSION=6.4.0.65-1809
28 | SXA_VERSION=10.3-1809
29 | EXTERNAL_IMAGE_TAG_SUFFIX=ltsc2019
30 |
31 | SITECORE_ADMIN_PASSWORD=
32 | REPORTING_API_KEY=
33 | TELERIK_ENCRYPTION_KEY=
34 | SITECORE_IDSECRET=
35 | SITECORE_ID_CERTIFICATE=
36 | SITECORE_ID_CERTIFICATE_PASSWORD=
37 | SITECORE_LICENSE=
38 | TRAEFIK_IMAGE=traefik:v2.2.0-windowsservercore-1809
39 | TRAEFIK_ISOLATION=hyperv
40 | ISOLATION=default
41 | SOLR_CORE_PREFIX_NAME=sitecore
42 | MEDIA_REQUEST_PROTECTION_SHARED_SECRET=
43 | LOG_LEVEL_VALUE=INFO
44 |
45 | SITECORE_GRAPHQL_UPLOADMEDIAOPTIONS_ENCRYPTIONKEY=432A462D4A614E64
46 | SITECORE_GRAPHQL_ENABLED=false
47 | SITECORE_GRAPHQL_EXPOSEPLAYGROUND=false
48 |
49 | SQL_SERVER=mssql
50 | SQL_SA_LOGIN=sa
51 | SQL_SA_PASSWORD=
52 | SQL_CUSTOM_DATABASE_PREFIX_UPDATE_FROM=
53 | SQL_DATABASE_PREFIX=Sitecore
54 |
55 | HOST_LICENSE_FOLDER=C:\License
56 |
--------------------------------------------------------------------------------
/custom-images/Directory.Build.targets:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/custom-images/DockerExamples.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.30002.166
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DockerExamples.Website", "src\DockerExamples.Website\DockerExamples.Website.csproj", "{B062D0AC-C7AB-448A-AB55-0791E7AC974A}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DockerExamples.XConnect", "src\DockerExamples.XConnect\DockerExamples.XConnect.csproj", "{5A9AB6CC-9800-4725-9967-16A58123D394}"
9 | EndProject
10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DockerExamples.XConnect.Model", "src\DockerExamples.XConnect.Model\DockerExamples.XConnect.Model.csproj", "{16DC2062-E853-44BB-A006-BC1F4CD5BBCF}"
11 | EndProject
12 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "App.XConnect.ModelBuilder", "src\App.XConnect.ModelBuilder\App.XConnect.ModelBuilder.csproj", "{C6144D27-3F34-4761-B040-CB9E8C56955E}"
13 | EndProject
14 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".app", ".app", "{D9AF16A6-F9A5-4E42-A37B-A440E8CEACC5}"
15 | EndProject
16 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "App.XConnect.Demo", "src\App.XConnect.Demo\App.XConnect.Demo.csproj", "{2FF4ECD0-C43F-4BE2-A261-C386EFFD335E}"
17 | EndProject
18 | Global
19 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
20 | Debug|Any CPU = Debug|Any CPU
21 | Release|Any CPU = Release|Any CPU
22 | EndGlobalSection
23 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
24 | {B062D0AC-C7AB-448A-AB55-0791E7AC974A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
25 | {B062D0AC-C7AB-448A-AB55-0791E7AC974A}.Debug|Any CPU.Build.0 = Debug|Any CPU
26 | {B062D0AC-C7AB-448A-AB55-0791E7AC974A}.Release|Any CPU.ActiveCfg = Release|Any CPU
27 | {B062D0AC-C7AB-448A-AB55-0791E7AC974A}.Release|Any CPU.Build.0 = Release|Any CPU
28 | {5A9AB6CC-9800-4725-9967-16A58123D394}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
29 | {5A9AB6CC-9800-4725-9967-16A58123D394}.Debug|Any CPU.Build.0 = Debug|Any CPU
30 | {5A9AB6CC-9800-4725-9967-16A58123D394}.Release|Any CPU.ActiveCfg = Release|Any CPU
31 | {5A9AB6CC-9800-4725-9967-16A58123D394}.Release|Any CPU.Build.0 = Release|Any CPU
32 | {16DC2062-E853-44BB-A006-BC1F4CD5BBCF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
33 | {16DC2062-E853-44BB-A006-BC1F4CD5BBCF}.Debug|Any CPU.Build.0 = Debug|Any CPU
34 | {16DC2062-E853-44BB-A006-BC1F4CD5BBCF}.Release|Any CPU.ActiveCfg = Release|Any CPU
35 | {16DC2062-E853-44BB-A006-BC1F4CD5BBCF}.Release|Any CPU.Build.0 = Release|Any CPU
36 | {C6144D27-3F34-4761-B040-CB9E8C56955E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
37 | {C6144D27-3F34-4761-B040-CB9E8C56955E}.Debug|Any CPU.Build.0 = Debug|Any CPU
38 | {C6144D27-3F34-4761-B040-CB9E8C56955E}.Release|Any CPU.ActiveCfg = Release|Any CPU
39 | {C6144D27-3F34-4761-B040-CB9E8C56955E}.Release|Any CPU.Build.0 = Release|Any CPU
40 | {2FF4ECD0-C43F-4BE2-A261-C386EFFD335E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
41 | {2FF4ECD0-C43F-4BE2-A261-C386EFFD335E}.Debug|Any CPU.Build.0 = Debug|Any CPU
42 | {2FF4ECD0-C43F-4BE2-A261-C386EFFD335E}.Release|Any CPU.ActiveCfg = Release|Any CPU
43 | {2FF4ECD0-C43F-4BE2-A261-C386EFFD335E}.Release|Any CPU.Build.0 = Release|Any CPU
44 | EndGlobalSection
45 | GlobalSection(SolutionProperties) = preSolution
46 | HideSolutionNode = FALSE
47 | EndGlobalSection
48 | GlobalSection(NestedProjects) = preSolution
49 | {C6144D27-3F34-4761-B040-CB9E8C56955E} = {D9AF16A6-F9A5-4E42-A37B-A440E8CEACC5}
50 | {2FF4ECD0-C43F-4BE2-A261-C386EFFD335E} = {D9AF16A6-F9A5-4E42-A37B-A440E8CEACC5}
51 | EndGlobalSection
52 | GlobalSection(ExtensibilityGlobals) = postSolution
53 | SolutionGuid = {44094B79-5407-4492-B8D1-B0EA37325E6E}
54 | EndGlobalSection
55 | EndGlobal
56 |
--------------------------------------------------------------------------------
/custom-images/Dockerfile:
--------------------------------------------------------------------------------
1 | # escape=`
2 |
3 | ARG BASE_IMAGE
4 | ARG BUILD_IMAGE
5 |
6 | FROM ${BUILD_IMAGE} AS prep
7 | SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
8 |
9 | # Gather only artifacts necessary for NuGet restore, retaining directory structure
10 | COPY *.sln nuget.config Directory.Build.targets Packages.props \nuget\
11 | COPY src\ \temp\
12 | RUN Invoke-Expression 'robocopy C:\temp C:\nuget\src /s /ndl /njh /njs *.csproj *.scproj packages.config'
13 |
14 | FROM ${BUILD_IMAGE} AS builder
15 |
16 | ARG BUILD_CONFIGURATION
17 |
18 | SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
19 |
20 | # Create an empty working directory
21 | WORKDIR C:\build
22 |
23 | # Copy prepped NuGet artifacts, and restore as distinct layer to take better advantage of caching
24 | COPY --from=prep .\nuget .\
25 | RUN nuget restore
26 |
27 | # Copy remaining source code
28 | COPY src\ .\src\
29 |
30 | # Copy transforms, retaining directory structure
31 | RUN Invoke-Expression 'robocopy C:\build\src C:\out\transforms /s /ndl /njh /njs *.xdt'
32 |
33 | # Build website with file publish
34 | RUN msbuild .\src\DockerExamples.Website\DockerExamples.Website.csproj /p:Configuration=$env:BUILD_CONFIGURATION /p:DeployOnBuild=True /p:DeployDefaultTarget=WebPublish /p:WebPublishMethod=FileSystem /p:PublishUrl=C:\out\website
35 |
36 | # Build XConnect with file publish
37 | RUN msbuild .\src\DockerExamples.XConnect\DockerExamples.XConnect.csproj /p:Configuration=$env:BUILD_CONFIGURATION /p:DeployOnBuild=True /p:DeployDefaultTarget=WebPublish /p:WebPublishMethod=FileSystem /p:PublishUrl=C:\out\xconnect
38 |
39 | FROM ${BASE_IMAGE}
40 |
41 | WORKDIR C:\artifacts
42 |
43 | # Copy final build artifacts
44 | COPY --from=builder C:\out\website .\website\
45 | COPY --from=builder C:\out\transforms .\transforms\
46 | COPY --from=builder C:\out\xconnect .\xconnect\
--------------------------------------------------------------------------------
/custom-images/Packages.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 10.3.0
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/custom-images/README.md:
--------------------------------------------------------------------------------
1 | # Sitecore Custom Images
2 |
3 | Example solution for creating [custom Sitecore images](https://doc.sitecore.com/xp/en/developers/103/developer-tools/create-custom-sitecore-images.html), with recommended folder structure for container development.
4 |
5 | Please follow below steps to setup this repository on your local system
6 |
7 | ## Steps
8 |
9 | 1. Clone this repo
10 |
11 | 2. Open the PowerShell command prompt with `ADMIN` access
12 |
13 | 3. Go to the folder `custom-images` in the PowerShell window
14 |
15 | 4. Execute the `init.ps1` with `ADMIN` access and pass the license file path
16 |
17 | ```powershell
18 | .\init.ps1 -LicenseXmlPath ""
19 | ```
20 |
21 |
22 | 5. Build the appropriate Docker images and then start up.
23 |
24 | ```powershell
25 | .\clean-install.ps1
26 | ```
27 | - `.\clean-install.ps1 XP1` will create the XP Scaled environment
28 | - `.\clean-install.ps1 XM1` will create the XM environment
29 | - `.\clean-install.ps1` will create the XP0 environment
30 |
31 | The above command will create the specific Sitecore Topology environemnt.
32 |
33 | 6. Tear down and cleanup code changes when done.
34 | ```powershell
35 | .\down.ps1
36 | ```
37 | - `.\down.ps1 XP1` will clear artifacts for the XP Scaled environment
38 | - `.\down.ps1 XM1` will clear artifacts for the XM environment
39 | - `.\down.ps1` will clear artifacts for the XP0 environment
40 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/custom-images/clean-install.ps1:
--------------------------------------------------------------------------------
1 | param(
2 | $XM1
3 | )
4 |
5 |
6 | Write-Host "The purpose of this script to start setup from scratch`n" -ForegroundColor Magenta
7 | Write-Host " 1. Stop all containers`n" -ForegroundColor DarkCyan
8 | Write-Host " 2. Docker Prune -Remove all unused containers, networks, images (both dangling and unreferenced), and optionally, volumes`n" -ForegroundColor DarkCyan
9 | Write-Host " 3. Stop IIS, Stop/Start Host Network Service (HNS)`n" -ForegroundColor DarkCyan
10 | Write-Host " 4. Run .\clean.ps1 from Sitecore > Docker`n" -ForegroundColor DarkCyan
11 | Write-Host " 5. Restore Sitecore CLI Tool`n" -ForegroundColor DarkCyan
12 | Write-Host " 6. Run docker compose up command`n" -ForegroundColor DarkCyan
13 |
14 | Write-Host "`n`n1. Stop all containers..." -ForegroundColor Cyan
15 | docker container stop $(docker container ls -q --filter name=docker-examples*);
16 | docker-compose stop; docker-compose down
17 |
18 | Write-Host "`n`n2. Docker Prune" -ForegroundColor Cyan
19 | docker system prune
20 | docker rmi $(docker images --format "{{.Repository}}:{{.Tag}}" | findstr "docker-examples")
21 |
22 |
23 | if ($XM1 -ieq 'XM1') {
24 | docker rmi $(docker images --format "{{.Repository}}:{{.Tag}}" | findstr "docker-examples-xm1")
25 | }
26 | elseif ($XM1 -ieq 'XP1') {
27 | docker rmi $(docker images --format "{{.Repository}}:{{.Tag}}" | findstr "docker-examples-xp1")
28 | }
29 | else {
30 | docker rmi $(docker images --format "{{.Repository}}:{{.Tag}}" | findstr "docker-examples-xp0")
31 | }
32 |
33 | Write-Host "`n`n3. Stop IIS, Stop/Start Host Network Service (HNS)" -ForegroundColor Cyan
34 | iisreset /stop; net stop hns; net start hns
35 |
36 | Write-Host "`n`n4. Clean all previous build artifacts" -ForegroundColor Cyan
37 | Push-Location docker
38 | .\clean.ps1
39 |
40 | Write-Host "`n`n5. Restore Sitecore CLI tool" -ForegroundColor Cyan
41 | Pop-Location
42 | dotnet tool restore
43 |
44 | Write-Host "`n`n6. Build/Compose Docker" -ForegroundColor Cyan
45 | Pop-Location
46 |
47 |
48 | if ($XM1 -ieq 'XM1') {
49 | Write-Host "Start Up script for XM1......" -ForegroundColor Cyan
50 | docker-compose -f docker-compose.xm1.yml -f docker-compose.xm1.override.yml up -d
51 | }
52 | elseif ($XM1 -ieq 'XP1') {
53 | Write-Host "Start Up script for XP1......" -ForegroundColor Cyan
54 | docker-compose -f docker-compose.xp1.yml -f docker-compose.xp1.override.yml up -d
55 | }
56 | else {
57 | Write-Host "Start Up script for XP0......" -ForegroundColor Cyan
58 | docker-compose up -d
59 | }
60 |
61 | Write-Host "***Setup completed successfully***" -ForegroundColor Green
62 |
--------------------------------------------------------------------------------
/custom-images/docker-compose.override.yml:
--------------------------------------------------------------------------------
1 | version: "2.4"
2 |
3 | services:
4 | solution:
5 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-solution:${VERSION:-latest}
6 | build:
7 | context: .
8 | args:
9 | BASE_IMAGE: ${SOLUTION_BASE_IMAGE}
10 | BUILD_IMAGE: ${SOLUTION_BUILD_IMAGE}
11 | BUILD_CONFIGURATION: ${BUILD_CONFIGURATION}
12 | scale: 0
13 |
14 | traefik:
15 | volumes:
16 | - ./docker/traefik:C:/etc/traefik
17 |
18 | mssql:
19 | mem_limit: 2GB
20 | volumes:
21 | - ${LOCAL_DATA_PATH}\mssql:c:\data
22 |
23 | mssql-init:
24 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp0-mssql-init:${VERSION:-latest}
25 | build:
26 | context: ./docker/build/mssql-init
27 | args:
28 | BASE_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-mssql-init:${SITECORE_VERSION}
29 | SPE_IMAGE: ${SITECORE_MODULE_REGISTRY}sitecore-spe-assets:${SPE_VERSION}
30 |
31 | # Mount our Solr data folder
32 | solr:
33 | volumes:
34 | - ${LOCAL_DATA_PATH}\solr:c:\data
35 |
36 | # Some modules (like SXA) also require additions to the Solr image.
37 | solr-init:
38 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp0-solr-init:${VERSION:-latest}
39 | build:
40 | context: ./docker/build/solr-init
41 | args:
42 | BASE_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-solr-init:${SITECORE_VERSION}
43 | SXA_IMAGE: ${SITECORE_MODULE_REGISTRY}sitecore-sxa-xp1-assets:${SXA_VERSION}
44 |
45 | id:
46 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-id:${VERSION:-latest}
47 | build:
48 | context: ./docker/build/id
49 | args:
50 | BASE_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-id7:${SITECORE_VERSION}
51 | volumes:
52 | - ${HOST_LICENSE_FOLDER}:c:\license
53 | environment:
54 | SITECORE_LICENSE_LOCATION: c:\license\license.xml
55 |
56 | cm:
57 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp0-cm:${VERSION:-latest}
58 | build:
59 | context: ./docker/build/cm
60 | args:
61 | BASE_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-cm:${SITECORE_VERSION}
62 | SPE_IMAGE: ${SITECORE_MODULE_REGISTRY}sitecore-spe-assets:${SPE_VERSION}
63 | SXA_IMAGE: ${SITECORE_MODULE_REGISTRY}sitecore-sxa-xp1-assets:${SXA_VERSION}
64 | TOOLING_IMAGE: ${SITECORE_TOOLS_REGISTRY}sitecore-docker-tools-assets:${TOOLS_VERSION}
65 | SOLUTION_IMAGE: ${REGISTRY}${COMPOSE_PROJECT_NAME}-solution:${VERSION:-latest}
66 | depends_on:
67 | - solution
68 | volumes:
69 | - ${LOCAL_DEPLOY_PATH}\website:C:\deploy
70 | - ${LOCAL_DATA_PATH}\cm:C:\inetpub\wwwroot\App_Data\logs
71 | - ${LOCAL_DATA_PATH}\devicedetection:C:\inetpub\wwwroot\App_Data\DeviceDetection
72 | - ${HOST_LICENSE_FOLDER}:c:\license
73 | environment:
74 | SITECORE_DEVELOPMENT_PATCHES: CustomErrorsOff
75 | SITECORE_LICENSE_LOCATION: c:\license\license.xml
76 | entrypoint: powershell -Command "& C:\\tools\\entrypoints\\iis\\Development.ps1"
77 |
78 | xconnect:
79 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp0-xconnect:${VERSION:-latest}
80 | build:
81 | context: ./docker/build/xconnect
82 | args:
83 | BASE_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-xconnect:${SITECORE_VERSION}
84 | TOOLING_IMAGE: ${SITECORE_TOOLS_REGISTRY}sitecore-docker-tools-assets:${TOOLS_VERSION}
85 | SOLUTION_IMAGE: ${REGISTRY}${COMPOSE_PROJECT_NAME}-solution:${VERSION:-latest}
86 | depends_on:
87 | - solution
88 | volumes:
89 | - ${LOCAL_DEPLOY_PATH}\xconnect:C:\deploy
90 | - ${HOST_LICENSE_FOLDER}:c:\license
91 | environment:
92 | SITECORE_LICENSE_LOCATION: c:\license\
93 | entrypoint: powershell -Command "& C:\\tools\\entrypoints\\iis\\Development.ps1"
94 |
95 | xdbsearchworker:
96 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp0-xdbsearchworker:${VERSION:-latest}
97 | build:
98 | context: ./docker/build/xdbsearchworker
99 | args:
100 | BASE_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-xdbsearchworker:${SITECORE_VERSION}
101 | SOLUTION_IMAGE: ${REGISTRY}${COMPOSE_PROJECT_NAME}-solution:${VERSION:-latest}
102 | volumes:
103 | - ${HOST_LICENSE_FOLDER}:c:\license
104 | environment:
105 | SITECORE_LICENSE_LOCATION: c:\license\
106 | depends_on:
107 | - solution
108 |
109 | xdbautomationworker:
110 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp0-xdbautomationworker:${VERSION:-latest}
111 | build:
112 | context: ./docker/build/xdbautomationworker
113 | args:
114 | BASE_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-xdbautomationworker:${SITECORE_VERSION}
115 | SOLUTION_IMAGE: ${REGISTRY}${COMPOSE_PROJECT_NAME}-solution:${VERSION:-latest}
116 | volumes:
117 | - ${HOST_LICENSE_FOLDER}:c:\license
118 | environment:
119 | SITECORE_LICENSE_LOCATION: c:\license\
120 | depends_on:
121 | - solution
122 |
123 | cortexprocessingworker:
124 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp0-cortexprocessingworker:${VERSION:-latest}
125 | build:
126 | context: ./docker/build/cortexprocessingworker
127 | args:
128 | BASE_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-cortexprocessingworker:${SITECORE_VERSION}
129 | SOLUTION_IMAGE: ${REGISTRY}${COMPOSE_PROJECT_NAME}-solution:${VERSION:-latest}
130 | volumes:
131 | - ${HOST_LICENSE_FOLDER}:c:\license
132 | environment:
133 | SITECORE_LICENSE_LOCATION: c:\license\
134 | depends_on:
135 | - solution
--------------------------------------------------------------------------------
/custom-images/docker-compose.xm1.override.yml:
--------------------------------------------------------------------------------
1 | version: "2.4"
2 |
3 | services:
4 | solution:
5 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-solution:${VERSION:-latest}
6 | build:
7 | context: .
8 | args:
9 | BASE_IMAGE: ${SOLUTION_BASE_IMAGE}
10 | BUILD_IMAGE: ${SOLUTION_BUILD_IMAGE}
11 | BUILD_CONFIGURATION: ${BUILD_CONFIGURATION}
12 | scale: 0
13 |
14 | traefik:
15 | volumes:
16 | - ./docker/traefik:C:/etc/traefik
17 |
18 | redis:
19 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-redis:${VERSION:-latest}
20 | build:
21 | context: ./docker/build/redis
22 | args:
23 | BASE_IMAGE: ${SITECORE_DOCKER_REGISTRY}redis:3.2.100-${EXTERNAL_IMAGE_TAG_SUFFIX}
24 |
25 | mssql:
26 | mem_limit: 2GB
27 | volumes:
28 | - ${LOCAL_DATA_PATH}\mssql:c:\data
29 |
30 | mssql-init:
31 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xm1-mssql-init:${VERSION:-latest}
32 | build:
33 | context: ./docker/build/mssql-init
34 | args:
35 | BASE_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xm1-mssql-init:${SITECORE_VERSION}
36 | SPE_IMAGE: ${SITECORE_MODULE_REGISTRY}sitecore-spe-assets:${SPE_VERSION}
37 |
38 | # Mount our Solr data folder
39 | solr:
40 | volumes:
41 | - ${LOCAL_DATA_PATH}\solr:c:\data
42 |
43 | # Some modules (like SXA) also require additions to the Solr image.
44 | solr-init:
45 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xm1-solr-init:${VERSION:-latest}
46 | build:
47 | context: ./docker/build/solr-init
48 | args:
49 | BASE_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xm1-solr-init:${SITECORE_VERSION}
50 | SXA_IMAGE: ${SITECORE_MODULE_REGISTRY}sitecore-sxa-xm1-assets:${SXA_VERSION}
51 |
52 | id:
53 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-id:${VERSION:-latest}
54 | build:
55 | context: ./docker/build/id
56 | args:
57 | BASE_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-id7:${SITECORE_VERSION}
58 | volumes:
59 | - ${HOST_LICENSE_FOLDER}:c:\license
60 | environment:
61 | SITECORE_LICENSE_LOCATION: c:\license\license.xml
62 |
63 | cd:
64 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xm1-cd:${VERSION:-latest}
65 | build:
66 | context: ./docker/build/cd
67 | args:
68 | BASE_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xm1-cd:${SITECORE_VERSION}
69 | SXA_IMAGE: ${SITECORE_MODULE_REGISTRY}sitecore-sxa-xm1-assets:${SXA_VERSION}
70 | TOOLING_IMAGE: ${SITECORE_TOOLS_REGISTRY}sitecore-docker-tools-assets:${TOOLS_VERSION}
71 | SOLUTION_IMAGE: ${REGISTRY}${COMPOSE_PROJECT_NAME}-solution:${VERSION:-latest}
72 | depends_on:
73 | - solution
74 | volumes:
75 | - ${LOCAL_DEPLOY_PATH}\website:C:\deploy
76 | - ${LOCAL_DATA_PATH}\cd:C:\inetpub\wwwroot\App_Data\logs
77 | - ${LOCAL_DATA_PATH}\devicedetection:C:\inetpub\wwwroot\App_Data\DeviceDetection
78 | - ${HOST_LICENSE_FOLDER}:c:\license
79 | environment:
80 | SITECORE_DEVELOPMENT_PATCHES: CustomErrorsOff
81 | SITECORE_LICENSE_LOCATION: c:\license\license.xml
82 | entrypoint: powershell -Command "& C:\\tools\\entrypoints\\iis\\Development.ps1"
83 |
84 | cm:
85 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xm1-cm:${VERSION:-latest}
86 | build:
87 | context: ./docker/build/cm
88 | args:
89 | BASE_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xm1-cm:${SITECORE_VERSION}
90 | SPE_IMAGE: ${SITECORE_MODULE_REGISTRY}sitecore-spe-assets:${SPE_VERSION}
91 | SXA_IMAGE: ${SITECORE_MODULE_REGISTRY}sitecore-sxa-xm1-assets:${SXA_VERSION}
92 | TOOLING_IMAGE: ${SITECORE_TOOLS_REGISTRY}sitecore-docker-tools-assets:${TOOLS_VERSION}
93 | SOLUTION_IMAGE: ${REGISTRY}${COMPOSE_PROJECT_NAME}-solution:${VERSION:-latest}
94 | depends_on:
95 | - solution
96 | volumes:
97 | - ${LOCAL_DEPLOY_PATH}\website:C:\deploy
98 | - ${LOCAL_DATA_PATH}\cm:C:\inetpub\wwwroot\App_Data\logs
99 | - ${HOST_LICENSE_FOLDER}:c:\license
100 | environment:
101 | SITECORE_DEVELOPMENT_PATCHES: CustomErrorsOff
102 | SITECORE_LICENSE_LOCATION: c:\license\license.xml
103 | entrypoint: powershell -Command "& C:\\tools\\entrypoints\\iis\\Development.ps1"
--------------------------------------------------------------------------------
/custom-images/docker-compose.xm1.yml:
--------------------------------------------------------------------------------
1 | services:
2 | traefik:
3 | isolation: ${TRAEFIK_ISOLATION}
4 | image: ${TRAEFIK_IMAGE}
5 | command:
6 | - "--ping"
7 | - "--api.insecure=true"
8 | - "--providers.docker.endpoint=npipe:////./pipe/docker_engine"
9 | - "--providers.docker.exposedByDefault=false"
10 | - "--providers.file.directory=C:/etc/traefik/config/dynamic"
11 | - "--entryPoints.websecure.address=:443"
12 | - "--entryPoints.websecure.forwardedHeaders.insecure"
13 | ports:
14 | - "${HTTPS_PORT}:443"
15 | - "${TRAEFIK_MANAGEMENT_PORT}:8080"
16 | healthcheck:
17 | test: ["CMD", "traefik", "healthcheck", "--ping"]
18 | volumes:
19 | - source: \\.\pipe\docker_engine\
20 | target: \\.\pipe\docker_engine\
21 | type: npipe
22 | - ./traefik:C:/etc/traefik
23 | depends_on:
24 | id:
25 | condition: service_healthy
26 | cd:
27 | condition: service_healthy
28 | cm:
29 | condition: service_healthy
30 | redis:
31 | isolation: ${ISOLATION}
32 | image: ${SITECORE_DOCKER_REGISTRY}redis:3.2.100-${EXTERNAL_IMAGE_TAG_SUFFIX}
33 | mssql:
34 | isolation: ${ISOLATION}
35 | image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2017-${EXTERNAL_IMAGE_TAG_SUFFIX}
36 | environment:
37 | SA_PASSWORD: ${SQL_SA_PASSWORD}
38 | ACCEPT_EULA: "Y"
39 | ports:
40 | - "${MSSQL_PORT}:1433"
41 | volumes:
42 | - type: bind
43 | source: .\mssql-data
44 | target: c:\data
45 | mssql-init:
46 | isolation: ${ISOLATION}
47 | image: ${SITECORE_DOCKER_REGISTRY}sitecore-xm1-mssql-init:${SITECORE_VERSION}
48 | environment:
49 | SQL_SERVER: ${SQL_SERVER}
50 | SQL_ADMIN_LOGIN: ${SQL_SA_LOGIN}
51 | SQL_ADMIN_PASSWORD: ${SQL_SA_PASSWORD}
52 | SQL_DATABASE_PREFIX: ${SQL_DATABASE_PREFIX}
53 | SQL_CUSTOM_DATABASE_PREFIX_UPDATE_FROM: ${SQL_CUSTOM_DATABASE_PREFIX_UPDATE_FROM}
54 | SITECORE_ADMIN_PASSWORD: ${SITECORE_ADMIN_PASSWORD}
55 | POST_DEPLOYMENT_WAIT_PERIOD: 300
56 | healthcheck:
57 | test:
58 | [
59 | "CMD",
60 | "powershell",
61 | "-command",
62 | "if ([System.Environment]::GetEnvironmentVariable('DatabasesDeploymentStatus', 'Machine') -eq 'Complete') { exit 0 } else { exit 1}",
63 | ]
64 | start_period: 300s
65 | interval: 5s
66 | depends_on:
67 | mssql:
68 | condition: service_healthy
69 | solr:
70 | isolation: ${ISOLATION}
71 | image: ${SITECORE_DOCKER_REGISTRY}nonproduction/solr:8.11.2-${EXTERNAL_IMAGE_TAG_SUFFIX}
72 | ports:
73 | - "${SOLR_PORT}:8983"
74 | volumes:
75 | - type: bind
76 | source: .\solr-data
77 | target: c:\data
78 | environment:
79 | SOLR_MODE: solrcloud
80 | SOLR_JAVA_MEM: "-Xms2g -Xmx2g"
81 | healthcheck:
82 | test:
83 | [
84 | "CMD",
85 | "powershell",
86 | "-command",
87 | "try { $$statusCode = (iwr http://solr:8983/solr/admin/cores?action=STATUS -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }",
88 | ]
89 | solr-init:
90 | isolation: ${ISOLATION}
91 | image: ${SITECORE_DOCKER_REGISTRY}sitecore-xm1-solr-init:${SITECORE_VERSION}
92 | environment:
93 | SITECORE_SOLR_CONNECTION_STRING: http://solr:8983/solr
94 | SOLR_CORE_PREFIX_NAME: ${SOLR_CORE_PREFIX_NAME}
95 | depends_on:
96 | solr:
97 | condition: service_healthy
98 | id:
99 | isolation: ${ISOLATION}
100 | image: ${SITECORE_DOCKER_REGISTRY}sitecore-id7:${SITECORE_VERSION}
101 | environment:
102 | Sitecore_Sitecore__IdentityServer__SitecoreMemberShipOptions__ConnectionString: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
103 | Sitecore_Sitecore__IdentityServer__AccountOptions__PasswordRecoveryUrl: https://${CM_HOST}/sitecore/login?rc=1
104 | Sitecore_Sitecore__IdentityServer__Clients__PasswordClient__ClientSecrets__ClientSecret1: ${SITECORE_IDSECRET}
105 | Sitecore_Sitecore__IdentityServer__Clients__DefaultClient__AllowedCorsOrigins__AllowedCorsOriginsGroup1: https://${CM_HOST}
106 | Sitecore_Sitecore__IdentityServer__CertificateRawData: ${SITECORE_ID_CERTIFICATE}
107 | Sitecore_Sitecore__IdentityServer__PublicOrigin: https://${ID_HOST}
108 | Sitecore_Sitecore__IdentityServer__CertificateRawDataPassword: ${SITECORE_ID_CERTIFICATE_PASSWORD}
109 | Sitecore_License: ${SITECORE_LICENSE}
110 | healthcheck:
111 | test: ["CMD", "pwsh", "-command", "C:/Healthchecks/Healthcheck.ps1"]
112 | timeout: 300s
113 | depends_on:
114 | mssql-init:
115 | condition: service_healthy
116 | labels:
117 | - "traefik.enable=true"
118 | - "traefik.http.routers.id-secure.entrypoints=websecure"
119 | - "traefik.http.routers.id-secure.rule=Host(`${ID_HOST}`)"
120 | - "traefik.http.routers.id-secure.tls=true"
121 | cd:
122 | isolation: ${ISOLATION}
123 | image: ${SITECORE_DOCKER_REGISTRY}sitecore-xm1-cd:${SITECORE_VERSION}
124 | depends_on:
125 | mssql-init:
126 | condition: service_healthy
127 | solr-init:
128 | condition: service_started
129 | redis:
130 | condition: service_started
131 | environment:
132 | Sitecore_AppSettings_instanceNameMode:define: default
133 | Sitecore_ConnectionStrings_Security: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
134 | Sitecore_ConnectionStrings_Web: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Web;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
135 | Sitecore_ConnectionStrings_ExperienceForms: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.ExperienceForms;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
136 | Sitecore_ConnectionStrings_Solr.Search: http://solr:8983/solr;solrCloud=true
137 | Sitecore_ConnectionStrings_Redis.Sessions: redis:6379,ssl=False,abortConnect=False
138 | Sitecore_License: ${SITECORE_LICENSE}
139 | SOLR_CORE_PREFIX_NAME: ${SOLR_CORE_PREFIX_NAME}
140 | MEDIA_REQUEST_PROTECTION_SHARED_SECRET: ${MEDIA_REQUEST_PROTECTION_SHARED_SECRET}
141 | LOG_LEVEL_VALUE: ${LOG_LEVEL_VALUE}
142 | healthcheck:
143 | test: ["CMD", "powershell", "-command", "C:/Healthchecks/Healthcheck.ps1"]
144 | timeout: 300s
145 | labels:
146 | - "traefik.enable=true"
147 | - "traefik.http.routers.cd-secure.entrypoints=websecure"
148 | - "traefik.http.routers.cd-secure.rule=Host(`${CD_HOST}`)"
149 | - "traefik.http.routers.cd-secure.tls=true"
150 | - "traefik.http.middlewares.stripForwardedHostHeader.headers.customrequestheaders.X-Forwarded-Host="
151 | - "traefik.http.routers.cd-secure.middlewares=stripForwardedHostHeader"
152 | volumes:
153 | - type: bind
154 | source: .\device-detection-data
155 | target: C:\inetpub\wwwroot\App_Data\DeviceDetection
156 | cm:
157 | isolation: ${ISOLATION}
158 | image: ${SITECORE_DOCKER_REGISTRY}sitecore-xm1-cm:${SITECORE_VERSION}
159 | depends_on:
160 | mssql-init:
161 | condition: service_healthy
162 | solr-init:
163 | condition: service_started
164 | id:
165 | condition: service_started
166 | environment:
167 | Sitecore_AppSettings_instanceNameMode:define: default
168 | Sitecore_ConnectionStrings_Core: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
169 | Sitecore_ConnectionStrings_Security: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
170 | Sitecore_ConnectionStrings_Master: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
171 | Sitecore_ConnectionStrings_Web: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Web;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
172 | Sitecore_ConnectionStrings_ExperienceForms: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.ExperienceForms;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
173 | Sitecore_ConnectionStrings_Solr.Search: http://solr:8983/solr;solrCloud=true
174 | Sitecore_ConnectionStrings_Sitecoreidentity.secret: ${SITECORE_IDSECRET}
175 | Sitecore_AppSettings_Telerik.AsyncUpload.ConfigurationEncryptionKey: ${TELERIK_ENCRYPTION_KEY}
176 | Sitecore_AppSettings_Telerik.Upload.ConfigurationHashKey: ${TELERIK_ENCRYPTION_KEY}
177 | Sitecore_AppSettings_Telerik.Web.UI.DialogParametersEncryptionKey: ${TELERIK_ENCRYPTION_KEY}
178 | Sitecore_License: ${SITECORE_LICENSE}
179 | Sitecore_GraphQL_Enabled: ${SITECORE_GRAPHQL_ENABLED}
180 | Sitecore_GraphQL_ExposePlayground: ${SITECORE_GRAPHQL_EXPOSEPLAYGROUND}
181 | Sitecore_GraphQL_UploadMediaOptions_EncryptionKey: ${SITECORE_GRAPHQL_UPLOADMEDIAOPTIONS_ENCRYPTIONKEY}
182 | Sitecore_Identity_Server_Authority: https://${ID_HOST}
183 | Sitecore_Identity_Server_InternalAuthority: http://id
184 | Sitecore_Identity_Server_CallbackAuthority: https://${CM_HOST}
185 | Sitecore_Identity_Server_Require_Https: "false"
186 | SOLR_CORE_PREFIX_NAME: ${SOLR_CORE_PREFIX_NAME}
187 | MEDIA_REQUEST_PROTECTION_SHARED_SECRET: ${MEDIA_REQUEST_PROTECTION_SHARED_SECRET}
188 | LOG_LEVEL_VALUE: ${LOG_LEVEL_VALUE}
189 | healthcheck:
190 | test: ["CMD", "powershell", "-command", "C:/Healthchecks/Healthcheck.ps1"]
191 | timeout: 300s
192 | labels:
193 | - "traefik.enable=true"
194 | - "traefik.http.middlewares.force-STS-Header.headers.forceSTSHeader=true"
195 | - "traefik.http.middlewares.force-STS-Header.headers.stsSeconds=31536000"
196 | - "traefik.http.routers.cm-secure.entrypoints=websecure"
197 | - "traefik.http.routers.cm-secure.rule=Host(`${CM_HOST}`)"
198 | - "traefik.http.routers.cm-secure.tls=true"
199 | - "traefik.http.routers.cm-secure.middlewares=force-STS-Header, stripForwardedHostHeader"
200 | - "traefik.http.middlewares.stripForwardedHostHeader.headers.customrequestheaders.X-Forwarded-Host="
201 |
--------------------------------------------------------------------------------
/custom-images/docker-compose.xp1.override.yml:
--------------------------------------------------------------------------------
1 | version: "2.4"
2 |
3 | services:
4 | solution:
5 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-solution:${VERSION:-latest}
6 | build:
7 | context: .
8 | args:
9 | BASE_IMAGE: ${SOLUTION_BASE_IMAGE}
10 | BUILD_IMAGE: ${SOLUTION_BUILD_IMAGE}
11 | BUILD_CONFIGURATION: ${BUILD_CONFIGURATION}
12 | scale: 0
13 |
14 | traefik:
15 | volumes:
16 | - ./docker/traefik:C:/etc/traefik
17 |
18 | redis:
19 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-redis:${VERSION:-latest}
20 | build:
21 | context: ./docker/build/redis
22 | args:
23 | BASE_IMAGE: ${SITECORE_DOCKER_REGISTRY}redis:3.2.100-${EXTERNAL_IMAGE_TAG_SUFFIX}
24 |
25 | mssql:
26 | mem_limit: 2GB
27 | volumes:
28 | - ${LOCAL_DATA_PATH}\mssql:c:\data
29 |
30 | mssql-init:
31 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp1-mssql-init:${VERSION:-latest}
32 | build:
33 | context: ./docker/build/mssql-init
34 | args:
35 | BASE_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-mssql-init:${SITECORE_VERSION}
36 | SPE_IMAGE: ${SITECORE_MODULE_REGISTRY}sitecore-spe-assets:${SPE_VERSION}
37 |
38 | # Mount our Solr data folder
39 | solr:
40 | volumes:
41 | - ${LOCAL_DATA_PATH}\solr:c:\data
42 |
43 | # Some modules (like SXA) also require additions to the Solr image.
44 | solr-init:
45 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp1-solr-init:${VERSION:-latest}
46 | build:
47 | context: ./docker/build/solr-init
48 | args:
49 | BASE_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-solr-init:${SITECORE_VERSION}
50 | SXA_IMAGE: ${SITECORE_MODULE_REGISTRY}sitecore-sxa-xp1-assets:${SXA_VERSION}
51 |
52 | id:
53 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-id:${VERSION:-latest}
54 | build:
55 | context: ./docker/build/id
56 | args:
57 | BASE_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-id7:${SITECORE_VERSION}
58 | volumes:
59 | - ${HOST_LICENSE_FOLDER}:c:\license
60 | environment:
61 | SITECORE_LICENSE_LOCATION: c:\license\license.xml
62 |
63 | cd:
64 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp1-cd:${VERSION:-latest}
65 | build:
66 | context: ./docker/build/cd
67 | args:
68 | BASE_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-cd:${SITECORE_VERSION}
69 | SXA_IMAGE: ${SITECORE_MODULE_REGISTRY}sitecore-sxa-xp1-assets:${SXA_VERSION}
70 | TOOLING_IMAGE: ${SITECORE_TOOLS_REGISTRY}sitecore-docker-tools-assets:${TOOLS_VERSION}
71 | SOLUTION_IMAGE: ${REGISTRY}${COMPOSE_PROJECT_NAME}-solution:${VERSION:-latest}
72 | depends_on:
73 | - solution
74 | volumes:
75 | - ${LOCAL_DEPLOY_PATH}\website:C:\deploy
76 | - ${LOCAL_DATA_PATH}\cd:C:\inetpub\wwwroot\App_Data\logs
77 | - ${LOCAL_DATA_PATH}\devicedetection:C:\inetpub\wwwroot\App_Data\DeviceDetection
78 | - ${HOST_LICENSE_FOLDER}:c:\license
79 | environment:
80 | SITECORE_DEVELOPMENT_PATCHES: CustomErrorsOff
81 | SITECORE_LICENSE_LOCATION: c:\license\license.xml
82 | entrypoint: powershell -Command "& C:\\tools\\entrypoints\\iis\\Development.ps1"
83 |
84 | cm:
85 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp1-cm:${VERSION:-latest}
86 | build:
87 | context: ./docker/build/cm
88 | args:
89 | BASE_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-cm:${SITECORE_VERSION}
90 | SPE_IMAGE: ${SITECORE_MODULE_REGISTRY}sitecore-spe-assets:${SPE_VERSION}
91 | SXA_IMAGE: ${SITECORE_MODULE_REGISTRY}sitecore-sxa-xp1-assets:${SXA_VERSION}
92 | TOOLING_IMAGE: ${SITECORE_TOOLS_REGISTRY}sitecore-docker-tools-assets:${TOOLS_VERSION}
93 | SOLUTION_IMAGE: ${REGISTRY}${COMPOSE_PROJECT_NAME}-solution:${VERSION:-latest}
94 | depends_on:
95 | - solution
96 | volumes:
97 | - ${LOCAL_DEPLOY_PATH}\website:C:\deploy
98 | - ${LOCAL_DATA_PATH}\cm:C:\inetpub\wwwroot\App_Data\logs
99 | - ${HOST_LICENSE_FOLDER}:c:\license
100 | environment:
101 | SITECORE_DEVELOPMENT_PATCHES: CustomErrorsOff
102 | SITECORE_LICENSE_LOCATION: c:\license\license.xml
103 | entrypoint: powershell -Command "& C:\\tools\\entrypoints\\iis\\Development.ps1"
104 |
105 | prc:
106 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp1-prc:${VERSION:-latest}
107 | build:
108 | context: ./docker/build/prc
109 | args:
110 | BASE_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-prc:${SITECORE_VERSION}
111 | SOLUTION_IMAGE: ${REGISTRY}${COMPOSE_PROJECT_NAME}-solution:${VERSION:-latest}
112 | volumes:
113 | - ${HOST_LICENSE_FOLDER}:c:\license
114 | environment:
115 | SITECORE_LICENSE_LOCATION: c:\license\license.xml
116 | depends_on:
117 | - solution
118 |
119 | xdbcollection:
120 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp1-xdbcollection:${VERSION:-latest}
121 | build:
122 | context: ./docker/build/xdbcollection
123 | args:
124 | BASE_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-xdbcollection:${SITECORE_VERSION}
125 | SOLUTION_IMAGE: ${REGISTRY}${COMPOSE_PROJECT_NAME}-solution:${VERSION:-latest}
126 | volumes:
127 | - ${HOST_LICENSE_FOLDER}:c:\license
128 | environment:
129 | SITECORE_LICENSE_LOCATION: c:\license\
130 | depends_on:
131 | - solution
132 |
133 | xdbsearch:
134 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp1-xdbsearch:${VERSION:-latest}
135 | build:
136 | context: ./docker/build/xdbsearch
137 | args:
138 | BASE_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-xdbsearch:${SITECORE_VERSION}
139 | SOLUTION_IMAGE: ${REGISTRY}${COMPOSE_PROJECT_NAME}-solution:${VERSION:-latest}
140 | volumes:
141 | - ${HOST_LICENSE_FOLDER}:c:\license
142 | environment:
143 | SITECORE_LICENSE_LOCATION: c:\license\
144 | depends_on:
145 | - solution
146 |
147 | xdbautomation:
148 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp1-xdbautomation:${VERSION:-latest}
149 | build:
150 | context: ./docker/build/xdbautomation
151 | args:
152 | BASE_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-xdbautomation:${SITECORE_VERSION}
153 | SOLUTION_IMAGE: ${REGISTRY}${COMPOSE_PROJECT_NAME}-solution:${VERSION:-latest}
154 | volumes:
155 | - ${HOST_LICENSE_FOLDER}:c:\license
156 | environment:
157 | SITECORE_LICENSE_LOCATION: c:\license\
158 | depends_on:
159 | - solution
160 |
161 | xdbautomationrpt:
162 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp1-xdbautomationrpt:${VERSION:-latest}
163 | build:
164 | context: ./docker/build/xdbautomationrpt
165 | args:
166 | BASE_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-xdbautomationrpt:${SITECORE_VERSION}
167 | volumes:
168 | - ${HOST_LICENSE_FOLDER}:c:\license
169 | environment:
170 | SITECORE_LICENSE_LOCATION: c:\license\
171 |
172 | cortexprocessing:
173 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp1-cortexprocessing:${VERSION:-latest}
174 | build:
175 | context: ./docker/build/cortexprocessing
176 | args:
177 | BASE_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-cortexprocessing:${SITECORE_VERSION}
178 | volumes:
179 | - ${HOST_LICENSE_FOLDER}:c:\license
180 | environment:
181 | SITECORE_LICENSE_LOCATION: c:\license\
182 |
183 | cortexreporting:
184 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp1-cortexreporting:${VERSION:-latest}
185 | build:
186 | context: ./docker/build/cortexreporting
187 | args:
188 | BASE_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-cortexreporting:${SITECORE_VERSION}
189 | volumes:
190 | - ${HOST_LICENSE_FOLDER}:c:\license
191 | environment:
192 | SITECORE_LICENSE_LOCATION: c:\license\
193 |
194 | xdbrefdata:
195 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp1-xdbrefdata:${VERSION:-latest}
196 | build:
197 | context: ./docker/build/xdbrefdata
198 | args:
199 | BASE_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-xdbrefdata:${SITECORE_VERSION}
200 | volumes:
201 | - ${HOST_LICENSE_FOLDER}:c:\license
202 | environment:
203 | SITECORE_LICENSE_LOCATION: c:\license\
204 |
205 | xdbsearchworker:
206 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp1-xdbsearchworker:${VERSION:-latest}
207 | build:
208 | context: ./docker/build/xdbsearchworker
209 | args:
210 | BASE_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-xdbsearchworker:${SITECORE_VERSION}
211 | SOLUTION_IMAGE: ${REGISTRY}${COMPOSE_PROJECT_NAME}-solution:${VERSION:-latest}
212 | volumes:
213 | - ${HOST_LICENSE_FOLDER}:c:\license
214 | environment:
215 | SITECORE_LICENSE_LOCATION: c:\license\
216 | depends_on:
217 | - solution
218 |
219 | xdbautomationworker:
220 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp1-xdbautomationworker:${VERSION:-latest}
221 | build:
222 | context: ./docker/build/xdbautomationworker
223 | args:
224 | BASE_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-xdbautomationworker:${SITECORE_VERSION}
225 | SOLUTION_IMAGE: ${REGISTRY}${COMPOSE_PROJECT_NAME}-solution:${VERSION:-latest}
226 | volumes:
227 | - ${HOST_LICENSE_FOLDER}:c:\license
228 | environment:
229 | SITECORE_LICENSE_LOCATION: c:\license\
230 | depends_on:
231 | - solution
232 |
233 | cortexprocessingworker:
234 | image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp1-cortexprocessingworker:${VERSION:-latest}
235 | build:
236 | context: ./docker/build/cortexprocessingworker
237 | args:
238 | BASE_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-cortexprocessingworker:${SITECORE_VERSION}
239 | SOLUTION_IMAGE: ${REGISTRY}${COMPOSE_PROJECT_NAME}-solution:${VERSION:-latest}
240 | volumes:
241 | - ${HOST_LICENSE_FOLDER}:c:\license
242 | environment:
243 | SITECORE_LICENSE_LOCATION: c:\license\
244 | depends_on:
245 | - solution
--------------------------------------------------------------------------------
/custom-images/docker-compose.xp1.yml:
--------------------------------------------------------------------------------
1 | services:
2 | traefik:
3 | isolation: ${TRAEFIK_ISOLATION}
4 | image: ${TRAEFIK_IMAGE}
5 | command:
6 | - "--ping"
7 | - "--api.insecure=true"
8 | - "--providers.docker.endpoint=npipe:////./pipe/docker_engine"
9 | - "--providers.docker.exposedByDefault=false"
10 | - "--providers.file.directory=C:/etc/traefik/config/dynamic"
11 | - "--entryPoints.websecure.address=:443"
12 | - "--entryPoints.websecure.forwardedHeaders.insecure"
13 | ports:
14 | - "${HTTPS_PORT}:443"
15 | - "${TRAEFIK_MANAGEMENT_PORT}:8080"
16 | healthcheck:
17 | test: ["CMD", "traefik", "healthcheck", "--ping"]
18 | volumes:
19 | - source: \\.\pipe\docker_engine\
20 | target: \\.\pipe\docker_engine\
21 | type: npipe
22 | - ./traefik:C:/etc/traefik
23 | depends_on:
24 | id:
25 | condition: service_healthy
26 | cd:
27 | condition: service_healthy
28 | cm:
29 | condition: service_healthy
30 | redis:
31 | isolation: ${ISOLATION}
32 | image: ${SITECORE_DOCKER_REGISTRY}redis:3.2.100-${EXTERNAL_IMAGE_TAG_SUFFIX}
33 | mssql:
34 | isolation: ${ISOLATION}
35 | image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2017-${EXTERNAL_IMAGE_TAG_SUFFIX}
36 | environment:
37 | SA_PASSWORD: ${SQL_SA_PASSWORD}
38 | ACCEPT_EULA: "Y"
39 | ports:
40 | - "${MSSQL_PORT}:1433"
41 | volumes:
42 | - type: bind
43 | source: .\mssql-data
44 | target: c:\data
45 | mssql-init:
46 | isolation: ${ISOLATION}
47 | image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-mssql-init:${SITECORE_VERSION}
48 | environment:
49 | SQL_SERVER: ${SQL_SERVER}
50 | SQL_ADMIN_LOGIN: ${SQL_SA_LOGIN}
51 | SQL_ADMIN_PASSWORD: ${SQL_SA_PASSWORD}
52 | SQL_DATABASE_PREFIX: ${SQL_DATABASE_PREFIX}
53 | SQL_CUSTOM_DATABASE_PREFIX_UPDATE_FROM: ${SQL_CUSTOM_DATABASE_PREFIX_UPDATE_FROM}
54 | SITECORE_ADMIN_PASSWORD: ${SITECORE_ADMIN_PASSWORD}
55 | POST_DEPLOYMENT_WAIT_PERIOD: 300
56 | healthcheck:
57 | test:
58 | [
59 | "CMD",
60 | "powershell",
61 | "-command",
62 | "if ([System.Environment]::GetEnvironmentVariable('DatabasesDeploymentStatus', 'Machine') -eq 'Complete') { exit 0 } else { exit 1}",
63 | ]
64 | start_period: 300s
65 | interval: 5s
66 | depends_on:
67 | mssql:
68 | condition: service_healthy
69 | solr:
70 | isolation: ${ISOLATION}
71 | image: ${SITECORE_DOCKER_REGISTRY}nonproduction/solr:8.11.2-${EXTERNAL_IMAGE_TAG_SUFFIX}
72 | ports:
73 | - "${SOLR_PORT}:8983"
74 | volumes:
75 | - type: bind
76 | source: .\solr-data
77 | target: c:\data
78 | environment:
79 | SOLR_MODE: solrcloud
80 | SOLR_JAVA_MEM: "-Xms2g -Xmx2g"
81 | healthcheck:
82 | test:
83 | [
84 | "CMD",
85 | "powershell",
86 | "-command",
87 | "try { $$statusCode = (iwr http://solr:8983/solr/admin/cores?action=STATUS -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }",
88 | ]
89 | solr-init:
90 | isolation: ${ISOLATION}
91 | image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-solr-init:${SITECORE_VERSION}
92 | environment:
93 | SITECORE_SOLR_CONNECTION_STRING: http://solr:8983/solr
94 | SOLR_CORE_PREFIX_NAME: ${SOLR_CORE_PREFIX_NAME}
95 | depends_on:
96 | solr:
97 | condition: service_healthy
98 | id:
99 | isolation: ${ISOLATION}
100 | image: ${SITECORE_DOCKER_REGISTRY}sitecore-id7:${SITECORE_VERSION}
101 | environment:
102 | Sitecore_Sitecore__IdentityServer__SitecoreMemberShipOptions__ConnectionString: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
103 | Sitecore_Sitecore__IdentityServer__AccountOptions__PasswordRecoveryUrl: https://${CM_HOST}/sitecore/login?rc=1
104 | Sitecore_Sitecore__IdentityServer__Clients__PasswordClient__ClientSecrets__ClientSecret1: ${SITECORE_IDSECRET}
105 | Sitecore_Sitecore__IdentityServer__Clients__DefaultClient__AllowedCorsOrigins__AllowedCorsOriginsGroup1: https://${CM_HOST}
106 | Sitecore_Sitecore__IdentityServer__CertificateRawData: ${SITECORE_ID_CERTIFICATE}
107 | Sitecore_Sitecore__IdentityServer__PublicOrigin: https://${ID_HOST}
108 | Sitecore_Sitecore__IdentityServer__CertificateRawDataPassword: ${SITECORE_ID_CERTIFICATE_PASSWORD}
109 | Sitecore_License: ${SITECORE_LICENSE}
110 | healthcheck:
111 | test: ["CMD", "pwsh", "-command", "C:/Healthchecks/Healthcheck.ps1"]
112 | timeout: 300s
113 | depends_on:
114 | mssql-init:
115 | condition: service_healthy
116 | labels:
117 | - "traefik.enable=true"
118 | - "traefik.http.routers.id-secure.entrypoints=websecure"
119 | - "traefik.http.routers.id-secure.rule=Host(`${ID_HOST}`)"
120 | - "traefik.http.routers.id-secure.tls=true"
121 | cd:
122 | isolation: ${ISOLATION}
123 | image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-cd:${SITECORE_VERSION}
124 | depends_on:
125 | mssql-init:
126 | condition: service_healthy
127 | redis:
128 | condition: service_started
129 | xdbcollection:
130 | condition: service_started
131 | xdbautomation:
132 | condition: service_started
133 | xdbautomationrpt:
134 | condition: service_started
135 | xdbrefdata:
136 | condition: service_started
137 | environment:
138 | Sitecore_AppSettings_instanceNameMode:define: default
139 | Sitecore_ConnectionStrings_Security: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
140 | Sitecore_ConnectionStrings_Web: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Web;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
141 | Sitecore_ConnectionStrings_Messaging: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Messaging;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
142 | Sitecore_ConnectionStrings_ExperienceForms: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.ExperienceForms;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
143 | Sitecore_ConnectionStrings_Exm.Master: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Exm.master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
144 | Sitecore_ConnectionStrings_Solr.Search: http://solr:8983/solr;solrCloud=true
145 | Sitecore_ConnectionStrings_XConnect.Collection: http://xdbcollection
146 | Sitecore_ConnectionStrings_Xdb.MarketingAutomation.Operations.Client: http://xdbautomation
147 | Sitecore_ConnectionStrings_Xdb.MarketingAutomation.Reporting.Client: http://xdbautomationrpt
148 | Sitecore_ConnectionStrings_Xdb.ReferenceData.Client: http://xdbrefdata
149 | Sitecore_ConnectionStrings_Redis.Sessions: redis:6379,ssl=False,abortConnect=False
150 | Sitecore_License: ${SITECORE_LICENSE}
151 | Sitecore_Analytics_Forwarded_Request_Http_Header: X-Forwarded-For
152 | SOLR_CORE_PREFIX_NAME: ${SOLR_CORE_PREFIX_NAME}
153 | MEDIA_REQUEST_PROTECTION_SHARED_SECRET: ${MEDIA_REQUEST_PROTECTION_SHARED_SECRET}
154 | LOG_LEVEL_VALUE: ${LOG_LEVEL_VALUE}
155 | healthcheck:
156 | test: ["CMD", "powershell", "-command", "C:/Healthchecks/Healthcheck.ps1"]
157 | timeout: 300s
158 | labels:
159 | - "traefik.enable=true"
160 | - "traefik.http.routers.cd-secure.entrypoints=websecure"
161 | - "traefik.http.routers.cd-secure.rule=Host(`${CD_HOST}`)"
162 | - "traefik.http.routers.cd-secure.tls=true"
163 | - "traefik.http.middlewares.stripForwardedHostHeader.headers.customrequestheaders.X-Forwarded-Host="
164 | - "traefik.http.routers.cd-secure.middlewares=stripForwardedHostHeader"
165 | volumes:
166 | - type: bind
167 | source: .\device-detection-data
168 | target: C:\inetpub\wwwroot\App_Data\DeviceDetection
169 | cm:
170 | isolation: ${ISOLATION}
171 | image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-cm:${SITECORE_VERSION}
172 | depends_on:
173 | id:
174 | condition: service_started
175 | cortexreporting:
176 | condition: service_started
177 | cortexprocessing:
178 | condition: service_started
179 | xdbcollection:
180 | condition: service_started
181 | xdbsearch:
182 | condition: service_started
183 | xdbautomation:
184 | condition: service_started
185 | xdbautomationrpt:
186 | condition: service_started
187 | xdbrefdata:
188 | condition: service_started
189 | environment:
190 | Sitecore_AppSettings_instanceNameMode:define: default
191 | Sitecore_ConnectionStrings_Core: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
192 | Sitecore_ConnectionStrings_Security: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
193 | Sitecore_ConnectionStrings_Master: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
194 | Sitecore_ConnectionStrings_Web: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Web;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
195 | Sitecore_ConnectionStrings_Reporting.ApiKey: ${REPORTING_API_KEY}
196 | Sitecore_ConnectionStrings_Messaging: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Messaging;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
197 | Sitecore_ConnectionStrings_Xdb.Referencedata: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Referencedata;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
198 | Sitecore_ConnectionStrings_ExperienceForms: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.ExperienceForms;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
199 | Sitecore_ConnectionStrings_Exm.Master: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Exm.master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
200 | Sitecore_ConnectionStrings_Reporting: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Reporting;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
201 | Sitecore_ConnectionStrings_Sitecore.Reporting.Client: http://cortexreporting
202 | Sitecore_ConnectionStrings_Cortex.Processing.Engine: http://cortexprocessing
203 | Sitecore_ConnectionStrings_Solr.Search: http://solr:8983/solr;solrCloud=true
204 | Sitecore_ConnectionStrings_SitecoreIdentity.Secret: ${SITECORE_IDSECRET}
205 | Sitecore_ConnectionStrings_XConnect.Collection: http://xdbcollection
206 | Sitecore_ConnectionStrings_XConnect.Search: http://xdbsearch
207 | Sitecore_ConnectionStrings_Xdb.MarketingAutomation.Operations.Client: http://xdbautomation
208 | Sitecore_ConnectionStrings_Xdb.MarketingAutomation.Reporting.Client: http://xdbautomationrpt
209 | Sitecore_ConnectionStrings_Xdb.ReferenceData.Client: http://xdbrefdata
210 | Sitecore_Processing_Service_Url: http://prc
211 | Sitecore_Processing_Service_Require_Https: "false"
212 | Sitecore_AppSettings_Telerik.AsyncUpload.ConfigurationEncryptionKey: ${TELERIK_ENCRYPTION_KEY}
213 | Sitecore_AppSettings_Telerik.Upload.ConfigurationHashKey: ${TELERIK_ENCRYPTION_KEY}
214 | Sitecore_AppSettings_Telerik.Web.UI.DialogParametersEncryptionKey: ${TELERIK_ENCRYPTION_KEY}
215 | Sitecore_License: ${SITECORE_LICENSE}
216 | Sitecore_GraphQL_Enabled: ${SITECORE_GRAPHQL_ENABLED}
217 | Sitecore_GraphQL_ExposePlayground: ${SITECORE_GRAPHQL_EXPOSEPLAYGROUND}
218 | Sitecore_GraphQL_UploadMediaOptions_EncryptionKey: ${SITECORE_GRAPHQL_UPLOADMEDIAOPTIONS_ENCRYPTIONKEY}
219 | Sitecore_Identity_Server_Authority: https://${ID_HOST}
220 | Sitecore_Identity_Server_InternalAuthority: http://id
221 | Sitecore_Identity_Server_CallbackAuthority: https://${CM_HOST}
222 | Sitecore_Identity_Server_Require_Https: "false"
223 | SOLR_CORE_PREFIX_NAME: ${SOLR_CORE_PREFIX_NAME}
224 | MEDIA_REQUEST_PROTECTION_SHARED_SECRET: ${MEDIA_REQUEST_PROTECTION_SHARED_SECRET}
225 | LOG_LEVEL_VALUE: ${LOG_LEVEL_VALUE}
226 | healthcheck:
227 | test: ["CMD", "powershell", "-command", "C:/Healthchecks/Healthcheck.ps1"]
228 | timeout: 300s
229 | labels:
230 | - "traefik.enable=true"
231 | - "traefik.http.middlewares.force-STS-Header.headers.forceSTSHeader=true"
232 | - "traefik.http.middlewares.force-STS-Header.headers.stsSeconds=31536000"
233 | - "traefik.http.routers.cm-secure.entrypoints=websecure"
234 | - "traefik.http.routers.cm-secure.rule=Host(`${CM_HOST}`)"
235 | - "traefik.http.routers.cm-secure.tls=true"
236 | - "traefik.http.routers.cm-secure.middlewares=force-STS-Header, stripForwardedHostHeader"
237 | - "traefik.http.middlewares.stripForwardedHostHeader.headers.customrequestheaders.X-Forwarded-Host="
238 | prc:
239 | isolation: ${ISOLATION}
240 | image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-prc:${SITECORE_VERSION}
241 | depends_on:
242 | mssql-init:
243 | condition: service_healthy
244 | xdbcollection:
245 | condition: service_started
246 | environment:
247 | Sitecore_AppSettings_instanceNameMode:define: default
248 | Sitecore_ConnectionStrings_Core: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
249 | Sitecore_ConnectionStrings_Security: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
250 | Sitecore_ConnectionStrings_Master: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
251 | Sitecore_ConnectionStrings_Reporting.ApiKey: ${REPORTING_API_KEY}
252 | Sitecore_ConnectionStrings_Xdb.Processing.Pools: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Processing.pools;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
253 | Sitecore_ConnectionStrings_Xdb.Referencedata: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Referencedata;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
254 | Sitecore_ConnectionStrings_Xdb.Processing.Tasks: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Processing.tasks;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
255 | Sitecore_ConnectionStrings_Reporting: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Reporting;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
256 | Sitecore_ConnectionStrings_XConnect.Collection: http://xdbcollection
257 | Sitecore_License: ${SITECORE_LICENSE}
258 | MEDIA_REQUEST_PROTECTION_SHARED_SECRET: ${MEDIA_REQUEST_PROTECTION_SHARED_SECRET}
259 | LOG_LEVEL_VALUE: ${LOG_LEVEL_VALUE}
260 | healthcheck:
261 | test: ["CMD", "powershell", "-command", "C:/Healthchecks/Healthcheck.ps1"]
262 | timeout: 300s
263 | xdbcollection:
264 | isolation: ${ISOLATION}
265 | image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-xdbcollection:${SITECORE_VERSION}
266 | depends_on:
267 | mssql-init:
268 | condition: service_healthy
269 | environment:
270 | Sitecore_ConnectionStrings_Messaging: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Messaging;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
271 | Sitecore_ConnectionStrings_Xdb.Marketingautomation: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Marketingautomation;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
272 | Sitecore_ConnectionStrings_Xdb.Processing.Pools: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Processing.pools;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
273 | Sitecore_ConnectionStrings_Collection: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Xdb.Collection.ShardMapManager;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
274 | Sitecore_ConnectionStrings_Xdb.Referencedata: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Referencedata;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
275 | Sitecore_License: ${SITECORE_LICENSE}
276 | healthcheck:
277 | test: ["CMD", "powershell", "-command", "C:/Healthchecks/Healthcheck.ps1"]
278 | timeout: 300s
279 | xdbsearch:
280 | isolation: ${ISOLATION}
281 | image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-xdbsearch:${SITECORE_VERSION}
282 | depends_on:
283 | xdbcollection:
284 | condition: service_healthy
285 | solr-init:
286 | condition: service_started
287 | environment:
288 | Sitecore_ConnectionStrings_Messaging: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Messaging;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
289 | Sitecore_ConnectionStrings_Xdb.Marketingautomation: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Marketingautomation;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
290 | Sitecore_ConnectionStrings_Xdb.Processing.Pools: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Processing.pools;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
291 | Sitecore_ConnectionStrings_Collection: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Xdb.Collection.ShardMapManager;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
292 | Sitecore_ConnectionStrings_SolrCore: http://solr:8983/solr/${SOLR_CORE_PREFIX_NAME}_xdb;solrCloud=true
293 | Sitecore_ConnectionStrings_Xdb.Referencedata: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Referencedata;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
294 | Sitecore_License: ${SITECORE_LICENSE}
295 | Sitecore_Sitecore:XConnect:CollectionSearch:Services:Solr.SolrReaderSettings:Options:RequireHttps: "false"
296 | Sitecore_Sitecore:XConnect:CollectionSearch:Services:XConnectSolrHealthCheckServicesConfiguration:Options:RequireHttps: "false"
297 | healthcheck:
298 | test: ["CMD", "powershell", "-command", "C:/Healthchecks/Healthcheck.ps1"]
299 | timeout: 300s
300 | xdbautomation:
301 | isolation: ${ISOLATION}
302 | image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-xdbautomation:${SITECORE_VERSION}
303 | depends_on:
304 | mssql-init:
305 | condition: service_healthy
306 | xdbcollection:
307 | condition: service_started
308 | xdbsearch:
309 | condition: service_started
310 | environment:
311 | Sitecore_ConnectionStrings_Messaging: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Messaging;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
312 | Sitecore_ConnectionStrings_Xdb.Marketingautomation: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Marketingautomation;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
313 | Sitecore_ConnectionStrings_Xdb.Referencedata: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Referencedata;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
314 | Sitecore_ConnectionStrings_XConnect.Collection: http://xdbcollection
315 | Sitecore_ConnectionStrings_XConnect.Search: http://xdbsearch
316 | Sitecore_License: ${SITECORE_LICENSE}
317 | healthcheck:
318 | test: ["CMD", "powershell", "-command", "C:/Healthchecks/Healthcheck.ps1"]
319 | timeout: 300s
320 | xdbautomationrpt:
321 | isolation: ${ISOLATION}
322 | image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-xdbautomationrpt:${SITECORE_VERSION}
323 | depends_on:
324 | mssql-init:
325 | condition: service_healthy
326 | environment:
327 | Sitecore_ConnectionStrings_Xdb.Marketingautomation: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Marketingautomation;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
328 | Sitecore_ConnectionStrings_Xdb.Referencedata: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Referencedata;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
329 | Sitecore_License: ${SITECORE_LICENSE}
330 | healthcheck:
331 | test: ["CMD", "powershell", "-command", "C:/Healthchecks/Healthcheck.ps1"]
332 | timeout: 300s
333 | cortexprocessing:
334 | isolation: ${ISOLATION}
335 | image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-cortexprocessing:${SITECORE_VERSION}
336 | depends_on:
337 | mssql-init:
338 | condition: service_healthy
339 | environment:
340 | Sitecore_ConnectionStrings_Processing.Engine.Storage: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Processing.Engine.Storage;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
341 | Sitecore_ConnectionStrings_Processing.Engine.Tasks: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Processing.Engine.Tasks;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
342 | Sitecore_License: ${SITECORE_LICENSE}
343 | healthcheck:
344 | test: ["CMD", "powershell", "-command", "C:/Healthchecks/Healthcheck.ps1"]
345 | timeout: 300s
346 | cortexreporting:
347 | isolation: ${ISOLATION}
348 | image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-cortexreporting:${SITECORE_VERSION}
349 | depends_on:
350 | mssql-init:
351 | condition: service_healthy
352 | environment:
353 | Sitecore_ConnectionStrings_Reporting: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Reporting;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
354 | Sitecore_License: ${SITECORE_LICENSE}
355 | healthcheck:
356 | test: ["CMD", "powershell", "-command", "C:/Healthchecks/Healthcheck.ps1"]
357 | timeout: 300s
358 | xdbrefdata:
359 | isolation: ${ISOLATION}
360 | image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-xdbrefdata:${SITECORE_VERSION}
361 | depends_on:
362 | mssql-init:
363 | condition: service_healthy
364 | environment:
365 | Sitecore_ConnectionStrings_Xdb.Referencedata: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Referencedata;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
366 | Sitecore_License: ${SITECORE_LICENSE}
367 | healthcheck:
368 | test: ["CMD", "powershell", "-command", "C:/Healthchecks/Healthcheck.ps1"]
369 | timeout: 300s
370 | xdbsearchworker:
371 | isolation: ${ISOLATION}
372 | image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-xdbsearchworker:${SITECORE_VERSION}
373 | depends_on:
374 | xdbsearch:
375 | condition: service_healthy
376 | restart: unless-stopped
377 | environment:
378 | Sitecore_ConnectionStrings_Collection: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Xdb.Collection.ShardMapManager;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
379 | Sitecore_ConnectionStrings_SolrCore: http://solr:8983/solr/${SOLR_CORE_PREFIX_NAME}_xdb;solrCloud=true
380 | Sitecore_License: ${SITECORE_LICENSE}
381 | Sitecore_Sitecore:XConnect:SearchIndexer:Services:Solr.SolrReaderSettings:Options:RequireHttps: "false"
382 | Sitecore_Sitecore:XConnect:SearchIndexer:Services:Solr.SolrWriterSettings:Options:RequireHttps: "false"
383 | Sitecore_Sitecore:XConnect:CollectionSearch:Services:XConnectSolrHealthCheckServicesConfiguration:Options:RequireHttps: "false"
384 | healthcheck:
385 | test:
386 | [
387 | "CMD",
388 | "powershell",
389 | "-command",
390 | "C:/Healthchecks/Healthcheck.ps1 -Port 8080",
391 | ]
392 | timeout: 300s
393 | xdbautomationworker:
394 | isolation: ${ISOLATION}
395 | image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-xdbautomationworker:${SITECORE_VERSION}
396 | depends_on:
397 | xdbcollection:
398 | condition: service_healthy
399 | xdbsearch:
400 | condition: service_healthy
401 | restart: unless-stopped
402 | environment:
403 | Sitecore_ConnectionStrings_XConnect.Collection: http://xdbcollection
404 | Sitecore_ConnectionStrings_XConnect.Search: http://xdbsearch
405 | Sitecore_ConnectionStrings_Xdb.Marketingautomation: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Marketingautomation;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
406 | Sitecore_ConnectionStrings_Xdb.Referencedata: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Referencedata;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
407 | Sitecore_ConnectionStrings_Messaging: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Messaging;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
408 | Sitecore_License: ${SITECORE_LICENSE}
409 | healthcheck:
410 | test:
411 | [
412 | "CMD",
413 | "powershell",
414 | "-command",
415 | "C:/Healthchecks/Healthcheck.ps1 -Port 8080",
416 | ]
417 | timeout: 300s
418 | cortexprocessingworker:
419 | isolation: ${ISOLATION}
420 | image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-cortexprocessingworker:${SITECORE_VERSION}
421 | depends_on:
422 | xdbcollection:
423 | condition: service_healthy
424 | xdbsearch:
425 | condition: service_healthy
426 | restart: unless-stopped
427 | environment:
428 | Sitecore_ConnectionStrings_Processing.Engine.Storage: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Processing.Engine.Storage;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
429 | Sitecore_ConnectionStrings_Processing.Engine.Tasks: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Processing.Engine.Tasks;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
430 | Sitecore_ConnectionStrings_XConnect.Collection: http://xdbcollection
431 | Sitecore_ConnectionStrings_XConnect.Configuration: http://xdbcollection
432 | Sitecore_ConnectionStrings_XConnect.Search: http://xdbsearch
433 | Sitecore_ConnectionStrings_Reporting: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Reporting;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
434 | Sitecore_License: ${SITECORE_LICENSE}
435 | healthcheck:
436 | test:
437 | [
438 | "CMD",
439 | "powershell",
440 | "-command",
441 | "C:/Healthchecks/Healthcheck.ps1 -Port 8080",
442 | ]
443 | timeout: 300s
444 |
--------------------------------------------------------------------------------
/custom-images/docker-compose.yml:
--------------------------------------------------------------------------------
1 | services:
2 | traefik:
3 | isolation: ${TRAEFIK_ISOLATION}
4 | image: ${TRAEFIK_IMAGE}
5 | command:
6 | - "--ping"
7 | - "--api.insecure=true"
8 | - "--providers.docker.endpoint=npipe:////./pipe/docker_engine"
9 | - "--providers.docker.exposedByDefault=false"
10 | - "--providers.file.directory=C:/etc/traefik/config/dynamic"
11 | - "--entryPoints.websecure.address=:443"
12 | - "--entryPoints.websecure.forwardedHeaders.insecure"
13 | ports:
14 | - "${HTTPS_PORT}:443"
15 | - "${TRAEFIK_MANAGEMENT_PORT}:8080"
16 | healthcheck:
17 | test: ["CMD", "traefik", "healthcheck", "--ping"]
18 | volumes:
19 | - source: \\.\pipe\docker_engine\
20 | target: \\.\pipe\docker_engine\
21 | type: npipe
22 | - ./traefik:C:/etc/traefik
23 | depends_on:
24 | id:
25 | condition: service_healthy
26 | cm:
27 | condition: service_healthy
28 | mssql:
29 | isolation: ${ISOLATION}
30 | image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2017-${EXTERNAL_IMAGE_TAG_SUFFIX}
31 | environment:
32 | SA_PASSWORD: ${SQL_SA_PASSWORD}
33 | ACCEPT_EULA: "Y"
34 | ports:
35 | - "${MSSQL_PORT}:1433"
36 | volumes:
37 | - type: bind
38 | source: .\mssql-data
39 | target: c:\data
40 | mssql-init:
41 | isolation: ${ISOLATION}
42 | image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-mssql-init:${SITECORE_VERSION}
43 | environment:
44 | SQL_SERVER: ${SQL_SERVER}
45 | SQL_ADMIN_LOGIN: ${SQL_SA_LOGIN}
46 | SQL_ADMIN_PASSWORD: ${SQL_SA_PASSWORD}
47 | SQL_DATABASE_PREFIX: ${SQL_DATABASE_PREFIX}
48 | SQL_CUSTOM_DATABASE_PREFIX_UPDATE_FROM: ${SQL_CUSTOM_DATABASE_PREFIX_UPDATE_FROM}
49 | SITECORE_ADMIN_PASSWORD: ${SITECORE_ADMIN_PASSWORD}
50 | POST_DEPLOYMENT_WAIT_PERIOD: 300
51 | healthcheck:
52 | test:
53 | [
54 | "CMD",
55 | "powershell",
56 | "-command",
57 | "if ([System.Environment]::GetEnvironmentVariable('DatabasesDeploymentStatus', 'Machine') -eq 'Complete') { exit 0 } else { exit 1}",
58 | ]
59 | start_period: 300s
60 | interval: 5s
61 | depends_on:
62 | mssql:
63 | condition: service_healthy
64 | solr:
65 | isolation: ${ISOLATION}
66 | image: ${SITECORE_DOCKER_REGISTRY}nonproduction/solr:8.11.2-${EXTERNAL_IMAGE_TAG_SUFFIX}
67 | ports:
68 | - "${SOLR_PORT}:8983"
69 | volumes:
70 | - type: bind
71 | source: .\solr-data
72 | target: c:\data
73 | environment:
74 | SOLR_MODE: solrcloud
75 | SOLR_JAVA_MEM: "-Xms2g -Xmx2g"
76 | healthcheck:
77 | test:
78 | [
79 | "CMD",
80 | "powershell",
81 | "-command",
82 | "try { $$statusCode = (iwr http://solr:8983/solr/admin/cores?action=STATUS -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }",
83 | ]
84 | solr-init:
85 | isolation: ${ISOLATION}
86 | image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-solr-init:${SITECORE_VERSION}
87 | environment:
88 | SITECORE_SOLR_CONNECTION_STRING: http://solr:8983/solr
89 | SOLR_CORE_PREFIX_NAME: ${SOLR_CORE_PREFIX_NAME}
90 | depends_on:
91 | solr:
92 | condition: service_healthy
93 | id:
94 | isolation: ${ISOLATION}
95 | image: ${SITECORE_DOCKER_REGISTRY}sitecore-id7:${SITECORE_VERSION}
96 | environment:
97 | Sitecore_Sitecore__IdentityServer__SitecoreMemberShipOptions__ConnectionString: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
98 | Sitecore_Sitecore__IdentityServer__AccountOptions__PasswordRecoveryUrl: https://${CM_HOST}/sitecore/login?rc=1
99 | Sitecore_Sitecore__IdentityServer__Clients__PasswordClient__ClientSecrets__ClientSecret1: ${SITECORE_IDSECRET}
100 | Sitecore_Sitecore__IdentityServer__Clients__DefaultClient__AllowedCorsOrigins__AllowedCorsOriginsGroup1: https://${CM_HOST}
101 | Sitecore_Sitecore__IdentityServer__CertificateRawData: ${SITECORE_ID_CERTIFICATE}
102 | Sitecore_Sitecore__IdentityServer__PublicOrigin: https://${ID_HOST}
103 | Sitecore_Sitecore__IdentityServer__CertificateRawDataPassword: ${SITECORE_ID_CERTIFICATE_PASSWORD}
104 | Sitecore_License: ${SITECORE_LICENSE}
105 | healthcheck:
106 | test: ["CMD", "pwsh", "-command", "C:/Healthchecks/Healthcheck.ps1"]
107 | timeout: 300s
108 | depends_on:
109 | mssql-init:
110 | condition: service_healthy
111 | labels:
112 | - "traefik.enable=true"
113 | - "traefik.http.routers.id-secure.entrypoints=websecure"
114 | - "traefik.http.routers.id-secure.rule=Host(`${ID_HOST}`)"
115 | - "traefik.http.routers.id-secure.tls=true"
116 | cm:
117 | isolation: ${ISOLATION}
118 | image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-cm:${SITECORE_VERSION}
119 | depends_on:
120 | id:
121 | condition: service_started
122 | xconnect:
123 | condition: service_started
124 | environment:
125 | Sitecore_ConnectionStrings_Core: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
126 | Sitecore_ConnectionStrings_Security: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
127 | Sitecore_ConnectionStrings_Master: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
128 | Sitecore_ConnectionStrings_Web: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Web;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
129 | Sitecore_ConnectionStrings_Messaging: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Messaging;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
130 | Sitecore_ConnectionStrings_Xdb.Processing.Pools: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Processing.pools;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
131 | Sitecore_ConnectionStrings_Xdb.Referencedata: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Referencedata;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
132 | Sitecore_ConnectionStrings_Xdb.Processing.Tasks: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Processing.tasks;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
133 | Sitecore_ConnectionStrings_ExperienceForms: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.ExperienceForms;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
134 | Sitecore_ConnectionStrings_Exm.Master: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Exm.master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
135 | Sitecore_ConnectionStrings_Reporting: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Reporting;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
136 | Sitecore_ConnectionStrings_Sitecore.Reporting.Client: http://xconnect
137 | Sitecore_ConnectionStrings_Cortex.Processing.Engine: http://xconnect
138 | Sitecore_ConnectionStrings_Solr.Search: http://solr:8983/solr;solrCloud=true
139 | Sitecore_ConnectionStrings_SitecoreIdentity.Secret: ${SITECORE_IDSECRET}
140 | Sitecore_ConnectionStrings_XConnect.Collection: http://xconnect
141 | Sitecore_ConnectionStrings_Xdb.MarketingAutomation.Operations.Client: http://xconnect
142 | Sitecore_ConnectionStrings_Xdb.MarketingAutomation.Reporting.Client: http://xconnect
143 | Sitecore_ConnectionStrings_Xdb.ReferenceData.Client: http://xconnect
144 | Sitecore_License: ${SITECORE_LICENSE}
145 | Sitecore_GraphQL_Enabled: ${SITECORE_GRAPHQL_ENABLED}
146 | Sitecore_GraphQL_ExposePlayground: ${SITECORE_GRAPHQL_EXPOSEPLAYGROUND}
147 | Sitecore_GraphQL_UploadMediaOptions_EncryptionKey: ${SITECORE_GRAPHQL_UPLOADMEDIAOPTIONS_ENCRYPTIONKEY}
148 | Sitecore_Identity_Server_Authority: https://${ID_HOST}
149 | Sitecore_Identity_Server_InternalAuthority: http://id
150 | Sitecore_Identity_Server_CallbackAuthority: https://${CM_HOST}
151 | Sitecore_Identity_Server_Require_Https: "false"
152 | Sitecore_Analytics_Forwarded_Request_Http_Header: X-Forwarded-For
153 | SOLR_CORE_PREFIX_NAME: ${SOLR_CORE_PREFIX_NAME}
154 | MEDIA_REQUEST_PROTECTION_SHARED_SECRET: ${MEDIA_REQUEST_PROTECTION_SHARED_SECRET}
155 | LOG_LEVEL_VALUE: ${LOG_LEVEL_VALUE}
156 | healthcheck:
157 | test: ["CMD", "powershell", "-command", "C:/Healthchecks/Healthcheck.ps1"]
158 | timeout: 300s
159 | labels:
160 | - "traefik.enable=true"
161 | - "traefik.http.middlewares.force-STS-Header.headers.forceSTSHeader=true"
162 | - "traefik.http.middlewares.force-STS-Header.headers.stsSeconds=31536000"
163 | - "traefik.http.routers.cm-secure.entrypoints=websecure"
164 | - "traefik.http.routers.cm-secure.rule=Host(`${CM_HOST}`)"
165 | - "traefik.http.routers.cm-secure.tls=true"
166 | - "traefik.http.routers.cm-secure.middlewares=force-STS-Header, stripForwardedHostHeader"
167 | - "traefik.http.middlewares.stripForwardedHostHeader.headers.customrequestheaders.X-Forwarded-Host="
168 | volumes:
169 | - type: bind
170 | source: .\device-detection-data
171 | target: C:\inetpub\wwwroot\App_Data\DeviceDetection
172 | xconnect:
173 | isolation: ${ISOLATION}
174 | image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-xconnect:${SITECORE_VERSION}
175 | ports:
176 | - "${XCONNECT_PORT}:80"
177 | depends_on:
178 | mssql-init:
179 | condition: service_healthy
180 | solr-init:
181 | condition: service_started
182 | environment:
183 | Sitecore_License: ${SITECORE_LICENSE}
184 | Sitecore_ConnectionStrings_Messaging: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Messaging;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
185 | Sitecore_ConnectionStrings_Processing.Engine.Storage: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Processing.Engine.Storage;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
186 | Sitecore_ConnectionStrings_Processing.Engine.Tasks: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Processing.Engine.Tasks;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
187 | Sitecore_ConnectionStrings_Reporting: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Reporting;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
188 | Sitecore_ConnectionStrings_Xdb.Marketingautomation: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Marketingautomation;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
189 | Sitecore_ConnectionStrings_Xdb.Processing.Pools: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Processing.pools;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
190 | Sitecore_ConnectionStrings_Xdb.Referencedata: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Referencedata;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
191 | Sitecore_ConnectionStrings_Collection: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Xdb.Collection.ShardMapManager;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
192 | Sitecore_ConnectionStrings_SolrCore: http://solr:8983/solr/${SOLR_CORE_PREFIX_NAME}_xdb;solrCloud=true
193 | Sitecore_Sitecore:XConnect:CollectionSearch:Services:Solr.SolrReaderSettings:Options:RequireHttps: "false"
194 | Sitecore_Sitecore:XConnect:CollectionSearch:Services:XConnectSolrHealthCheckServicesConfiguration:Options:RequireHttps: "false"
195 | Sitecore_Sitecore:XConnect:SearchIndexer:Services:Solr.SolrReaderSettings:Options:RequireHttps: "false"
196 | Sitecore_Sitecore:XConnect:SearchIndexer:Services:Solr.SolrWriterSettings:Options:RequireHttps: "false"
197 | healthcheck:
198 | test: ["CMD", "powershell", "-command", "C:/Healthchecks/Healthcheck.ps1"]
199 | timeout: 300s
200 | xdbsearchworker:
201 | isolation: ${ISOLATION}
202 | image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-xdbsearchworker:${SITECORE_VERSION}
203 | depends_on:
204 | xconnect:
205 | condition: service_healthy
206 | restart: unless-stopped
207 | environment:
208 | Sitecore_ConnectionStrings_Collection: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Xdb.Collection.ShardMapManager;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
209 | Sitecore_ConnectionStrings_SolrCore: http://solr:8983/solr/${SOLR_CORE_PREFIX_NAME}_xdb;solrCloud=true
210 | Sitecore_License: ${SITECORE_LICENSE}
211 | Sitecore_Sitecore:XConnect:SearchIndexer:Services:Solr.SolrReaderSettings:Options:RequireHttps: "false"
212 | Sitecore_Sitecore:XConnect:SearchIndexer:Services:Solr.SolrWriterSettings:Options:RequireHttps: "false"
213 | Sitecore_Sitecore:XConnect:CollectionSearch:Services:XConnectSolrHealthCheckServicesConfiguration:Options:RequireHttps: "false"
214 | healthcheck:
215 | test:
216 | [
217 | "CMD",
218 | "powershell",
219 | "-command",
220 | "C:/Healthchecks/Healthcheck.ps1 -Port 8080",
221 | ]
222 | timeout: 300s
223 | xdbautomationworker:
224 | isolation: ${ISOLATION}
225 | image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-xdbautomationworker:${SITECORE_VERSION}
226 | depends_on:
227 | xconnect:
228 | condition: service_healthy
229 | restart: unless-stopped
230 | environment:
231 | Sitecore_ConnectionStrings_XConnect.Collection: http://xconnect
232 | Sitecore_ConnectionStrings_Xdb.Marketingautomation: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Marketingautomation;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
233 | Sitecore_ConnectionStrings_Xdb.Referencedata: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Referencedata;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
234 | Sitecore_ConnectionStrings_Messaging: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Messaging;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
235 | Sitecore_License: ${SITECORE_LICENSE}
236 | healthcheck:
237 | test:
238 | [
239 | "CMD",
240 | "powershell",
241 | "-command",
242 | "C:/Healthchecks/Healthcheck.ps1 -Port 8080",
243 | ]
244 | timeout: 300s
245 | cortexprocessingworker:
246 | isolation: ${ISOLATION}
247 | image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-cortexprocessingworker:${SITECORE_VERSION}
248 | depends_on:
249 | xconnect:
250 | condition: service_healthy
251 | restart: unless-stopped
252 | environment:
253 | Sitecore_ConnectionStrings_Processing.Engine.Storage: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Processing.Engine.Storage;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
254 | Sitecore_ConnectionStrings_Processing.Engine.Tasks: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Processing.Engine.Tasks;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
255 | Sitecore_ConnectionStrings_XConnect.Collection: http://xconnect
256 | Sitecore_ConnectionStrings_XConnect.Configuration: http://xconnect
257 | Sitecore_ConnectionStrings_XConnect.Search: http://xconnect
258 | Sitecore_ConnectionStrings_Reporting: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Reporting;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
259 | Sitecore_License: ${SITECORE_LICENSE}
260 | healthcheck:
261 | test:
262 | [
263 | "CMD",
264 | "powershell",
265 | "-command",
266 | "C:/Healthchecks/Healthcheck.ps1 -Port 8080",
267 | ]
268 | timeout: 300s
269 |
--------------------------------------------------------------------------------
/custom-images/docker/.gitignore:
--------------------------------------------------------------------------------
1 | /data/cm/*
2 | !/data/cm/.gitkeep
3 | /data/cd/*
4 | !/data/cd/.gitkeep
5 | /data/mssql/*
6 | !/data/mssql/.gitkeep
7 | /data/solr/*
8 | !/data/solr/.gitkeep
9 |
10 | /deploy/website/*
11 | !/deploy/website/.gitkeep
12 | /deploy/xconnect/*
13 | !/deploy/xconnect/.gitkeep
14 |
15 | /traefik/certs/*
16 | !/traefik/certs/.gitkeep
--------------------------------------------------------------------------------
/custom-images/docker/build/cd/Dockerfile:
--------------------------------------------------------------------------------
1 | # escape=`
2 |
3 | ARG BASE_IMAGE
4 | ARG SXA_IMAGE
5 | ARG TOOLING_IMAGE
6 | ARG SOLUTION_IMAGE
7 |
8 | FROM ${SOLUTION_IMAGE} as solution
9 | FROM ${TOOLING_IMAGE} as tooling
10 | FROM ${SXA_IMAGE} as sxa
11 | FROM ${BASE_IMAGE}
12 |
13 | SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
14 |
15 | # Copy development tools and entrypoint
16 | COPY --from=tooling \tools\ \tools\
17 |
18 | WORKDIR C:\inetpub\wwwroot
19 |
20 | # Add SXA module
21 | COPY --from=sxa \module\cd\content .\
22 | COPY --from=sxa \module\tools \module\tools
23 | RUN C:\module\tools\Initialize-Content.ps1 -TargetPath .\; `
24 | Remove-Item -Path C:\module -Recurse -Force;
25 |
26 | # Copy solution website files
27 | COPY --from=solution \artifacts\website\ .\
28 |
29 | # Copy solution transforms
30 | COPY --from=solution \artifacts\transforms\ \transforms\solution\
31 |
32 | # Perform solution transforms
33 | RUN C:\tools\scripts\Invoke-XdtTransform.ps1 -Path .\ -XdtPath C:\transforms\solution\DockerExamples.Website
--------------------------------------------------------------------------------
/custom-images/docker/build/cm/Dockerfile:
--------------------------------------------------------------------------------
1 | # escape=`
2 |
3 | ARG BASE_IMAGE
4 | ARG SXA_IMAGE
5 | ARG SPE_IMAGE
6 | ARG TOOLING_IMAGE
7 | ARG SOLUTION_IMAGE
8 |
9 | FROM ${SOLUTION_IMAGE} as solution
10 | FROM ${TOOLING_IMAGE} as tooling
11 | FROM ${SPE_IMAGE} as spe
12 | FROM ${SXA_IMAGE} as sxa
13 | FROM ${BASE_IMAGE}
14 |
15 |
16 | SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
17 |
18 | # Copy development tools and entrypoint
19 | COPY --from=tooling \tools\ \tools\
20 |
21 | WORKDIR C:\inetpub\wwwroot
22 |
23 | # Add SPE module
24 | COPY --from=spe \module\cm\content .\
25 |
26 | # Add SXA module
27 | COPY --from=sxa \module\cm\content .\
28 | COPY --from=sxa \module\tools \module\tools
29 | RUN C:\module\tools\Initialize-Content.ps1 -TargetPath .\; `
30 | Remove-Item -Path C:\module -Recurse -Force;
31 |
32 | # Copy solution website files
33 | COPY --from=solution \artifacts\website\ .\
34 |
35 | # Copy solution transforms
36 | COPY --from=solution \artifacts\transforms\ \transforms\solution\
37 |
38 | # Copy role transforms
39 | COPY .\transforms\ \transforms\role\
40 |
41 | # Perform solution transforms
42 | RUN C:\tools\scripts\Invoke-XdtTransform.ps1 -Path .\ -XdtPath C:\transforms\solution\DockerExamples.Website
43 |
44 | # Perform role transforms
45 | RUN C:\tools\scripts\Invoke-XdtTransform.ps1 -Path .\ -XdtPath C:\transforms\role
--------------------------------------------------------------------------------
/custom-images/docker/build/cm/transforms/Web.config.xdt:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/custom-images/docker/build/cortexprocessing/Dockerfile:
--------------------------------------------------------------------------------
1 | # escape=`
2 |
3 | ARG BASE_IMAGE
4 |
5 | FROM ${BASE_IMAGE}
--------------------------------------------------------------------------------
/custom-images/docker/build/cortexprocessingworker/Dockerfile:
--------------------------------------------------------------------------------
1 | # escape=`
2 |
3 | ARG BASE_IMAGE
4 | ARG SOLUTION_IMAGE
5 |
6 | FROM ${SOLUTION_IMAGE} as solution
7 | FROM ${BASE_IMAGE}
8 |
9 | SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
10 |
11 | WORKDIR C:\service
12 |
13 | # Copy solution XConnect model assemblies
14 | COPY --from=solution \artifacts\xconnect\bin\ .\
15 |
16 | # Copy solution XConnect model JSON
17 | COPY --from=solution \artifacts\xconnect\App_Data\Models\ .\App_Data\Models\
--------------------------------------------------------------------------------
/custom-images/docker/build/cortexreporting/Dockerfile:
--------------------------------------------------------------------------------
1 | # escape=`
2 |
3 | ARG BASE_IMAGE
4 |
5 | FROM ${BASE_IMAGE}
--------------------------------------------------------------------------------
/custom-images/docker/build/id/Dockerfile:
--------------------------------------------------------------------------------
1 | # escape=`
2 |
3 | ARG BASE_IMAGE
4 |
5 | FROM ${BASE_IMAGE}
--------------------------------------------------------------------------------
/custom-images/docker/build/mssql-init/Dockerfile:
--------------------------------------------------------------------------------
1 | # escape=`
2 |
3 | ARG BASE_IMAGE
4 | ARG SPE_IMAGE
5 |
6 | FROM ${SPE_IMAGE} as spe
7 | FROM ${BASE_IMAGE}
8 |
9 | COPY --from=spe C:\module\db C:\resources\spe
--------------------------------------------------------------------------------
/custom-images/docker/build/prc/Dockerfile:
--------------------------------------------------------------------------------
1 | # escape=`
2 |
3 | ARG BASE_IMAGE
4 | ARG SOLUTION_IMAGE
5 |
6 | FROM ${SOLUTION_IMAGE} as solution
7 | FROM ${BASE_IMAGE}
8 |
9 | SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
10 |
11 | WORKDIR C:\inetpub\wwwroot
12 |
13 | # Copy solution website files
14 | COPY --from=solution \artifacts\website\ .\
--------------------------------------------------------------------------------
/custom-images/docker/build/redis/Dockerfile:
--------------------------------------------------------------------------------
1 | # escape=`
2 |
3 | ARG BASE_IMAGE
4 |
5 | FROM ${BASE_IMAGE}
--------------------------------------------------------------------------------
/custom-images/docker/build/rep/Dockerfile:
--------------------------------------------------------------------------------
1 | # escape=`
2 |
3 | ARG BASE_IMAGE
4 | ARG SOLUTION_IMAGE
5 |
6 | FROM ${SOLUTION_IMAGE} as solution
7 | FROM ${BASE_IMAGE}
8 |
9 | SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
10 |
11 | WORKDIR C:\inetpub\wwwroot
12 |
13 | # Copy solution website files
14 | COPY --from=solution \artifacts\website\ .\
--------------------------------------------------------------------------------
/custom-images/docker/build/solr-init/Dockerfile:
--------------------------------------------------------------------------------
1 | # escape=`
2 |
3 | ARG BASE_IMAGE
4 | ARG SXA_IMAGE
5 |
6 | FROM ${SXA_IMAGE} as sxa
7 | FROM ${BASE_IMAGE}
8 |
9 | SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
10 |
11 | # Add SXA module
12 | COPY --from=sxa C:\module\solr\cores-sxa.json C:\data\cores-sxa.json
--------------------------------------------------------------------------------
/custom-images/docker/build/xconnect/Dockerfile:
--------------------------------------------------------------------------------
1 | # escape=`
2 |
3 | ARG BASE_IMAGE
4 | ARG TOOLING_IMAGE
5 | ARG SOLUTION_IMAGE
6 |
7 | FROM ${SOLUTION_IMAGE} as solution
8 | FROM ${TOOLING_IMAGE} as tooling
9 | FROM ${BASE_IMAGE}
10 |
11 | SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
12 |
13 | # Copy development tools and entrypoint
14 | COPY --from=tooling \tools\ \tools\
15 |
16 | WORKDIR C:\inetpub\wwwroot
17 |
18 | # Copy solution XConnect files
19 | COPY --from=solution \artifacts\xconnect\ .\
--------------------------------------------------------------------------------
/custom-images/docker/build/xdbautomation/Dockerfile:
--------------------------------------------------------------------------------
1 | # escape=`
2 |
3 | ARG BASE_IMAGE
4 | ARG SOLUTION_IMAGE
5 |
6 | FROM ${SOLUTION_IMAGE} as solution
7 | FROM ${BASE_IMAGE}
8 |
9 | SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
10 |
11 | WORKDIR C:\inetpub\wwwroot
12 |
13 | # Copy solution XConnect model assemblies
14 | COPY --from=solution \artifacts\xconnect\bin\ .\bin\
15 |
16 | # Copy solution XConnect model JSON
17 | COPY --from=solution \artifacts\xconnect\App_Data\Models\ .\App_Data\Models\
18 |
19 | # Copy solution XConnect model config
20 | COPY --from=solution \artifacts\xconnect\App_Data\Config\Sitecore\MarketingAutomation\ .\App_Data\Config\Sitecore\MarketingAutomation\
--------------------------------------------------------------------------------
/custom-images/docker/build/xdbautomationrpt/Dockerfile:
--------------------------------------------------------------------------------
1 | # escape=`
2 |
3 | ARG BASE_IMAGE
4 |
5 | FROM ${BASE_IMAGE}
--------------------------------------------------------------------------------
/custom-images/docker/build/xdbautomationworker/Dockerfile:
--------------------------------------------------------------------------------
1 | # escape=`
2 |
3 | ARG BASE_IMAGE
4 | ARG SOLUTION_IMAGE
5 |
6 | FROM ${SOLUTION_IMAGE} as solution
7 | FROM ${BASE_IMAGE}
8 |
9 | SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
10 |
11 | WORKDIR C:\service
12 |
13 | # Copy solution XConnect model assemblies
14 | COPY --from=solution \artifacts\xconnect\bin\ .\
15 |
16 | # Copy solution XConnect model config
17 | COPY --from=solution \artifacts\xconnect\App_Data\Config\Sitecore\MarketingAutomation\ .\App_Data\Config\Sitecore\MarketingAutomation\
--------------------------------------------------------------------------------
/custom-images/docker/build/xdbcollection/Dockerfile:
--------------------------------------------------------------------------------
1 | # escape=`
2 |
3 | ARG BASE_IMAGE
4 | ARG SOLUTION_IMAGE
5 |
6 | FROM ${SOLUTION_IMAGE} as solution
7 | FROM ${BASE_IMAGE}
8 |
9 | SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
10 |
11 | WORKDIR C:\inetpub\wwwroot
12 |
13 | # Copy solution XConnect model assemblies
14 | COPY --from=solution \artifacts\xconnect\bin\ .\bin\
15 |
16 | # Copy solution XConnect model JSON
17 | COPY --from=solution \artifacts\xconnect\App_Data\Models\ .\App_Data\Models\
--------------------------------------------------------------------------------
/custom-images/docker/build/xdbrefdata/Dockerfile:
--------------------------------------------------------------------------------
1 | # escape=`
2 |
3 | ARG BASE_IMAGE
4 |
5 | FROM ${BASE_IMAGE}
--------------------------------------------------------------------------------
/custom-images/docker/build/xdbsearch/Dockerfile:
--------------------------------------------------------------------------------
1 | # escape=`
2 |
3 | ARG BASE_IMAGE
4 | ARG SOLUTION_IMAGE
5 |
6 | FROM ${SOLUTION_IMAGE} as solution
7 | FROM ${BASE_IMAGE}
8 |
9 | SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
10 |
11 | WORKDIR C:\inetpub\wwwroot
12 |
13 | # Copy solution XConnect model assemblies
14 | COPY --from=solution \artifacts\xconnect\bin\ .\bin\
15 |
16 | # Copy solution XConnect model JSON
17 | COPY --from=solution \artifacts\xconnect\App_Data\Models\ .\App_Data\Models\
--------------------------------------------------------------------------------
/custom-images/docker/build/xdbsearchworker/Dockerfile:
--------------------------------------------------------------------------------
1 | # escape=`
2 |
3 | ARG BASE_IMAGE
4 | ARG SOLUTION_IMAGE
5 |
6 | FROM ${SOLUTION_IMAGE} as solution
7 | FROM ${BASE_IMAGE}
8 |
9 | SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
10 |
11 | WORKDIR C:\service
12 |
13 | # Copy solution XConnect model JSON
14 | COPY --from=solution \artifacts\xconnect\App_Data\Models\ .\App_Data\Models\
--------------------------------------------------------------------------------
/custom-images/docker/clean.ps1:
--------------------------------------------------------------------------------
1 | # Clean data folders
2 | Get-ChildItem -Path (Join-Path $PSScriptRoot "\data") -Directory | ForEach-Object {
3 | $dataPath = $_.FullName
4 |
5 | Get-ChildItem -Path $dataPath -Exclude ".gitkeep" -Recurse | Remove-Item -Force -Recurse -Verbose
6 | }
7 |
8 | # Clean deploy folders
9 | Get-ChildItem -Path (Join-Path $PSScriptRoot "\deploy") -Directory | ForEach-Object {
10 | $deployPath = $_.FullName
11 |
12 | Get-ChildItem -Path $deployPath -Exclude ".gitkeep" -Recurse | Remove-Item -Force -Recurse -Verbose
13 | }
--------------------------------------------------------------------------------
/custom-images/docker/data/cd/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sitecore/docker-examples/1d37cabcf9bf6393773ef29102af3896bdd3a86c/custom-images/docker/data/cd/.gitkeep
--------------------------------------------------------------------------------
/custom-images/docker/data/cm/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sitecore/docker-examples/1d37cabcf9bf6393773ef29102af3896bdd3a86c/custom-images/docker/data/cm/.gitkeep
--------------------------------------------------------------------------------
/custom-images/docker/data/devicedetection/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sitecore/docker-examples/1d37cabcf9bf6393773ef29102af3896bdd3a86c/custom-images/docker/data/devicedetection/.gitkeep
--------------------------------------------------------------------------------
/custom-images/docker/data/mssql/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sitecore/docker-examples/1d37cabcf9bf6393773ef29102af3896bdd3a86c/custom-images/docker/data/mssql/.gitkeep
--------------------------------------------------------------------------------
/custom-images/docker/data/solr/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sitecore/docker-examples/1d37cabcf9bf6393773ef29102af3896bdd3a86c/custom-images/docker/data/solr/.gitkeep
--------------------------------------------------------------------------------
/custom-images/docker/deploy/website/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sitecore/docker-examples/1d37cabcf9bf6393773ef29102af3896bdd3a86c/custom-images/docker/deploy/website/.gitkeep
--------------------------------------------------------------------------------
/custom-images/docker/deploy/xconnect/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sitecore/docker-examples/1d37cabcf9bf6393773ef29102af3896bdd3a86c/custom-images/docker/deploy/xconnect/.gitkeep
--------------------------------------------------------------------------------
/custom-images/docker/traefik/certs/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sitecore/docker-examples/1d37cabcf9bf6393773ef29102af3896bdd3a86c/custom-images/docker/traefik/certs/.gitkeep
--------------------------------------------------------------------------------
/custom-images/docker/traefik/config/dynamic/certs_config.yaml:
--------------------------------------------------------------------------------
1 | tls:
2 | certificates:
3 | - certFile: C:\etc\traefik\certs\cert.pem
4 | keyFile: C:\etc\traefik\certs\key.pem
--------------------------------------------------------------------------------
/custom-images/down.ps1:
--------------------------------------------------------------------------------
1 | param(
2 | $XM1
3 | )
4 |
5 | Write-Host "Down containers..." -ForegroundColor Green
6 | try {
7 | docker-compose kill mssql
8 | if ($LASTEXITCODE -ne 0) {
9 | Write-Error "Container down failed, see errors above."
10 | }
11 |
12 | if ($XM1 -ieq 'XM1') {
13 | Write-Host "Down script for XM1......" -ForegroundColor Cyan
14 | docker-compose -f docker-compose.xm1.yml -f docker-compose.xm1.override.yml down
15 |
16 | }
17 | elseif ($XM1 -ieq 'XP1') {
18 | Write-Host "Down script for XP1......" -ForegroundColor Cyan
19 | docker-compose -f docker-compose.xp1.yml -f docker-compose.xp1.override.yml down
20 |
21 | }
22 |
23 | docker-compose down
24 | if ($LASTEXITCODE -ne 0) {
25 | Write-Error "Container down failed, see errors above."
26 | }
27 |
28 |
29 | }
30 | finally {
31 | }
32 |
--------------------------------------------------------------------------------
/custom-images/init.ps1:
--------------------------------------------------------------------------------
1 | [CmdletBinding()]
2 | Param (
3 | [Parameter(Mandatory = $true)]
4 | [string]
5 | [ValidateNotNullOrEmpty()]
6 | $LicenseXmlPath,
7 |
8 | [string]
9 | $HostName = "dockerexamples",
10 |
11 | # We do not need to use [SecureString] here since the value will be stored unencrypted in .env,
12 | # and used only for transient local example environment.
13 | [string]
14 | $SitecoreAdminPassword = "Password12345",
15 |
16 | # We do not need to use [SecureString] here since the value will be stored unencrypted in .env,
17 | # and used only for transient local example environment.
18 | [string]
19 | $SqlSaPassword = "Password12345"
20 | )
21 |
22 | $ErrorActionPreference = "Stop";
23 |
24 | if (-not (Test-Path $LicenseXmlPath)) {
25 | throw "Did not find $LicenseXmlPath"
26 | }
27 | if (-not (Test-Path $LicenseXmlPath -PathType Leaf)) {
28 | throw "$LicenseXmlPath is not a file"
29 | }
30 |
31 | # We actually want the folder that it's in for mounting
32 | $LicenseXmlFolderPath = (Get-Item $LicenseXmlPath).Directory.FullName
33 |
34 |
35 | # Check for Sitecore Gallery
36 | Import-Module PowerShellGet
37 | $SitecoreGallery = Get-PSRepository | Where-Object { $_.SourceLocation -eq "https://nuget.sitecore.com/resources/v2/" }
38 | if (-not $SitecoreGallery) {
39 | Write-Host "Adding Sitecore PowerShell Gallery..." -ForegroundColor Green
40 | Register-PSRepository -Name SitecoreGallery -SourceLocation https://nuget.sitecore.com/resources/v2/ -InstallationPolicy Trusted
41 | $SitecoreGallery = Get-PSRepository -Name SitecoreGallery
42 | }
43 | # Install and Import SitecoreDockerTools
44 | $dockerToolsVersion = "10.2.7"
45 | Remove-Module SitecoreDockerTools -ErrorAction SilentlyContinue
46 | if (-not (Get-InstalledModule -Name SitecoreDockerTools -RequiredVersion $dockerToolsVersion -ErrorAction SilentlyContinue)) {
47 | Write-Host "Installing SitecoreDockerTools..." -ForegroundColor Green
48 | Install-Module SitecoreDockerTools -RequiredVersion $dockerToolsVersion -Scope CurrentUser -Repository $SitecoreGallery.Name
49 | }
50 | Write-Host "Importing SitecoreDockerTools..." -ForegroundColor Green
51 | Import-Module SitecoreDockerTools -RequiredVersion $dockerToolsVersion
52 | Write-SitecoreDockerWelcome
53 |
54 | ###############################
55 | # Populate the environment file
56 | ###############################
57 |
58 | Write-Host "Populating required .env file variables..." -ForegroundColor Green
59 |
60 | # HOST_LICENSE_FOLDER
61 | Set-EnvFileVariable "HOST_LICENSE_FOLDER" -Value $LicenseXmlFolderPath
62 |
63 | # SITECORE_ADMIN_PASSWORD
64 | Set-EnvFileVariable "SITECORE_ADMIN_PASSWORD" -Value $SitecoreAdminPassword
65 |
66 | # SQL_SA_PASSWORD
67 | Set-EnvFileVariable "SQL_SA_PASSWORD" -Value $SqlSaPassword
68 |
69 | # CD_HOST
70 | Set-EnvFileVariable "CD_HOST" -Value "cd.$($HostName).localhost"
71 |
72 | # CM_HOST
73 | Set-EnvFileVariable "CM_HOST" -Value "cm.$($HostName).localhost"
74 |
75 | # ID_HOST
76 | Set-EnvFileVariable "ID_HOST" -Value "id.$($HostName).localhost"
77 |
78 | # REPORTING_API_KEY = random 64-128 chars
79 | Set-EnvFileVariable "REPORTING_API_KEY" -Value (Get-SitecoreRandomString 64 -DisallowSpecial)
80 |
81 | # TELERIK_ENCRYPTION_KEY = random 64-128 chars
82 | Set-EnvFileVariable "TELERIK_ENCRYPTION_KEY" -Value (Get-SitecoreRandomString 128)
83 |
84 | # MEDIA_REQUEST_PROTECTION_SHARED_SECRET
85 | Set-EnvFileVariable "MEDIA_REQUEST_PROTECTION_SHARED_SECRET" -Value (Get-SitecoreRandomString 64)
86 |
87 | # SITECORE_IDSECRET = random 64 chars
88 | Set-EnvFileVariable "SITECORE_IDSECRET" -Value (Get-SitecoreRandomString 64 -DisallowSpecial)
89 |
90 | # SITECORE_ID_CERTIFICATE
91 | $idCertPassword = Get-SitecoreRandomString 12 -DisallowSpecial
92 | Set-EnvFileVariable "SITECORE_ID_CERTIFICATE" -Value (Get-SitecoreCertificateAsBase64String -DnsName "localhost" -Password (ConvertTo-SecureString -String $idCertPassword -Force -AsPlainText))
93 |
94 | # SITECORE_ID_CERTIFICATE_PASSWORD
95 | Set-EnvFileVariable "SITECORE_ID_CERTIFICATE_PASSWORD" -Value $idCertPassword
96 |
97 | ##################################
98 | # Configure TLS/HTTPS certificates
99 | ##################################
100 |
101 | Push-Location docker\traefik\certs
102 | try {
103 | $mkcert = ".\mkcert.exe"
104 | if ($null -ne (Get-Command mkcert.exe -ErrorAction SilentlyContinue)) {
105 | # mkcert installed in PATH
106 | $mkcert = "mkcert"
107 | } elseif (-not (Test-Path $mkcert)) {
108 | Write-Host "Downloading and installing mkcert certificate tool..." -ForegroundColor Green
109 | Invoke-WebRequest "https://github.com/FiloSottile/mkcert/releases/download/v1.4.1/mkcert-v1.4.1-windows-amd64.exe" -UseBasicParsing -OutFile mkcert.exe
110 | if ((Get-FileHash mkcert.exe).Hash -ne "1BE92F598145F61CA67DD9F5C687DFEC17953548D013715FF54067B34D7C3246") {
111 | Remove-Item mkcert.exe -Force
112 | throw "Invalid mkcert.exe file"
113 | }
114 | }
115 | Write-Host "Generating Traefik TLS certificate..." -ForegroundColor Green
116 | & $mkcert -install
117 | & $mkcert -key-file key.pem -cert-file cert.pem "*.$($HostName).localhost"
118 | }
119 | catch {
120 | Write-Host "An error occurred while attempting to generate TLS certificate: $_" -ForegroundColor Red
121 | }
122 | finally {
123 | Pop-Location
124 | }
125 |
126 | ################################
127 | # Add Windows hosts file entries
128 | ################################
129 |
130 | Write-Host "Adding Windows hosts file entries..." -ForegroundColor Green
131 |
132 | Add-HostsEntry "cd.$($HostName).localhost"
133 | Add-HostsEntry "cm.$($HostName).localhost"
134 | Add-HostsEntry "id.$($HostName).localhost"
135 |
136 | Write-Host "Done!" -ForegroundColor Green
--------------------------------------------------------------------------------
/custom-images/nuget.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/custom-images/src/App.XConnect.Demo/App.XConnect.Demo.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {2FF4ECD0-C43F-4BE2-A261-C386EFFD335E}
8 | Exe
9 | App.XConnect.Demo
10 | App.XConnect.Demo
11 | v4.8
12 | 512
13 | true
14 | true
15 |
16 |
17 | AnyCPU
18 | true
19 | full
20 | false
21 | bin\Debug\
22 | DEBUG;TRACE
23 | prompt
24 | 4
25 |
26 |
27 | AnyCPU
28 | pdbonly
29 | true
30 | bin\Release\
31 | TRACE
32 | prompt
33 | 4
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | {16dc2062-e853-44bb-a006-bc1f4cd5bbcf}
60 | DockerExamples.XConnect.Model
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/custom-images/src/App.XConnect.Demo/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/custom-images/src/App.XConnect.Demo/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using DockerExamples.XConnect.Model;
3 | using Sitecore.XConnect;
4 | using Sitecore.XConnect.Client;
5 | using Sitecore.XConnect.Collection.Model;
6 | using Sitecore.XConnect.Schema;
7 |
8 | namespace App.XConnect.Demo
9 | {
10 | class Program
11 | {
12 | static void Main(string[] args)
13 | {
14 | AddContact();
15 | }
16 |
17 | private static void AddContact()
18 | {
19 | using (var client = GetClient())
20 | {
21 | var contact = new Contact(new ContactIdentifier("domain", "docker.examples", ContactIdentifierType.Known));
22 |
23 | var personalInfo = new PersonalInformation
24 | {
25 | FirstName = "Docker",
26 | LastName = "Examples"
27 | };
28 | client.SetFacet(contact, PersonalInformation.DefaultFacetKey, personalInfo);
29 |
30 | var emailFacet = new EmailAddressList(new EmailAddress("docker.examples@sitecore.com", true), "domain");
31 | client.SetFacet(contact, EmailAddressList.DefaultFacetKey, emailFacet);
32 |
33 | // Add our custom facet
34 | var demoFacet = new DemoFacet
35 | {
36 | FavoriteAnimal = "Whale"
37 | };
38 | client.SetFacet(contact, DemoFacet.DefaultFacetKey, demoFacet);
39 |
40 | client.AddContact(contact);
41 | client.Submit();
42 |
43 | Console.WriteLine("Added contact!");
44 | }
45 | }
46 |
47 | private static XConnectClient GetClient()
48 | {
49 | var config = new XConnectClientConfiguration(
50 | new XdbRuntimeModel(DemoModel.Model), // Use our custom model
51 | new Uri("http://localhost:8081/"),
52 | new Uri("http://localhost:8081/"));
53 |
54 | try
55 | {
56 | config.Initialize();
57 | }
58 | catch (XdbModelConflictException ex)
59 | {
60 | Console.WriteLine(ex.Message);
61 | throw;
62 | }
63 |
64 | return new XConnectClient(config);
65 | }
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/custom-images/src/App.XConnect.Demo/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("App.XConnect.Demo")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("App.XConnect.Demo")]
13 | [assembly: AssemblyCopyright("Copyright © 2020")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("2ff4ecd0-c43f-4be2-a261-c386effd335e")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/custom-images/src/App.XConnect.ModelBuilder/App.XConnect.ModelBuilder.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {C6144D27-3F34-4761-B040-CB9E8C56955E}
8 | Exe
9 | App.XConnect.ModelBuilder
10 | App.XConnect.ModelBuilder
11 | v4.8
12 | 512
13 | true
14 | true
15 | publish\
16 | true
17 | Disk
18 | false
19 | Foreground
20 | 7
21 | Days
22 | false
23 | false
24 | true
25 | 0
26 | 1.0.0.%2a
27 | false
28 | false
29 | true
30 |
31 |
32 | AnyCPU
33 | true
34 | full
35 | false
36 | bin\Debug\
37 | DEBUG;TRACE
38 | prompt
39 | 4
40 |
41 |
42 | AnyCPU
43 | pdbonly
44 | true
45 | bin\Release\
46 | TRACE
47 | prompt
48 | 4
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 | False
73 | Microsoft .NET Framework 4.8 %28x86 and x64%29
74 | true
75 |
76 |
77 | False
78 | .NET Framework 3.5 SP1
79 | false
80 |
81 |
82 |
83 |
84 | {16dc2062-e853-44bb-a006-bc1f4cd5bbcf}
85 | DockerExamples.XConnect.Model
86 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/custom-images/src/App.XConnect.ModelBuilder/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/custom-images/src/App.XConnect.ModelBuilder/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using DockerExamples.XConnect.Model;
4 | using Sitecore.XConnect.Schema;
5 |
6 | namespace App.XConnect.ModelBuilder
7 | {
8 | class Program
9 | {
10 | static void Main(string[] args)
11 | {
12 | var path = GetOutputPath(args);
13 |
14 | // Call SerializeModel for each custom model here
15 | SerializeModel(path, DemoModel.Model);
16 | }
17 |
18 | private static string GetOutputPath(string[] args)
19 | {
20 | return args.Length > 0 ? Directory.CreateDirectory(args[0]).FullName : Directory.GetCurrentDirectory();
21 | }
22 |
23 | private static void SerializeModel(string path, XdbModel model)
24 | {
25 | var fileName = model + ".json";
26 | var filePath = Path.Combine(path, fileName);
27 | var json = Sitecore.XConnect.Serialization.XdbModelWriter.Serialize(model);
28 | File.WriteAllText(filePath, json);
29 | Console.WriteLine($"Serialized Xdb model {filePath}");
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/custom-images/src/App.XConnect.ModelBuilder/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("DockerExamples.XConnect.ModelBuilderApp")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("DockerExamples.XConnect.ModelBuilderApp")]
13 | [assembly: AssemblyCopyright("Copyright © 2020")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("c6144d27-3f34-4761-b040-cb9e8c56955e")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/custom-images/src/DockerExamples.Website/App_Config/Include/DockerExamples.XConnect.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | DockerExamples.XConnect.Model.DemoModel, DockerExamples.XConnect.Model
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/custom-images/src/DockerExamples.Website/DockerExamples.Website.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 |
7 |
8 | 2.0
9 | {B062D0AC-C7AB-448A-AB55-0791E7AC974A}
10 | {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
11 | Library
12 | Properties
13 | DockerExamples.Website
14 | DockerExamples.Website
15 | v4.8
16 | true
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 | true
28 | full
29 | false
30 | bin\
31 | DEBUG;TRACE
32 | prompt
33 | 4
34 |
35 |
36 | true
37 | pdbonly
38 | true
39 | bin\
40 | TRACE
41 | prompt
42 | 4
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 | {16dc2062-e853-44bb-a006-bc1f4cd5bbcf}
63 | DockerExamples.XConnect.Model
64 |
65 |
66 |
67 |
68 | runtime; build; native; contentfiles; analyzers; buildtransitive
69 | all
70 |
71 |
72 | runtime; build; native; contentfiles; analyzers; buildtransitive
73 | all
74 |
75 |
76 |
77 | 10.0
78 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 | True
88 | True
89 | 62762
90 | /
91 | http://localhost:62762/
92 | False
93 | False
94 |
95 |
96 | False
97 |
98 |
99 |
100 |
101 |
108 |
--------------------------------------------------------------------------------
/custom-images/src/DockerExamples.Website/DockerExamples.Website.wpp.targets:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/custom-images/src/DockerExamples.Website/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Website")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Website")]
13 | [assembly: AssemblyCopyright("Copyright © 2020")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("b062d0ac-c7ab-448a-ab55-0791e7ac974a")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Revision and Build Numbers
33 | // by using the '*' as shown below:
34 | [assembly: AssemblyVersion("1.0.0.0")]
35 | [assembly: AssemblyFileVersion("1.0.0.0")]
36 |
--------------------------------------------------------------------------------
/custom-images/src/DockerExamples.Website/Properties/PublishProfiles/DockerDeploy.pubxml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 | False
8 | False
9 | False
10 | Debug
11 | Any CPU
12 | FileSystem
13 | ..\..\docker\deploy\website
14 | FileSystem
15 |
16 |
--------------------------------------------------------------------------------
/custom-images/src/DockerExamples.Website/Web.config.xdt:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/custom-images/src/DockerExamples.Website/images/docker-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sitecore/docker-examples/1d37cabcf9bf6393773ef29102af3896bdd3a86c/custom-images/src/DockerExamples.Website/images/docker-logo.png
--------------------------------------------------------------------------------
/custom-images/src/DockerExamples.Website/layouts/Sample Inner Sublayout.ascx:
--------------------------------------------------------------------------------
1 | <%@ Control Language="c#" AutoEventWireup="true" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
2 |
--------------------------------------------------------------------------------
/custom-images/src/DockerExamples.XConnect.Model/DemoFacet.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Sitecore.XConnect;
3 |
4 | namespace DockerExamples.XConnect.Model
5 | {
6 | [Serializable]
7 | [FacetKey(DefaultFacetKey)]
8 | public class DemoFacet : Sitecore.XConnect.Facet
9 | {
10 | public const string DefaultFacetKey = "DemoFacet";
11 |
12 | public string FavoriteAnimal { get; set; }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/custom-images/src/DockerExamples.XConnect.Model/DemoModel.cs:
--------------------------------------------------------------------------------
1 | using Sitecore.XConnect;
2 | using Sitecore.XConnect.Schema;
3 |
4 | namespace DockerExamples.XConnect.Model
5 | {
6 | public class DemoModel
7 | {
8 | public static XdbModel Model { get; } = BuildModel();
9 |
10 | private static XdbModel BuildModel()
11 | {
12 | var builder = new XdbModelBuilder(typeof(DemoModel).FullName, new XdbModelVersion(1, 0));
13 |
14 | builder.ReferenceModel(Sitecore.XConnect.Collection.Model.CollectionModel.Model);
15 | builder.DefineFacet(DemoFacet.DefaultFacetKey);
16 |
17 | return builder.BuildModel();
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/custom-images/src/DockerExamples.XConnect.Model/DockerExamples.XConnect.Model.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 |
7 |
8 | 2.0
9 | {16DC2062-E853-44BB-A006-BC1F4CD5BBCF}
10 | {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
11 | Library
12 | Properties
13 | DockerExamples.XConnect.Model
14 | DockerExamples.XConnect.Model
15 | v4.8
16 | true
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 | true
28 | full
29 | false
30 | bin\
31 | DEBUG;TRACE
32 | prompt
33 | 4
34 |
35 |
36 | true
37 | pdbonly
38 | true
39 | bin\
40 | TRACE
41 | prompt
42 | 4
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 | runtime; build; native; contentfiles; analyzers; buildtransitive
51 | all
52 |
53 |
54 | runtime; build; native; contentfiles; analyzers; buildtransitive
55 | all
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 | 10.0
73 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 | True
83 | True
84 | 52239
85 | /
86 | http://localhost:52239/
87 | False
88 | False
89 |
90 |
91 | False
92 |
93 |
94 |
95 |
96 |
103 |
--------------------------------------------------------------------------------
/custom-images/src/DockerExamples.XConnect.Model/DockerExamples.XConnect.Model.wpp.targets:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/custom-images/src/DockerExamples.XConnect.Model/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("DockerExamples.XConnectExtensions")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("DockerExamples.XConnectExtensions")]
13 | [assembly: AssemblyCopyright("Copyright © 2020")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("16dc2062-e853-44bb-a006-bc1f4cd5bbcf")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Revision and Build Numbers
33 | // by using the '*' as shown below:
34 | [assembly: AssemblyVersion("1.0.0.0")]
35 | [assembly: AssemblyFileVersion("1.0.0.0")]
36 |
--------------------------------------------------------------------------------
/custom-images/src/DockerExamples.XConnect.Model/Web.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
17 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/custom-images/src/DockerExamples.XConnect/App_Data/Config/Sitecore/MarketingAutomation/sc.DockerExamples.DemoModel.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | DockerExamples.XConnect.Model.DemoModel, DockerExamples.XConnect.Model
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/custom-images/src/DockerExamples.XConnect/App_Data/Models/DockerExamples.XConnect.Model.DemoModel, 1.0.json:
--------------------------------------------------------------------------------
1 | {
2 | "Name": "DockerExamples.XConnect.Model.DemoModel",
3 | "Version": "1.0",
4 | "References": [
5 | {
6 | "Name": "XConnect",
7 | "Version": "1.0"
8 | },
9 | {
10 | "Name": "Sitecore.XConnect.Collection.Model",
11 | "Version": "10.3"
12 | }
13 | ],
14 | "Types": {
15 | "DockerExamples.XConnect.Model.DemoFacet": {
16 | "Type": "Facet",
17 | "BaseType": "Sitecore.XConnect.Facet",
18 | "ClrType": "DockerExamples.XConnect.Model.DemoFacet, DockerExamples.XConnect.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null",
19 | "Properties": {
20 | "FavoriteAnimal": {
21 | "Type": "String"
22 | }
23 | }
24 | }
25 | },
26 | "Facets": [
27 | {
28 | "Target": "Contact",
29 | "Name": "DemoFacet",
30 | "Type": "DockerExamples.XConnect.Model.DemoFacet"
31 | }
32 | ]
33 | }
--------------------------------------------------------------------------------
/custom-images/src/DockerExamples.XConnect/DockerExamples.XConnect.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 |
7 |
8 | 2.0
9 | {5A9AB6CC-9800-4725-9967-16A58123D394}
10 | {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
11 | Library
12 | Properties
13 | DockerExamples.XConnect
14 | DockerExamples.XConnect
15 | v4.8
16 | true
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 | true
28 | full
29 | false
30 | bin\
31 | DEBUG;TRACE
32 | prompt
33 | 4
34 |
35 |
36 | true
37 | pdbonly
38 | true
39 | bin\
40 | TRACE
41 | prompt
42 | 4
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | {16dc2062-e853-44bb-a006-bc1f4cd5bbcf}
59 | DockerExamples.XConnect.Model
60 |
61 |
62 |
63 |
64 | runtime; build; native; contentfiles; analyzers; buildtransitive
65 | all
66 |
67 |
68 |
69 | 10.0
70 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 | True
80 | True
81 | 56307
82 | /
83 | http://localhost:56307/
84 | False
85 | False
86 |
87 |
88 | False
89 |
90 |
91 |
92 |
93 |
100 |
--------------------------------------------------------------------------------
/custom-images/src/DockerExamples.XConnect/DockerExamples.XConnect.wpp.targets:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/custom-images/src/DockerExamples.XConnect/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("DockerExamples.XConnect")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("DockerExamples.XConnect")]
13 | [assembly: AssemblyCopyright("Copyright © 2020")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("5a9ab6cc-9800-4725-9967-16a58123d394")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Revision and Build Numbers
33 | // by using the '*' as shown below:
34 | [assembly: AssemblyVersion("1.0.0.0")]
35 | [assembly: AssemblyFileVersion("1.0.0.0")]
36 |
--------------------------------------------------------------------------------
/custom-images/src/DockerExamples.XConnect/Properties/PublishProfiles/DockerDeploy.pubxml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 | False
8 | False
9 | False
10 | Debug
11 | Any CPU
12 | FileSystem
13 | ..\..\docker\deploy\xconnect
14 | FileSystem
15 |
16 |
--------------------------------------------------------------------------------
/getting-started/.env:
--------------------------------------------------------------------------------
1 | COMPOSE_PROJECT_NAME=sitecore-xp0
2 | SITECORE_DOCKER_REGISTRY=scr.sitecore.com/sxp/
3 | SITECORE_VERSION=10.3-ltsc2022
4 | SITECORE_ADMIN_PASSWORD=
5 | SQL_SA_PASSWORD=
6 | TELERIK_ENCRYPTION_KEY=
7 | SITECORE_IDSECRET=
8 | SITECORE_ID_CERTIFICATE=
9 | SITECORE_ID_CERTIFICATE_PASSWORD=
10 | SITECORE_LICENSE=
11 | CM_HOST=xp0cm.localhost
12 | ID_HOST=xp0id.localhost
13 | TRAEFIK_IMAGE=traefik:v2.2.0-windowsservercore-1809
14 | TRAEFIK_ISOLATION=hyperv
15 | ISOLATION=default
16 | SOLR_CORE_PREFIX_NAME=sitecore
17 | # You should change the shared secret to a random string and not use the default value
18 | MEDIA_REQUEST_PROTECTION_SHARED_SECRET=HQ(NjM(u6_5koVla-cTf4ta8x1h6Sb+ZcUQrULUz-0Afpx0cx-NuMtIoQkpDFmX5
19 |
20 | SOLR_PORT=8984
21 | HTTPS_PORT=443
22 | TRAEFIK_MANAGEMENT_PORT=8079
23 | MSSQL_PORT=14330
24 | XCONNECT_PORT=8081
25 |
26 | SQL_SERVER=mssql
27 | SQL_SA_LOGIN=sa
28 | SQL_CUSTOM_DATABASE_PREFIX_UPDATE_FROM=
29 | SQL_DATABASE_PREFIX=Sitecore
30 |
31 | SITECORE_GRAPHQL_UPLOADMEDIAOPTIONS_ENCRYPTIONKEY=432A462D4A614E64
32 | SITECORE_GRAPHQL_ENABLED=false
33 | SITECORE_GRAPHQL_EXPOSEPLAYGROUND=false
34 |
35 | LOG_LEVEL_VALUE=INFO
36 | EXTERNAL_IMAGE_TAG_SUFFIX=ltsc2022
--------------------------------------------------------------------------------
/getting-started/.gitignore:
--------------------------------------------------------------------------------
1 | /mssql-data/*
2 | !/mssql-data/.gitkeep
3 | /solr-data/*
4 | !/solr-data/.gitkeep
5 |
6 | /traefik/certs/*
7 | !/traefik/certs/.gitkeep
--------------------------------------------------------------------------------
/getting-started/clean.ps1:
--------------------------------------------------------------------------------
1 | # Clean data folders
2 | Get-ChildItem -Path (Join-Path $PSScriptRoot "\mssql-data") -Exclude ".gitkeep" -Recurse | Remove-Item -Force -Recurse -Verbose
3 | Get-ChildItem -Path (Join-Path $PSScriptRoot "\solr-data") -Exclude ".gitkeep" -Recurse | Remove-Item -Force -Recurse -Verbose
--------------------------------------------------------------------------------
/getting-started/device-detection-data/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sitecore/docker-examples/1d37cabcf9bf6393773ef29102af3896bdd3a86c/getting-started/device-detection-data/.gitkeep
--------------------------------------------------------------------------------
/getting-started/docker-compose.yml:
--------------------------------------------------------------------------------
1 | services:
2 | traefik:
3 | isolation: ${TRAEFIK_ISOLATION}
4 | image: ${TRAEFIK_IMAGE}
5 | command:
6 | - "--ping"
7 | - "--api.insecure=true"
8 | - "--providers.docker.endpoint=npipe:////./pipe/docker_engine"
9 | - "--providers.docker.exposedByDefault=false"
10 | - "--providers.file.directory=C:/etc/traefik/config/dynamic"
11 | - "--entryPoints.websecure.address=:443"
12 | - "--entryPoints.websecure.forwardedHeaders.insecure"
13 | ports:
14 | - "${HTTPS_PORT}:443"
15 | - "${TRAEFIK_MANAGEMENT_PORT}:8080"
16 | healthcheck:
17 | test: ["CMD", "traefik", "healthcheck", "--ping"]
18 | volumes:
19 | - source: \\.\pipe\docker_engine\
20 | target: \\.\pipe\docker_engine\
21 | type: npipe
22 | - ./traefik:C:/etc/traefik
23 | depends_on:
24 | id:
25 | condition: service_healthy
26 | cm:
27 | condition: service_healthy
28 | mssql:
29 | isolation: ${ISOLATION}
30 | image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2017-${EXTERNAL_IMAGE_TAG_SUFFIX}
31 | environment:
32 | SA_PASSWORD: ${SQL_SA_PASSWORD}
33 | ACCEPT_EULA: "Y"
34 | ports:
35 | - "${MSSQL_PORT}:1433"
36 | volumes:
37 | - type: bind
38 | source: .\mssql-data
39 | target: c:\data
40 | mssql-init:
41 | isolation: ${ISOLATION}
42 | image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-mssql-init:${SITECORE_VERSION}
43 | environment:
44 | SQL_SERVER: ${SQL_SERVER}
45 | SQL_ADMIN_LOGIN: ${SQL_SA_LOGIN}
46 | SQL_ADMIN_PASSWORD: ${SQL_SA_PASSWORD}
47 | SQL_DATABASE_PREFIX: ${SQL_DATABASE_PREFIX}
48 | SQL_CUSTOM_DATABASE_PREFIX_UPDATE_FROM: ${SQL_CUSTOM_DATABASE_PREFIX_UPDATE_FROM}
49 | SITECORE_ADMIN_PASSWORD: ${SITECORE_ADMIN_PASSWORD}
50 | POST_DEPLOYMENT_WAIT_PERIOD: 300
51 | healthcheck:
52 | test:
53 | [
54 | "CMD",
55 | "powershell",
56 | "-command",
57 | "if ([System.Environment]::GetEnvironmentVariable('DatabasesDeploymentStatus', 'Machine') -eq 'Complete') { exit 0 } else { exit 1}",
58 | ]
59 | start_period: 300s
60 | interval: 5s
61 | depends_on:
62 | mssql:
63 | condition: service_healthy
64 | solr:
65 | isolation: ${ISOLATION}
66 | image: ${SITECORE_DOCKER_REGISTRY}nonproduction/solr:8.11.2-${EXTERNAL_IMAGE_TAG_SUFFIX}
67 | ports:
68 | - "${SOLR_PORT}:8983"
69 | volumes:
70 | - type: bind
71 | source: .\solr-data
72 | target: c:\data
73 | environment:
74 | SOLR_MODE: solrcloud
75 | SOLR_JAVA_MEM: "-Xms2g -Xmx2g"
76 | healthcheck:
77 | test:
78 | [
79 | "CMD",
80 | "powershell",
81 | "-command",
82 | "try { $$statusCode = (iwr http://solr:8983/solr/admin/cores?action=STATUS -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }",
83 | ]
84 | solr-init:
85 | isolation: ${ISOLATION}
86 | image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-solr-init:${SITECORE_VERSION}
87 | environment:
88 | SITECORE_SOLR_CONNECTION_STRING: http://solr:8983/solr
89 | SOLR_CORE_PREFIX_NAME: ${SOLR_CORE_PREFIX_NAME}
90 | depends_on:
91 | solr:
92 | condition: service_healthy
93 | id:
94 | isolation: ${ISOLATION}
95 | image: ${SITECORE_DOCKER_REGISTRY}sitecore-id7:${SITECORE_VERSION}
96 | environment:
97 | Sitecore_Sitecore__IdentityServer__SitecoreMemberShipOptions__ConnectionString: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
98 | Sitecore_Sitecore__IdentityServer__AccountOptions__PasswordRecoveryUrl: https://${CM_HOST}/sitecore/login?rc=1
99 | Sitecore_Sitecore__IdentityServer__Clients__PasswordClient__ClientSecrets__ClientSecret1: ${SITECORE_IDSECRET}
100 | Sitecore_Sitecore__IdentityServer__Clients__DefaultClient__AllowedCorsOrigins__AllowedCorsOriginsGroup1: https://${CM_HOST}
101 | Sitecore_Sitecore__IdentityServer__CertificateRawData: ${SITECORE_ID_CERTIFICATE}
102 | Sitecore_Sitecore__IdentityServer__PublicOrigin: https://${ID_HOST}
103 | Sitecore_Sitecore__IdentityServer__CertificateRawDataPassword: ${SITECORE_ID_CERTIFICATE_PASSWORD}
104 | Sitecore_License: ${SITECORE_LICENSE}
105 | healthcheck:
106 | test: ["CMD", "pwsh", "-command", "C:/Healthchecks/Healthcheck.ps1"]
107 | timeout: 300s
108 | depends_on:
109 | mssql-init:
110 | condition: service_healthy
111 | labels:
112 | - "traefik.enable=true"
113 | - "traefik.http.routers.id-secure.entrypoints=websecure"
114 | - "traefik.http.routers.id-secure.rule=Host(`${ID_HOST}`)"
115 | - "traefik.http.routers.id-secure.tls=true"
116 | cm:
117 | isolation: ${ISOLATION}
118 | image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-cm:${SITECORE_VERSION}
119 | depends_on:
120 | id:
121 | condition: service_started
122 | xconnect:
123 | condition: service_started
124 | environment:
125 | Sitecore_ConnectionStrings_Core: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
126 | Sitecore_ConnectionStrings_Security: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
127 | Sitecore_ConnectionStrings_Master: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
128 | Sitecore_ConnectionStrings_Web: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Web;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
129 | Sitecore_ConnectionStrings_Messaging: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Messaging;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
130 | Sitecore_ConnectionStrings_Xdb.Processing.Pools: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Processing.pools;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
131 | Sitecore_ConnectionStrings_Xdb.Referencedata: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Referencedata;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
132 | Sitecore_ConnectionStrings_Xdb.Processing.Tasks: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Processing.tasks;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
133 | Sitecore_ConnectionStrings_ExperienceForms: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.ExperienceForms;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
134 | Sitecore_ConnectionStrings_Exm.Master: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Exm.master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
135 | Sitecore_ConnectionStrings_Reporting: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Reporting;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
136 | Sitecore_ConnectionStrings_Sitecore.Reporting.Client: http://xconnect
137 | Sitecore_ConnectionStrings_Cortex.Processing.Engine: http://xconnect
138 | Sitecore_ConnectionStrings_Solr.Search: http://solr:8983/solr;solrCloud=true
139 | Sitecore_ConnectionStrings_SitecoreIdentity.Secret: ${SITECORE_IDSECRET}
140 | Sitecore_ConnectionStrings_XConnect.Collection: http://xconnect
141 | Sitecore_ConnectionStrings_Xdb.MarketingAutomation.Operations.Client: http://xconnect
142 | Sitecore_ConnectionStrings_Xdb.MarketingAutomation.Reporting.Client: http://xconnect
143 | Sitecore_ConnectionStrings_Xdb.ReferenceData.Client: http://xconnect
144 | Sitecore_License: ${SITECORE_LICENSE}
145 | Sitecore_GraphQL_Enabled: ${SITECORE_GRAPHQL_ENABLED}
146 | Sitecore_GraphQL_ExposePlayground: ${SITECORE_GRAPHQL_EXPOSEPLAYGROUND}
147 | Sitecore_GraphQL_UploadMediaOptions_EncryptionKey: ${SITECORE_GRAPHQL_UPLOADMEDIAOPTIONS_ENCRYPTIONKEY}
148 | Sitecore_Identity_Server_Authority: https://${ID_HOST}
149 | Sitecore_Identity_Server_InternalAuthority: http://id
150 | Sitecore_Identity_Server_CallbackAuthority: https://${CM_HOST}
151 | Sitecore_Identity_Server_Require_Https: "false"
152 | Sitecore_Analytics_Forwarded_Request_Http_Header: X-Forwarded-For
153 | SOLR_CORE_PREFIX_NAME: ${SOLR_CORE_PREFIX_NAME}
154 | MEDIA_REQUEST_PROTECTION_SHARED_SECRET: ${MEDIA_REQUEST_PROTECTION_SHARED_SECRET}
155 | LOG_LEVEL_VALUE: ${LOG_LEVEL_VALUE}
156 | healthcheck:
157 | test: ["CMD", "powershell", "-command", "C:/Healthchecks/Healthcheck.ps1"]
158 | timeout: 300s
159 | labels:
160 | - "traefik.enable=true"
161 | - "traefik.http.middlewares.force-STS-Header.headers.forceSTSHeader=true"
162 | - "traefik.http.middlewares.force-STS-Header.headers.stsSeconds=31536000"
163 | - "traefik.http.routers.cm-secure.entrypoints=websecure"
164 | - "traefik.http.routers.cm-secure.rule=Host(`${CM_HOST}`)"
165 | - "traefik.http.routers.cm-secure.tls=true"
166 | - "traefik.http.routers.cm-secure.middlewares=force-STS-Header"
167 | volumes:
168 | - type: bind
169 | source: .\device-detection-data
170 | target: C:\inetpub\wwwroot\App_Data\DeviceDetection
171 | xconnect:
172 | isolation: ${ISOLATION}
173 | image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-xconnect:${SITECORE_VERSION}
174 | ports:
175 | - "${XCONNECT_PORT}:80"
176 | depends_on:
177 | mssql-init:
178 | condition: service_healthy
179 | solr-init:
180 | condition: service_started
181 | environment:
182 | Sitecore_License: ${SITECORE_LICENSE}
183 | Sitecore_ConnectionStrings_Messaging: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Messaging;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
184 | Sitecore_ConnectionStrings_Processing.Engine.Storage: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Processing.Engine.Storage;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
185 | Sitecore_ConnectionStrings_Processing.Engine.Tasks: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Processing.Engine.Tasks;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
186 | Sitecore_ConnectionStrings_Reporting: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Reporting;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
187 | Sitecore_ConnectionStrings_Xdb.Marketingautomation: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Marketingautomation;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
188 | Sitecore_ConnectionStrings_Xdb.Processing.Pools: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Processing.pools;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
189 | Sitecore_ConnectionStrings_Xdb.Referencedata: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Referencedata;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
190 | Sitecore_ConnectionStrings_Collection: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Xdb.Collection.ShardMapManager;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
191 | Sitecore_ConnectionStrings_SolrCore: http://solr:8983/solr/${SOLR_CORE_PREFIX_NAME}_xdb;solrCloud=true
192 | Sitecore_Sitecore:XConnect:CollectionSearch:Services:Solr.SolrReaderSettings:Options:RequireHttps: "false"
193 | Sitecore_Sitecore:XConnect:CollectionSearch:Services:XConnectSolrHealthCheckServicesConfiguration:Options:RequireHttps: "false"
194 | Sitecore_Sitecore:XConnect:SearchIndexer:Services:Solr.SolrReaderSettings:Options:RequireHttps: "false"
195 | Sitecore_Sitecore:XConnect:SearchIndexer:Services:Solr.SolrWriterSettings:Options:RequireHttps: "false"
196 | healthcheck:
197 | test: ["CMD", "powershell", "-command", "C:/Healthchecks/Healthcheck.ps1"]
198 | timeout: 300s
199 | xdbsearchworker:
200 | isolation: ${ISOLATION}
201 | image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-xdbsearchworker:${SITECORE_VERSION}
202 | depends_on:
203 | xconnect:
204 | condition: service_healthy
205 | restart: unless-stopped
206 | environment:
207 | Sitecore_ConnectionStrings_Collection: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Xdb.Collection.ShardMapManager;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
208 | Sitecore_ConnectionStrings_SolrCore: http://solr:8983/solr/${SOLR_CORE_PREFIX_NAME}_xdb;solrCloud=true
209 | Sitecore_License: ${SITECORE_LICENSE}
210 | Sitecore_Sitecore:XConnect:SearchIndexer:Services:Solr.SolrReaderSettings:Options:RequireHttps: "false"
211 | Sitecore_Sitecore:XConnect:SearchIndexer:Services:Solr.SolrWriterSettings:Options:RequireHttps: "false"
212 | Sitecore_Sitecore:XConnect:CollectionSearch:Services:XConnectSolrHealthCheckServicesConfiguration:Options:RequireHttps: "false"
213 | healthcheck:
214 | test:
215 | [
216 | "CMD",
217 | "powershell",
218 | "-command",
219 | "C:/Healthchecks/Healthcheck.ps1 -Port 8080",
220 | ]
221 | timeout: 300s
222 | xdbautomationworker:
223 | isolation: ${ISOLATION}
224 | image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-xdbautomationworker:${SITECORE_VERSION}
225 | depends_on:
226 | xconnect:
227 | condition: service_healthy
228 | restart: unless-stopped
229 | environment:
230 | Sitecore_ConnectionStrings_XConnect.Collection: http://xconnect
231 | Sitecore_ConnectionStrings_Xdb.Marketingautomation: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Marketingautomation;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
232 | Sitecore_ConnectionStrings_Xdb.Referencedata: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Referencedata;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
233 | Sitecore_ConnectionStrings_Messaging: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Messaging;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
234 | Sitecore_License: ${SITECORE_LICENSE}
235 | healthcheck:
236 | test:
237 | [
238 | "CMD",
239 | "powershell",
240 | "-command",
241 | "C:/Healthchecks/Healthcheck.ps1 -Port 8080",
242 | ]
243 | timeout: 300s
244 | cortexprocessingworker:
245 | isolation: ${ISOLATION}
246 | image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-cortexprocessingworker:${SITECORE_VERSION}
247 | depends_on:
248 | xconnect:
249 | condition: service_healthy
250 | restart: unless-stopped
251 | environment:
252 | Sitecore_ConnectionStrings_Processing.Engine.Storage: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Processing.Engine.Storage;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
253 | Sitecore_ConnectionStrings_Processing.Engine.Tasks: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Processing.Engine.Tasks;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
254 | Sitecore_ConnectionStrings_XConnect.Collection: http://xconnect
255 | Sitecore_ConnectionStrings_XConnect.Configuration: http://xconnect
256 | Sitecore_ConnectionStrings_XConnect.Search: http://xconnect
257 | Sitecore_ConnectionStrings_Reporting: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Reporting;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
258 | Sitecore_License: ${SITECORE_LICENSE}
259 | healthcheck:
260 | test:
261 | [
262 | "CMD",
263 | "powershell",
264 | "-command",
265 | "C:/Healthchecks/Healthcheck.ps1 -Port 8080",
266 | ]
267 | timeout: 300s
268 |
--------------------------------------------------------------------------------
/getting-started/init.ps1:
--------------------------------------------------------------------------------
1 | [CmdletBinding()]
2 | Param (
3 | [Parameter(Mandatory = $true)]
4 | [string]
5 | [ValidateNotNullOrEmpty()]
6 | $LicenseXmlPath,
7 |
8 | # We do not need to use [SecureString] here since the value will be stored unencrypted in .env,
9 | # and used only for transient local example environment.
10 | [string]
11 | $SitecoreAdminPassword = "Password12345",
12 |
13 | # We do not need to use [SecureString] here since the value will be stored unencrypted in .env,
14 | # and used only for transient local example environment.
15 | [string]
16 | $SqlSaPassword = "Password12345"
17 | )
18 |
19 | $ErrorActionPreference = "Stop";
20 |
21 | if (-not (Test-Path $LicenseXmlPath)) {
22 | throw "Did not find $LicenseXmlPath"
23 | }
24 | if (-not (Test-Path $LicenseXmlPath -PathType Leaf)) {
25 | throw "$LicenseXmlPath is not a file"
26 | }
27 |
28 | # Check for Sitecore Gallery
29 | Import-Module PowerShellGet
30 | $SitecoreGallery = Get-PSRepository | Where-Object { $_.SourceLocation -eq "https://nuget.sitecore.com/resources/v2/" }
31 | if (-not $SitecoreGallery) {
32 | Write-Host "Adding Sitecore PowerShell Gallery..." -ForegroundColor Green
33 | Register-PSRepository -Name SitecoreGallery -SourceLocation https://nuget.sitecore.com/resources/v2/ -InstallationPolicy Trusted
34 | $SitecoreGallery = Get-PSRepository -Name SitecoreGallery
35 | }
36 | # Install and Import SitecoreDockerTools
37 | $dockerToolsVersion = "10.2.7"
38 | Remove-Module SitecoreDockerTools -ErrorAction SilentlyContinue
39 | if (-not (Get-InstalledModule -Name SitecoreDockerTools -RequiredVersion $dockerToolsVersion -ErrorAction SilentlyContinue)) {
40 | Write-Host "Installing SitecoreDockerTools..." -ForegroundColor Green
41 | Install-Module SitecoreDockerTools -RequiredVersion $dockerToolsVersion -Scope CurrentUser -Repository $SitecoreGallery.Name
42 | }
43 | Write-Host "Importing SitecoreDockerTools..." -ForegroundColor Green
44 | Import-Module SitecoreDockerTools -RequiredVersion $dockerToolsVersion
45 | Write-SitecoreDockerWelcome
46 |
47 | ###############################
48 | # Populate the environment file
49 | ###############################
50 |
51 | Write-Host "Populating required .env file variables..." -ForegroundColor Green
52 |
53 | # SITECORE_ADMIN_PASSWORD
54 | Set-EnvFileVariable "SITECORE_ADMIN_PASSWORD" -Value $SitecoreAdminPassword
55 |
56 | # SQL_SA_PASSWORD
57 | Set-EnvFileVariable "SQL_SA_PASSWORD" -Value $SqlSaPassword
58 |
59 | # TELERIK_ENCRYPTION_KEY = random 64-128 chars
60 | Set-EnvFileVariable "TELERIK_ENCRYPTION_KEY" -Value "'$(Get-SitecoreRandomString 128)'"
61 |
62 | # MEDIA_REQUEST_PROTECTION_SHARED_SECRET
63 | Set-EnvFileVariable "MEDIA_REQUEST_PROTECTION_SHARED_SECRET" -Value "'$(Get-SitecoreRandomString 64)'"
64 |
65 | # SITECORE_IDSECRET = random 64 chars
66 | Set-EnvFileVariable "SITECORE_IDSECRET" -Value (Get-SitecoreRandomString 64 -DisallowSpecial)
67 |
68 | # SITECORE_ID_CERTIFICATE
69 | $idCertPassword = Get-SitecoreRandomString 12 -DisallowSpecial
70 | Set-EnvFileVariable "SITECORE_ID_CERTIFICATE" -Value (Get-SitecoreCertificateAsBase64String -DnsName "localhost" -Password (ConvertTo-SecureString -String $idCertPassword -Force -AsPlainText))
71 |
72 | # SITECORE_ID_CERTIFICATE_PASSWORD
73 | Set-EnvFileVariable "SITECORE_ID_CERTIFICATE_PASSWORD" -Value $idCertPassword
74 |
75 | # SITECORE_LICENSE
76 | Set-EnvFileVariable "SITECORE_LICENSE" -Value (ConvertTo-CompressedBase64String -Path $LicenseXmlPath)
77 |
78 | ##################################
79 | # Configure TLS/HTTPS certificates
80 | ##################################
81 |
82 | Push-Location traefik\certs
83 | try {
84 | $mkcert = ".\mkcert.exe"
85 | if ($null -ne (Get-Command mkcert.exe -ErrorAction SilentlyContinue)) {
86 | # mkcert installed in PATH
87 | $mkcert = "mkcert"
88 | } elseif (-not (Test-Path $mkcert)) {
89 | Write-Host "Downloading and installing mkcert certificate tool..." -ForegroundColor Green
90 | Invoke-WebRequest "https://github.com/FiloSottile/mkcert/releases/download/v1.4.1/mkcert-v1.4.1-windows-amd64.exe" -UseBasicParsing -OutFile mkcert.exe
91 | if ((Get-FileHash mkcert.exe).Hash -ne "1BE92F598145F61CA67DD9F5C687DFEC17953548D013715FF54067B34D7C3246") {
92 | Remove-Item mkcert.exe -Force
93 | throw "Invalid mkcert.exe file"
94 | }
95 | }
96 | Write-Host "Generating Traefik TLS certificates..." -ForegroundColor Green
97 | & $mkcert -install
98 | & $mkcert -cert-file xp0cm.localhost.crt -key-file xp0cm.localhost.key "xp0cm.localhost"
99 | & $mkcert -cert-file xp0id.localhost.crt -key-file xp0id.localhost.key "xp0id.localhost"
100 | }
101 | catch {
102 | Write-Host "An error occurred while attempting to generate TLS certificates: $_" -ForegroundColor Red
103 | }
104 | finally {
105 | Pop-Location
106 | }
107 |
108 | ################################
109 | # Add Windows hosts file entries
110 | ################################
111 |
112 | Write-Host "Adding Windows hosts file entries..." -ForegroundColor Green
113 |
114 | Add-HostsEntry "xp0cm.localhost"
115 | Add-HostsEntry "xp0id.localhost"
116 |
117 | Write-Host "Done!" -ForegroundColor Green
118 |
--------------------------------------------------------------------------------
/getting-started/mssql-data/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sitecore/docker-examples/1d37cabcf9bf6393773ef29102af3896bdd3a86c/getting-started/mssql-data/.gitkeep
--------------------------------------------------------------------------------
/getting-started/solr-data/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sitecore/docker-examples/1d37cabcf9bf6393773ef29102af3896bdd3a86c/getting-started/solr-data/.gitkeep
--------------------------------------------------------------------------------
/getting-started/traefik/certs/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Sitecore/docker-examples/1d37cabcf9bf6393773ef29102af3896bdd3a86c/getting-started/traefik/certs/.gitkeep
--------------------------------------------------------------------------------
/getting-started/traefik/config/dynamic/certs_config.yaml:
--------------------------------------------------------------------------------
1 | tls:
2 | certificates:
3 | - certFile: C:\etc\traefik\certs\xp0cm.localhost.crt
4 | keyFile: C:\etc\traefik\certs\xp0cm.localhost.key
5 | - certFile: C:\etc\traefik\certs\xp0id.localhost.crt
6 | keyFile: C:\etc\traefik\certs\xp0id.localhost.key
--------------------------------------------------------------------------------