-
Notifications
You must be signed in to change notification settings - Fork 0
/
shop-stack.yml
241 lines (233 loc) · 5.79 KB
/
shop-stack.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
version: '3.7'
services:
mongodb:
image: mongo:4.4.18-focal # The latest mongodb that is compatible with armv7
hostname: mongodb
logging:
driver: json-file
options:
max-file: 5
max-size: 10m
healthcheck:
test: ["CMD","mongo", "--eval", "db.adminCommand('ping')"]
interval: 5s
timeout: 5s
retries: 3
start_period: 5s
volumes:
- mongodb-data:/data/db
networks:
- shop
command: --wiredTigerCacheSizeGB 2.0 --bind_ip localhost,mongodb
deploy:
replicas: 1
restart_policy:
condition: any
resources:
reservations:
memory: 2G
cpus: "0.5"
limits:
memory: 3G
cpus: "1.0"
# redis:
# image: redis:7.2-bookworm
# hostname: redis
# logging:
# driver: "json-file"
# options:
# max-file: 5
# max-size: 5m
# command:
# - "redis-server"
# - "--port 6379"
# - "--maxmemory 1gb"
# - "--maxmemory-policy allkeys-lru"
# networks:
# - shop
# deploy:
# mode: replicated
# replicas: 1
# restart_policy:
# condition: any
# resources:
# reservations:
# memory: 0.5G
# cpus: "0.2"
# limits:
# memory: 1.5G
# cpus: "1.0"
# update_config:
# parallelism: 1
# order: stop-first
# failure_action: rollback
# delay: 5s
eth-rpc:
image: registry.ucc.dev/unchained/helios:box
hostname: helios
env_file: .env
logging:
driver: json-file
options:
max-file: 5
max-size: 10m
healthcheck:
test: >-
curl -f -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_chainId","params":[]}' http://localhost:8545 || exit 1
interval: 5s
timeout: 5s
retries: 3
start_period: 5s
ports:
- target: 8545
published: 8545
protocol: tcp
mode: host
networks:
- traefik
- shop
deploy:
replicas: 1
restart_policy:
condition: any
resources:
reservations:
cpus: "0.1"
memory: 128M
limits:
memory: 256M
cpus: "0.5"
labels:
- "traefik.enable=true"
- "traefik.http.routers.box-eth-rpc.rule=PathPrefix(`/eth-rpc`)"
- "traefik.http.services.box-eth-rpc.loadbalancer.server.port=8545"
- "shop.unchained.box.autoupdate=true"
cryptopay:
image: registry.ucc.dev/unchained/cryptopay:box
hostname: cryptopay
env_file: .env
environment:
NODE_ENV: production
TZ: 'Europe/Paris'
CRYPTOPAY_ETH_RPC: http://eth-rpc:8545
CRYPTOPAY_WEBHOOK_URL: http://box-engine:3000/payment/cryptopay
networks:
- shop
logging:
driver: json-file
options:
max-file: '5'
max-size: 10m
deploy:
replicas: 1
resources:
reservations:
cpus: "0.1"
memory: 256M
limits:
memory: 512M
cpus: "1.0"
labels:
- "traefik.enable=false"
- "shop.unchained.box.autoupdate=true"
update_config:
delay: 10s
order: start-first
engine:
hostname: box-engine
image: registry.ucc.dev/unchained/kitchensink:box
env_file: .env
environment:
MONGO_URL: mongodb://mongodb/unchained
EMAIL_FROM: noreply@localhost
EMAIL_WEBSITE_NAME: Unchained Box
# EMAIL_WEBSITE_URL: http://unbox.localhost
NODE_ENV: production
# ROOT_URL: http://unbox.localhost
UNCHAINED_ASSIGN_CART_FOR_USERS: '1'
# UNCHAINED_COOKIE_DOMAIN: unbox.localhost
UNCHAINED_COOKIE_PATH: /
MINTER_TOKEN_OFFSET: '1'
TZ: 'Europe/Paris'
LANG: de_CH.UTF-8
networks:
- shop
- traefik
logging:
driver: json-file
options:
max-file: '5'
max-size: 10m
healthcheck:
interval: 5s
timeout: 2s
retries: 5
start_period: 15s
deploy:
replicas: 1
update_config:
delay: 0s
order: start-first
restart_policy:
condition: any
resources:
reservations:
memory: 256M
cpus: "0.5"
limits:
memory: 1G
cpus: "1.0"
labels:
- "traefik.enable=true"
- "traefik.http.routers.box-engine.rule=PathPrefix(`/graphql`,`/cdn`,`/gridfs`,`/bulk-import`,`/rest`,`/payment`,`/pricing`,`/erc-metadata`)"
- "traefik.http.services.box-engine.loadbalancer.server.port=3000"
- "shop.unchained.box.autoupdate=true"
storefront:
image: registry.ucc.dev/unchained/storefront:box
hostname: box-storefront
env_file: .env
environment:
UNCHAINED_ENDPOINT: http://box-engine:3000/graphql
NODE_ENV: production
TZ: 'Europe/Paris'
LANG: de_CH.UTF-8
networks:
- shop
- traefik
logging:
driver: json-file
options:
max-file: '5'
max-size: 10m
healthcheck:
interval: 2s
timeout: 2s
retries: 3
start_period: 5s
deploy:
replicas: 1
update_config:
delay: 10s
order: start-first
restart_policy:
condition: any
resources:
reservations:
memory: 128M
cpus: "0.5"
limits:
memory: 1.5G
cpus: "1.0"
labels:
- "traefik.enable=true"
- "traefik.http.routers.box-storefront.rule=!PathPrefix(`/graphql`,`/cdn`,`/gridfs`,`/bulk-import`,`/rest`,`/payment`,`/pricing`,`/erc-metadata`,`/eth-rpc`)"
- "traefik.http.services.box-storefront.loadbalancer.server.port=3000"
- "shop.unchained.box.autoupdate=true"
volumes:
mongodb-data:
networks:
traefik:
external: true
name: traefik
shop:
name: shop