-
Notifications
You must be signed in to change notification settings - Fork 74
/
Copy pathdocker-compose.override.yml
253 lines (242 loc) · 13.3 KB
/
docker-compose.override.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
#
# The docker-compose.yml in this solution is a stock Sitecore XM1 environment, without CD.
# This override represents all the additions/changes needed for this solution.
# Note that some of the overrides point to 'empty' Dockerfiles. This is recommended, even if
# you are not customizing an image, to enable retagging and later customization. See Sitecore
# Containers documentation for details.
#
services:
# A Windows-based nodejs base image
nodejs:
# DEMO TEAM CUSTOMIZATION - demo subfolder, custom tag
image: ${REGISTRY}demo/${COMPOSE_PROJECT_NAME}-nodejs:${SITECORE_VERSION}-${NANOSERVER_VERSION}-${DEMO_VERSION}
build:
context: ./docker/build/nodejs
args:
PARENT_IMAGE: mcr.microsoft.com/windows/nanoserver:${NANOSERVER_VERSION}
NODEJS_VERSION: ${NODEJS_VERSION}
deploy:
replicas: 0
# The solution build image is added here so it can be referenced as a build dependency
# for the images which use its output. Setting "replicas: 0" means Docker compose will not
# include it in the running environment. See Dockerfile for more details.
solution:
# DEMO TEAM CUSTOMIZATION - demo subfolder, custom tag
image: ${REGISTRY}demo/${COMPOSE_PROJECT_NAME}-solution:${SITECORE_VERSION}-${NANOSERVER_VERSION}-${DEMO_VERSION}
build:
context: ./
args:
BUILD_CONFIGURATION: ${BUILD_CONFIGURATION}
# DEMO TEAM CUSTOMIZATION - to prevent TLS issues we implemented the solution described here: https://sitecore.stackexchange.com/a/29558/171
BUILD_IMAGE: mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-${WINDOWSSERVERCORE_VERSION}
deploy:
replicas: 0
rendering:
# DEMO TEAM CUSTOMIZATION - demo subfolder, custom tag
image: ${REGISTRY}demo/${COMPOSE_PROJECT_NAME}-rendering:${SITECORE_VERSION}-${NANOSERVER_VERSION}-${DEMO_VERSION}
build:
context: ./docker/build/rendering
target: ${BUILD_CONFIGURATION}
args:
# DEMO TEAM CUSTOMIZATION - demo subfolder, custom tag
PARENT_IMAGE: ${REGISTRY}demo/${COMPOSE_PROJECT_NAME}-nodejs:${SITECORE_VERSION}-${NANOSERVER_VERSION}-${DEMO_VERSION}
# DEMO TEAM CUSTOMIZATION - More RAM
mem_limit: 2GB
# DEMO TEAM CUSTOMIZATION - Add port mapping to allow opening a ngrok tunnel to the rendering host
ports:
- "8099:3000"
volumes:
- .\Website\src\rendering:C:\app
environment:
SITECORE_API_HOST: "http://cm"
NEXTJS_DIST_DIR: ".next-container"
PUBLIC_URL: "https://${RENDERING_HOST}"
JSS_EDITING_SECRET: ${JSS_EDITING_SECRET}
# DEMO TEAM CUSTOMIZATION - Custom integrations
NEXT_PUBLIC_CDP_CLIENT_KEY: ${CDP_CLIENT_KEY}
NEXT_PUBLIC_CDP_API_TARGET_ENDPOINT: ${CDP_API_TARGET_ENDPOINT}/v1.2
CDP_API_TOKEN: ${CDP_API_TOKEN}
CDP_AUTHENTICATED_API_TARGET_ENDPOINT: ${CDP_API_TARGET_ENDPOINT}/v2
NEXT_PUBLIC_DISCOVER_CUSTOMER_KEY: ${DISCOVER_CUSTOMER_KEY}
NEXT_PUBLIC_DISCOVER_API_KEY: ${DISCOVER_API_KEY}
NEXT_PUBLIC_ORDERCLOUD_BUYER_CLIENT_ID: ${ORDERCLOUD_BUYER_CLIENT_ID}
NEXT_PUBLIC_ORDERCLOUD_BASE_API_URL: ${ORDERCLOUD_BASE_API_URL}
NEXT_PUBLIC_ORDERCLOUD_OPENID_CONNECT_ID: ${ORDERCLOUD_OPENID_CONNECT_ID}
ORDERCLOUD_MIDDLEWARE_CLIENT_ID: ${ORDERCLOUD_MIDDLEWARE_CLIENT_ID}
ORDERCLOUD_MIDDLEWARE_CLIENT_SECRET: ${ORDERCLOUD_MIDDLEWARE_CLIENT_SECRET}
OC_API_CLIENTS_WITH_ACCESS: ${ORDERCLOUD_MIDDLEWARE_ALLOWED_CLIENTIDS} # Not referenced in our code but used by the catalyst library https://github.com/ordercloud-api/ordercloud-javascript-catalyst#user-verification
OC_WEBHOOK_HASH_KEY: ${ORDERCLOUD_WEBHOOK_HASH_KEY} # Not referenced in our code but used by the catalyst library https://github.com/ordercloud-api/ordercloud-javascript-catalyst/blob/main/README.md#webhook-verification
NEXT_PUBLIC_SEND_WEBSITE_ID : ${SEND_WEBSITE_ID}
# Auth0 - Not referenced in our code but used by the @auth0/nextjs-auth0 library
AUTH0_SECRET: ${AUTH0_SECRET}
AUTH0_BASE_URL: ${AUTH0_BASE_URL}
AUTH0_ISSUER_BASE_URL: ${AUTH0_ISSUER_BASE_URL}
AUTH0_CLIENT_ID: ${AUTH0_CLIENT_ID}
AUTH0_CLIENT_SECRET: ${AUTH0_CLIENT_SECRET}
NEXT_PUBLIC_AUTH0_ENABLED: ${AUTH0_ENABLED}
#DEBUG: ${DEBUG} # Uncomment this line and set the DEBUG environment variable value in the .env file to enable debug logging
depends_on:
- cm
- nodejs
labels:
- "traefik.enable=true"
- "traefik.http.routers.rendering-secure.entrypoints=websecure"
- "traefik.http.routers.rendering-secure.rule=Host(`${RENDERING_HOST}`)"
- "traefik.http.routers.rendering-secure.tls=true"
init:
healthcheck:
test: ["CMD", "powershell", "ps"]
image: ${REGISTRY}demo/${COMPOSE_PROJECT_NAME}-init:${SITECORE_VERSION}-${WINDOWSSERVERCORE_VERSION}-${DEMO_VERSION}
isolation: ${ISOLATION}
build:
context: .\docker\build\init
args:
BUILD_IMAGE: mcr.microsoft.com/dotnet/sdk:3.1-nanoserver-${NANOSERVER_VERSION}
BASE_IMAGE: mcr.microsoft.com/dotnet/sdk:3.1-nanoserver-${NANOSERVER_VERSION}
SOLUTION_IMAGE: ${REGISTRY}demo/${COMPOSE_PROJECT_NAME}-solution:${SITECORE_VERSION}-${NANOSERVER_VERSION}-${DEMO_VERSION}
NODEJS_VERSION: ${NODEJS_VERSION}
environment:
ADMIN_PASSWORD: ${SITECORE_ADMIN_PASSWORD}
ADMIN_USER_NAME: "sitecore\\superuser"
HOST_CM: "http://cm"
HOST_ID: "http://id"
INIT_CONTEXT: Data Source=${SQL_SERVER};Initial Catalog=platform_init_ready;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD}
VERCEL_TOKEN: ${VERCEL_TOKEN}
ID_SERVER_DEMO_CLIENT_SECRET: ${ID_SERVER_DEMO_CLIENT_SECRET}
PUBLIC_HOST_CM: ${PUBLIC_HOST_CM}
PUBLIC_HOST_ID: ${PUBLIC_HOST_ID}
DAM_URL: ${DAM_ContentHub}
depends_on:
mssql:
condition: service_healthy
cm:
condition: service_healthy
solution:
condition: service_started
deploy:
replicas: ${INIT_CONTAINERS_COUNT}
# Mount the Traefik configuration and certs.
traefik:
volumes:
- ./docker/traefik:C:/etc/traefik
# DEMO TEAM CUSTOMIZATION - Custom mssql init
mssql-init:
image: ${REGISTRY}demo/${COMPOSE_PROJECT_NAME}-mssql-init:${SITECORE_VERSION}-${WINDOWSSERVERCORE_VERSION}-${DEMO_VERSION}
build:
context: ./docker/build/mssql-init
args:
PARENT_IMAGE: ${SITECORE_DOCKER_REGISTRY}sxp/sitecore-xm1-mssql-init:${SITECORE_VERSION}-${WINDOWSSERVERCORE_VERSION}
SOLUTION_IMAGE: ${REGISTRY}demo/${COMPOSE_PROJECT_NAME}-solution:${SITECORE_VERSION}-${NANOSERVER_VERSION}-${DEMO_VERSION}
environment:
SQL_SERVER: ${SQL_SERVER}
SQL_ADMIN_LOGIN: ${SQL_SA_LOGIN}
SQL_ADMIN_PASSWORD: ${SQL_SA_PASSWORD}
SITECORE_ADMIN_USERNAME: "sitecore\\superuser"
SITECORE_ADMIN_PASSWORD: ${SITECORE_ADMIN_PASSWORD}
SITECORE_USER_PASSWORD: ${SITECORE_USER_PASSWORD}
POST_DEPLOYMENT_WAIT_PERIOD: 300
healthcheck:
test: ["CMD", "powershell", "-command", "if ([System.Environment]::GetEnvironmentVariable('DatabasesDeploymentStatus', 'Machine') -eq 'Complete') { exit 0 } else { exit 1}"]
start_period: 300s
interval: 5s
depends_on:
mssql:
condition: service_healthy
solution:
condition: service_started
# Mount our Solr data folder and use our retagged Solr image.
# Some modules (like SXA) also require additions to the Solr image.
solr:
volumes:
- type: bind
source: .\docker\data\solr
target: c:\data
# DEMO TEAM CUSTOMIZATION - Mount our Solr data folder and use our retagged Solr image.
# Some modules (like SXA) also require additions to the Solr image.
solr-init:
image: ${REGISTRY}demo/${COMPOSE_PROJECT_NAME}-solr-init:${SITECORE_VERSION}-${WINDOWSSERVERCORE_VERSION}-${DEMO_VERSION}
build:
context: ./docker/build/solr-init
args:
PARENT_IMAGE: ${SITECORE_DOCKER_REGISTRY}sxp/sitecore-xm1-solr-init:${SITECORE_VERSION}-${WINDOWSSERVERCORE_VERSION}
# Use our retagged Identity Server image.
# Configure for a mounted license file instead of using SITECORE_LICENSE.
id:
image: ${REGISTRY}demo/${COMPOSE_PROJECT_NAME}-id:${SITECORE_VERSION}-${WINDOWSSERVERCORE_VERSION}-${DEMO_VERSION}
depends_on:
mssql-init:
condition: service_healthy
build:
context: ./docker/build/id
args:
PARENT_IMAGE: ${SITECORE_DOCKER_REGISTRY}sxp/sitecore-id7:${SITECORE_VERSION}-${WINDOWSSERVERCORE_VERSION}
TOOLS_IMAGE: ${SITECORE_DOCKER_REGISTRY}tools/sitecore-docker-tools-assets:10.3-${SITECORE_ASSET_NANOSERVER_VERSION}
volumes:
- ${HOST_LICENSE_FOLDER}:c:\license
environment:
SITECORE_LICENSE_LOCATION: c:\license\license.xml
ID_SERVER_DEMO_CLIENT_SECRET: ${ID_SERVER_DEMO_CLIENT_SECRET}
Sitecore_Sitecore__IdentityServer__Clients__DefaultClient__AllowedCorsOrigins__AllowedCorsOriginsGroup2: https://${SH_HOST}|http://${SH_HOST}
# Use our custom CM (XM1 CM) image with added modules and solution code.
# Folders are mounted below for code deployment and log output. See Dockerfile for details.
# Configure for a mounted license file instead of using SITECORE_LICENSE.
cm:
# DEMO TEAM CUSTOMIZATION - demo subfolder, custom tag
image: ${REGISTRY}demo/${COMPOSE_PROJECT_NAME}-cm:${SITECORE_VERSION}-${WINDOWSSERVERCORE_VERSION}-${DEMO_VERSION}
build:
context: ./docker/build/cm
args:
PARENT_IMAGE: ${SITECORE_DOCKER_REGISTRY}sxp/sitecore-xm1-cm:${SITECORE_VERSION}-${WINDOWSSERVERCORE_VERSION}
# DEMO TEAM CUSTOMIZATION - demo subfolder, custom tag
SOLUTION_IMAGE: ${REGISTRY}demo/${COMPOSE_PROJECT_NAME}-solution:${SITECORE_VERSION}-${NANOSERVER_VERSION}-${DEMO_VERSION}
TOOLS_IMAGE: ${SITECORE_DOCKER_REGISTRY}tools/sitecore-docker-tools-assets:10.3-${SITECORE_ASSET_NANOSERVER_VERSION}
# DEMO TEAM CUSTOMIZATION - Add modules
MANAGEMENT_SERVICES_IMAGE: ${SITECORE_DOCKER_REGISTRY}sxp/modules/sitecore-management-services-xm1-assets:5.2-${SITECORE_ASSET_NANOSERVER_VERSION}
HEADLESS_SERVICES_IMAGE: ${SITECORE_DOCKER_REGISTRY}sxp/modules/sitecore-headless-services-xm1-assets:22.0-${NANOSERVER_VERSION}
SPE_ASSETS_IMAGE: ${SITECORE_DOCKER_REGISTRY}sxp/modules/sitecore-spe-assets:6.4-${SITECORE_ASSET_NANOSERVER_VERSION}
CONTENTHUB_ASSETS_IMAGE: ${SITECORE_DOCKER_REGISTRY}sxp/modules/sitecore-chub-assets:5.2-${NANOSERVER_VERSION}
EXPERIENCE_EDGE_ASSETS_IMAGE: ${SITECORE_DOCKER_REGISTRY}sxp/modules/sitecore-experience-edge-connector-xm1-assets:22.0-${NANOSERVER_VERSION}
# DEMO TEAM CUSTOMIZATION - Product Hotfixes
DELTA_ASSET_IMAGE: ${SITECORE_DOCKER_REGISTRY}sxp-pre/sitecore-xm1-assets:10.3.1.009332.420-10.0.17763.4377-1809
depends_on:
- solution
volumes:
# DEMO TEAM CUSTOMIZATION - Removed the platform subfolder
- ${LOCAL_DEPLOY_PATH}:C:\deploy
- ${LOCAL_DATA_PATH}\cm:C:\inetpub\wwwroot\App_Data\logs
- ${HOST_LICENSE_FOLDER}:c:\license
environment:
SITECORE_LICENSE_LOCATION: c:\license\license.xml
JSS_EdgeWebsite_DEPLOYMENT_SECRET: ${JSS_EdgeWebsite_DEPLOYMENT_SECRET}
SITECORE_JSS_EDITING_SECRET: ${JSS_EDITING_SECRET}
SITECORE_APPSETTINGS_ROLE:DEFINE: Standalone
## Development Environment Optimizations
SITECORE_DEVELOPMENT_PATCHES: DevEnvOn,CustomErrorsOff,DebugOn,DiagnosticsOff,InitMessagesOff,RobotDetectionOff
Sitecore_AppSettings_exmEnabled:define: "no" # remove to turn on EXM
# DEMO TEAM CUSTOMIZATION - Custom variables to allow override in AKS
RENDERING_HOST_ENDPOINT_URI: "http://rendering:3000/api/editing/render"
RENDERING_HOST_PUBLIC_URI: "https://${RENDERING_HOST}"
# DEMO TEAM CUSTOMIZATION - Custom integrations
Sitecore_ConnectionStrings_CMP.ContentHub: ${CMP_ContentHub}
Sitecore_ConnectionStrings_CMP.ServiceBusEntityPathIn: ${CMP_ServiceBusEntityPathIn}
Sitecore_ConnectionStrings_CMP.ServiceBusSubscription: ${CMP_ServiceBusSubscription}
Sitecore_ConnectionStrings_CMP.ServiceBusEntityPathOut: ${CMP_ServiceBusEntityPathOut}
Sitecore_ConnectionStrings_DAM.ContentHub: ${DAM_ContentHub}
Sitecore_ConnectionStrings_DAM.SearchPage: ${DAM_SearchPage}
Sitecore_ConnectionStrings_DAM.ExternalRedirectKey: ${DAM_ExternalRedirectKey}
## Experience Edge Connector
Sitecore_ConnectionStrings_ExperienceEdge.Authority: "${XE_AUTHORITY}"
Sitecore_ExperienceEdge_CDNUri: "${XE_CDN_URI}"
Sitecore_ExperienceEdge_CDNMediaPrefix: "${XE_CDN_MEDIA_PREFIX}"
Sitecore_ExperienceEdge_DeliveryEndpoint: "${XE_DELIVERY_ENDPOINT}"
Sitecore_ExperienceEdge_SolrCoreName: "${SOLR_CORE_PREFIX_NAME}_master_index"
Sitecore_ExperienceEdge_DeliveryEndpoint_CircuitBreakerAttemptsBeforeBreak: "12"
Sitecore_ExperienceEdge_DeliveryEndpoint_CircuitBreakerDurationOfBreak: "00:15:00"
Sitecore_ExperienceEdge_DeliveryEndpoint_TransientFailureRetryCount: "3"
Sitecore_ExperienceEdge_DeliveryEndpoint_TransientFailureSleepTime: "00:00:10"
Sitecore_ExperienceEdge_EnableItemLanguageFallback: "true"
Sitecore_ExperienceEdge_EnableFieldLanguageFallback: "true"
## Disable Edge Publishing until Edge provisioning is implemented
## Sitecore_ExperienceEdge_PublishingTargetId: "{8E080626-DDC3-4EF4-A1D1-F0BE4A200254}"
Sitecore_ExperienceEdge_PublishingTargetId: ""
entrypoint: powershell.exe -Command "& C:/tools/entrypoints/iis/Development.ps1"