forked from Sitecore/Sitecore.Demo.XmCloud.PlaySummit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.override.yml
186 lines (179 loc) · 9.55 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
services:
# A Windows-based nodejs base image
nodejs:
# DEMO TEAM CUSTOMIZATION - demo subfolder, custom tag
image: ${REGISTRY}demo/${COMPOSE_PROJECT_NAME}-nodejs:${VERSION:-latest}-${DEMO_VERSION}
build:
context: ./docker/build/nodejs
args:
PARENT_IMAGE: ${NODEJS_PARENT_IMAGE}
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:${VERSION:-latest}-${DEMO_VERSION}
build:
context: .
args:
BUILD_CONFIGURATION: ${BUILD_CONFIGURATION}
BUILD_IMAGE: mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2019
deploy:
replicas: 0
rendering:
# DEMO TEAM CUSTOMIZATION - demo subfolder, custom tag
image: ${REGISTRY}demo/${COMPOSE_PROJECT_NAME}-rendering:${VERSION:-latest}-${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:${VERSION:-latest}-${DEMO_VERSION}
# DEMO TEAM CUSTOMIZATION - More RAM
mem_limit: 4GB
# DEMO TEAM CUSTOMIZATION - Add port mapping to allow opening a ngrok tunnel to the rendering host
ports:
- "8099:3000"
volumes:
# DEMO TEAM CUSTOMIZATION - Different mapped folder
- .\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 - Different environment variable name
SITECORE_API_KEY: "${SITECORE_API_KEY_PlayWebsite}"
DISABLE_SSG_FETCH: ${DISABLE_SSG_FETCH}
# DEMO TEAM CUSTOMIZATION - Custom integrations
## Custom CDP/Personalize integration
NEXT_PUBLIC_CUSTOM_CDP_CLIENT_KEY: ${CUSTOM_CDP_CLIENT_KEY}
NEXT_PUBLIC_CUSTOM_CDP_API_TARGET_ENDPOINT: ${CUSTOM_CDP_API_TARGET_ENDPOINT}/v1.2
CUSTOM_CDP_API_TOKEN: ${CUSTOM_CDP_API_TOKEN}
CUSTOM_CDP_AUTHENTICATED_API_TARGET_ENDPOINT: ${CUSTOM_CDP_API_TARGET_ENDPOINT}/v2
## XM Cloud embedded personalization
NEXT_PUBLIC_CDP_TARGET_URL: ${XM_CLOUD_CDP_TARGET_URL}
NEXT_PUBLIC_CDP_CLIENT_KEY: ${XM_CLOUD_CDP_CLIENT_KEY}
NEXT_PUBLIC_CDP_POINTOFSALE: ${XM_CLOUD_CDP_POINTOFSALE}
PERSONALIZE_MIDDLEWARE_CDP_TIMEOUT: ${XM_CLOUD_PERSONALIZE_MIDDLEWARE_CDP_TIMEOUT}
PERSONALIZE_MIDDLEWARE_EDGE_TIMEOUT: ${XM_CLOUD_PERSONALIZE_MIDDLEWARE_EDGE_TIMEOUT}
JSS_APP_NAME: ${XM_CLOUD_JSS_APP_NAME}
## Discover
NEXT_PUBLIC_DISCOVER_CUSTOMER_KEY: ${DISCOVER_CUSTOMER_KEY}
NEXT_PUBLIC_DISCOVER_API_KEY: ${DISCOVER_API_KEY}
## OrderCloud
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
## Send
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}
## Search API
NEXT_PUBLIC_SEARCH_API_DOMAIN: ${SEARCH_API_DOMAIN}
NEXT_PUBLIC_SEARCH_API_HOST: ${SEARCH_API_HOST}
## Search SDK
NEXT_PUBLIC_SEARCH_ENV: ${SEARCH_ENV}
NEXT_PUBLIC_SEARCH_CUSTOMER_KEY: ${SEARCH_CUSTOMER_KEY}
NEXT_PUBLIC_SEARCH_API_KEY: ${SEARCH_API_KEY}
#DEBUG: ${DEBUG} # Uncomment this line and set the DEBUG environment variable value in the .env file to enable debug logging
# END CUSTOMIZATION
depends_on:
- cm
- nodejs
labels:
- "traefik.enable=true"
# DEMO TEAM CUSTOMIZATION - Add CORS headers to fix CORS issues in Experience Editor with Next.js 12.2 and newer
- "traefik.http.middlewares.rendering-headers.headers.forceSTSHeader=true"
- "traefik.http.middlewares.rendering-headers.headers.stsSeconds=31536000"
- "traefik.http.middlewares.rendering-headers.headers.accesscontrolallowmethods=GET,POST,OPTIONS"
- "traefik.http.middlewares.rendering-headers.headers.accesscontrolalloworiginlist=https://${CM_HOST}"
- "traefik.http.routers.rendering-secure.middlewares=rendering-headers"
# END CUSTOMIZATION
- "traefik.http.routers.rendering-secure.entrypoints=websecure"
- "traefik.http.routers.rendering-secure.rule=Host(`${RENDERING_HOST}`)"
- "traefik.http.routers.rendering-secure.tls=true"
# Mount the Traefik configuration and certs.
traefik:
volumes:
- ./docker/traefik:C:/etc/traefik
depends_on:
- rendering
# Mount our SQL data folder and use our custom image with the Headless Services (JSS)
# module data added. See Dockerfile for details.
mssql:
# DEMO TEAM CUSTOMIZATION - More RAM
mem_limit: 2GB
volumes:
- type: bind
source: .\docker\data\sql
target: c:\data
# 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
# Use our custom 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:${VERSION:-latest}-${DEMO_VERSION}
build:
context: ./docker/build/cm
args:
PARENT_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xmcloud-cm:${SITECORE_VERSION}
# DEMO TEAM CUSTOMIZATION - demo subfolder, custom tag
SOLUTION_IMAGE: ${REGISTRY}demo/${COMPOSE_PROJECT_NAME}-solution:${VERSION:-latest}-${DEMO_VERSION}
TOOLS_IMAGE: ${TOOLS_IMAGE}
depends_on:
- solution
volumes:
- ${LOCAL_DEPLOY_PATH}\platform: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
RENDERING_HOST_INTERNAL_URI: "http://rendering:3000"
# DEMO TEAM CUSTOMIZATION - Custom deployment secret environment variable name
JSS_PlayWebsite_DEPLOYMENT_SECRET: ${JSS_DEPLOYMENT_SECRET_PlayWebsite}
SITECORE_JSS_EDITING_SECRET: ${JSS_EDITING_SECRET}
SITECORE_EDITING_HOST_PUBLIC_HOST: "${RENDERING_HOST}"
SITECORE_Pages_Client_Host: ${SITECORE_Pages_Client_Host}
SITECORE_Pages_CORS_Allowed_Origins: ${SITECORE_Pages_CORS_Allowed_Origins}
SITECORE_GRAPHQL_CORS: ${SITECORE_GRAPHQL_CORS}
## Development Environment Optimizations
SITECORE_DEVELOPMENT_PATCHES: DevEnvOn,CustomErrorsOff,DebugOn,DiagnosticsOff,InitMessagesOff
Sitecore_AppSettings_exmEnabled:define: "no" # remove to turn on EXM
# DEMO TEAM CUSTOMIZATION - Custom variables to allow override in AKS
RENDERING_HOST_ENDPOINT_URI: "${RENDERING_HOST_INTERNAL_URI}/api/editing/render"
RENDERING_HOST_PUBLIC_URI: "https://${RENDERING_HOST}"
# END CUSTOMIZATION
# DEMO TEAM CUSTOMIZATION - Enable the Content Hub connector through an XDT file instead of environment variables
# SITECORE_AppSettings_cmpEnabled__define: ${SITECORE_CMP_ENABLED}
# SITECORE_AppSettings_damEnabled__define: ${SITECORE_DAM_ENABLED}
# END CUSTOMIZATION
# DEMO TEAM CUSTOMIZATION - Content Hub connector configuration
Sitecore_ConnectionStrings_CMP_dot_ContentHub: ${SITECORE_CMP_ContentHub}
Sitecore_ConnectionStrings_CMP_dot_ServiceBusEntityPathIn: ${SITECORE_CMP_Service_ServiceBusEntityPathIn}
Sitecore_ConnectionStrings_CMP_dot_ServiceBusSubscription: ${SITECORE_CMP_Service_ServiceBusSubscription}
Sitecore_ConnectionStrings_CMP_dot_ServiceBusEntityPathOut: ${SITECORE_CMP_Service_ServiceBusEntityPathOut}
Sitecore_ConnectionStrings_DAM_dot_ContentHub: ${SITECORE_DAM_ContentHub}
Sitecore_ConnectionStrings_DAM_dot_SearchPage: ${SITECORE_DAM_SearchPage}
Sitecore_ConnectionStrings_DAM_dot_ExternalRedirectKey: ${SITECORE_DAM_ExternalRedirectKey}
# END CUSTOMIZATION
entrypoint: powershell -Command "& C:/tools/entrypoints/iis/Development.ps1"