forked from ordercloud-api/headstart
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
210 lines (191 loc) · 8.19 KB
/
docker-compose.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
version: '2.4'
services:
traefik:
isolation: default
image: traefik:v1.7.28-alpine
command:
- "--ping"
- "--api"
- "--docker"
- "--accesslog"
ports:
- "80:80"
- "8079:8080"
healthcheck:
test: ["CMD", "traefik", "healthcheck", "--ping"]
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
- headstart
middleware:
image: ${REGISTRY}headstart-middleware:${VERSION}-linux
isolation: default
ports:
- 43005:80
build:
context: .
dockerfile: docker/build/middleware/Dockerfile
args:
BUILD_IMAGE: mcr.microsoft.com/dotnet/sdk:3.1-alpine
BASE_IMAGE: mcr.microsoft.com/dotnet/aspnet:3.1-alpine
BUILD_CONFIGURATION: ${BUILD_CONFIGURATION}
environment:
ASPNETCORE_ENVIRONMENT: ${BUILD_CONFIGURATION}
ApplicationInsightsSettings_InstrumentationKey: "${ApplicationInsightsSettings_InstrumentationKey}"
AvalaraSettings_AccountID: "${AvalaraSettings_AccountID}"
AvalaraSettings_CompanyCode: "${AvalaraSettings_CompanyCode}"
AvalaraSettings_CompanyID: "${AvalaraSettings_CompanyID}"
AvalaraSettings_LicenseKey: "${AvalaraSettings_LicenseKey}"
AvalaraSettings_BaseApiUrl: "${AvalaraSettings_BaseApiUrl}"
StorageAccountSettings_ConnectionString: "${StorageAccountSettings_ConnectionString}"
StorageAccountSettings_HostUrl: "${StorageAccountSettings_HostUrl}"
StorageAccountSettings_Key: "${StorageAccountSettings_Key}"
StorageAccountSettings_ContainerNameQueue: "${StorageAccountSettings_ContainerNameQueue}"
StorageAccountSettings_ContainerNameCache: "${StorageAccountSettings_ContainerNameCache}"
StorageAccountSettings_BlobContainerNameExchangeRates: "${StorageAccountSettings_ContainerNameExchangeRates}"
StorageAccountSettings_ContainerNameTranslations: "${StorageAccountSettings_ContainerNameTranslations}"
CMSSettings_BaseUrl: "${CMSSettings_BaseUrl}"
CardConnectSettings_Authorization: "${CardConnectSettings_Authorization}"
CardConnectSettings_AuthorizationCad: "${CardConnectSettings_AuthorizationCad}"
CardConnectSettings_BaseUrl: "${CardConnectSettings_BaseUrl}"
CardConnectSettings_CadMerchantID: "${CardConnectSettings_CadMerchantID}"
CardConnectSettings_Site: "${CardConnectSettings_Site}"
CardConnectSettings_UsdMerchantID: "${CardConnectSettings_UsdMerchantID}"
CosmosSettings_DatabaseName: "${CosmosSettings_DatabaseName}"
CosmosSettings_EnableTcpConnectionEndpointRediscovery: "${CosmosSettings_EnableTcpConnectionEndpointRediscovery}"
CosmosSettings_PrimaryKey: "${CosmosSettings_PrimaryKey}"
CosmosSettings_RequestTimeoutInSeconds: "${CosmosSettings_RequestTimeoutInSeconds}"
EasyPostSettings_APIKey: "${EasyPostSettings_APIKey}"
EasyPostSettings_FreeShippingTransitDays: "${EasyPostSettings_FreeShippingTransitDays}"
EasyPostSettings_NoRatesFallbackCost: "${EasyPostSettings_NoRatesFallbackCost}"
EasyPostSettings_NoRatesFallbackTransitDays: "${EasyPostSettings_NoRatesFallbackTransitDays}"
EnvironmentSettings_AppTimeoutInSeconds: "${EnvironmentSettings_AppTimeoutInSeconds}"
EnvironmentSettings_MiddlewareBaseUrl: "${API_HOST}"
EnvironmentSettings_BuildNumber: "${EnvironmentSettings_BuildNumber}"
EnvironmentSettings_Commit: "${EnvironmentSettings_Commit}"
EnvironmentSettings_Environment: "${EnvironmentSettings_Environment}"
FlurlSettings_TimeoutInSeconds: "${FlurlSettings_TimeoutInSeconds}"
OrderCloudSettings_ApiUrl: "${OrderCloudSettings_ApiUrl}"
OrderCloudSettings_MiddlewareClientID: "${OrderCloudSettings_MiddlewareClientID}"
OrderCloudSettings_MiddlewareClientSecret: "${OrderCloudSettings_MiddlewareClientSecret}"
OrderCloudSettings_IncrementorPrefix: "${OrderCloudSettings_IncrementorPrefix}"
OrderCloudSettings_WebhookHashKey: "${OrderCloudSettings_WebhookHashKey}"
SendGridSettings_ApiKey: "${SendGridSettings_ApiKey}"
SendgridSettings_FromEmail: "${SendgridSettings_FromEmail}"
SendgridSettings_CriticalSupportEmails: "${SendgridSettings_CriticalSupportEmails}"
SendgridSettings_SupportCaseEmail: "${SendgridSettings_SupportCaseEmail}"
SendgridSettings_BillingEmail: "${SendgridSettings_BillingEmail}"
SendgridSettings_OrderSubmitTemplateID: "${SendgridSettings_OrderSubmitTemplateID}"
SendgridSettings_OrderApprovalTemplateID: "${SendgridSettings_OrderApprovalTemplateID}"
SendgridSettings_LineItemStatusChangeTemplateID: "${SendgridSettings_LineItemStatusChangeTemplateID}"
SendgridSettings_QuoteOrderSubmitTemplateID: "${SendgridSettings_QuoteOrderSubmitTemplateID}"
SendgridSettings_NewUserTemplateID: "${SendgridSettings_NewUserTemplateID}"
SendgridSettings_ProductInformationRequestTemplateID: "${SendgridSettings_ProductInformationRequestTemplateID}"
SendgridSettings_PasswordResetTemplateID: "${SendgridSettings_PasswordResetTemplateID}"
SendgridSettings_CriticalSupportTemplateID: "${SendgridSettings_CriticalSupportTemplateID}"
SmartyStreetSettings_AuthID: "${SmartyStreetSettings_AuthID}"
SmartyStreetSettings_AuthToken: "${SmartyStreetSettings_AuthToken}"
SmartyStreetSettings_RefererHost: "${SmartyStreetSettings_RefererHost}"
SmartyStreetSettings_WebsiteKey: "${SmartyStreetSettings_WebsiteKey}"
UI_BaseAdminUrl: "${SELLER_HOST}"
ZohoSettings_AccessToken: "${ZohoSettings_AccessToken}"
ZohoSettings_ClientId: "${ZohoSettings_ClientId}"
ZohoSettings_ClientSecret: "${ZohoSettings_ClientSecret}"
ZohoSettings_OrgID: "${ZohoSettings_OrgID}"
ZohoSettings_PerformOrderSubmitTasks: "${ZohoSettings_PerformOrderSubmitTasks}"
depends_on:
cosmos:
condition: service_healthy
networks:
headstart:
aliases:
- "${API_HOST}"
labels:
- "traefik.enable=true"
- "traefik.middleware.frontend.rule=Host:${API_HOST}"
seller:
image: ${REGISTRY}headstart-seller:${VERSION}-linux
isolation: default
environment:
SELLER_ID: ${SELLER_ID}
SELLER_CLIENT_ID: ${SELLER_CLIENT_ID}
MIDDLEWARE_URL: http://${API_HOST}
TRANSLATE_BLOB_URL: ${TRANSLATE_BLOB_URL}
BLOB_STORAGE_URL: ${BLOB_STORAGE_URL}
BUYER_CLIENT_ID: ${BUYER_CLIENT_ID}
ports:
- 43010:80
build:
context: .
dockerfile: docker/build/UI/Dockerfile
args:
BASE_IMAGE: node:12.16.3-alpine
ROLE: Seller
labels:
- "traefik.enable=true"
- "traefik.seller.frontend.rule=Host:${SELLER_HOST}"
networks:
headstart:
aliases:
- "${SELLER_HOST}"
buyer:
image: ${REGISTRY}headstart-buyer:${VERSION}-linux
isolation: default
environment:
BUYER_CLIENT_ID: ${BUYER_CLIENT_ID}
MIDDLEWARE_URL: http://${API_HOST}
BUYER_URL: http://${BUYER_HOST}
SELLER_ID: ${SELLER_ID}
TRANSLATE_BLOB_URL: ${TRANSLATE_BLOB_URL}
ports:
- 43015:80
build:
context: .
dockerfile: docker/build/UI/Dockerfile
args:
BASE_IMAGE: node:12.16.3-alpine
ROLE: Buyer
labels:
- "traefik.enable=true"
- "traefik.buyer.frontend.rule=Host:${BUYER_HOST}"
networks:
headstart:
aliases:
- "${BUYER_HOST}"
storage:
image: mcr.microsoft.com/azure-storage/azurite:${AZUREITE_TAG}
volumes:
- ./docker/data/storage:/data
environment:
blobHost: 0.0.0.0
queueHost: 0.0.0.0
blobPort: 10000
ports:
- 10000:10000
- 10001:10001
networks:
headstart:
cosmos:
image: ${REGISTRY}headstart-cosmos:${VERSION}-linux
mem_limit: 3g
cpu_count: 2
build:
context: .
dockerfile: docker/build/cosmos/Dockerfile
args:
BASE_IMAGE: mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:${COSMOS_TAG}
environment:
AZURE_COSMOS_EMULATOR_PARTITION_COUNT: 10
AZURE_COSMOS_EMULATOR_ENABLE_DATA_PERSISTENCE: "true"
ports:
- 8081:8081
- 10251:10251
- 10252:10252
- 10253:10253
- 10254:10254
healthcheck:
test: ["CMD-SHELL", "curl -f -k https://localhost:8081/_explorer/emulator.pem || exit 1"]
networks:
headstart:
networks:
headstart: