-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose-dev.yml
More file actions
233 lines (206 loc) · 7.01 KB
/
Copy pathdocker-compose-dev.yml
File metadata and controls
233 lines (206 loc) · 7.01 KB
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
---
name: kitconcept-intranet-dev
x-frontend: &frontend
image: ghcr.io/kitconcept/kitconcept-intranet-frontend:latest
pull_policy: build
build:
context: ./frontend
args:
- VOLTO_VERSION=${VOLTO_VERSION}
platform: linux/amd64
environment:
RAZZLE_INTERNAL_API_PATH: http://backend:8080/Plone
x-frontend-tests: &frontend-tests
<<: *frontend
ports:
- 3000:3000
x-backend: &backend
image: ghcr.io/kitconcept/kitconcept-intranet-backend:latest
pull_policy: build
build:
context: ./backend
args:
- KC_VERSION=${KC_VERSION}
platform: linux/amd64
x-backend-tests: &backend-tests
<<: *backend
environment:
COLLECTIVE_SOLR_HOST: solr-acceptance
COLLECTIVE_SOLR_PORT: 8983
COLLECTIVE_SOLR_BASE: /solr/plone
depends_on:
- solr-acceptance
x-backend-acceptance: &backend-acceptance
<<: *backend-tests
image: ghcr.io/kitconcept/kitconcept-intranet-acceptance:latest
build:
context: ./backend
dockerfile: Dockerfile.acceptance
args:
- KC_VERSION=${KC_VERSION}
pull_policy: build
x-tika: &tika
image: apache/tika:${TIKA_TAG:-3.2.3.0-full}
platform: linux/amd64
ports:
- 9998:9998
x-solr: &solr
image: ghcr.io/kitconcept/solr:${SOLR_TAG:-sha-826383b}
platform: linux/amd64
ports:
- 8983:8983
command:
- solr-precreate
- plone
- /plone-config
environment:
SOLR_MODULES: extraction
services:
traefik:
image: traefik:v2.11
profiles: ["dev"]
ports:
- 80:80
labels:
- traefik.enable=true
- traefik.constraint-label=public
- traefik.http.routers.traefik-public-http.rule=Host(`traefik.${STACK_HOSTNAME:-kitconcept-intranet.localhost}`)
- traefik.http.routers.traefik-public-http.entrypoints=http
- traefik.http.routers.traefik-public-http.service=api@internal
- traefik.http.services.traefik-public.loadbalancer.server.port=8000
# GENERIC MIDDLEWARES
- traefik.http.middlewares.gzip.compress=true
- traefik.http.middlewares.gzip.compress.excludedcontenttypes=image/png, image/jpeg, font/woff2
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
command:
- --providers.docker
- --providers.docker.constraints=Label(`traefik.constraint-label`, `public`)
- --providers.docker.exposedbydefault=false
- --entrypoints.http.address=:80
- --accesslog
- --log
- --api
frontend:
<<: *frontend
profiles: ["dev"]
depends_on:
- backend
labels:
- traefik.enable=true
- traefik.constraint-label=public
# Service
- traefik.http.services.svc-frontend.loadbalancer.server.port=3000
# Routers
## /
- traefik.http.routers.rt-frontend.rule=Host(`${STACK_HOSTNAME:-kitconcept-intranet.localhost}`)
- traefik.http.routers.rt-frontend.entrypoints=http
- traefik.http.routers.rt-frontend.service=svc-frontend
- traefik.http.routers.rt-frontend.middlewares=gzip
backend:
<<: *backend
profiles: ["dev"]
environment:
RELSTORAGE_DSN: "dbname='${DB_NAME:-plone}' user='${DB_NAME:-plone}' host='${DB_HOST:-db}' password='${DB_PASSWORD:-OwAaOExRfIvY}' port='${DB_PORT:-5432}'"
SOLR_HOST: solr
SOLR_PORT: 8983
SOLR_BASE: /solr/plone
SITE_SETUP_SOLR: "true"
SOLR_ACTIVATE: "true"
depends_on:
- db
- solr
labels:
- traefik.enable=true
- traefik.constraint-label=public
# Services
- traefik.http.services.svc-backend.loadbalancer.server.port=8080
# Middlewares
## VHM rewrite /++api++/
- "traefik.http.middlewares.mw-backend-vhm-api.replacepathregex.regex=^/\\+\\+api\\+\\+($$|/.*)"
- "traefik.http.middlewares.mw-backend-vhm-api.replacepathregex.replacement=/VirtualHostBase/http/${STACK_HOSTNAME:-kitconcept-intranet.localhost}/Plone/++api++/VirtualHostRoot$$1"
## VHM rewrite /ClassicUI/
- "traefik.http.middlewares.mw-backend-vhm-classic.replacepathregex.regex=^/ClassicUI($$|/.*)"
- "traefik.http.middlewares.mw-backend-vhm-classic.replacepathregex.replacement=/VirtualHostBase/http/${STACK_HOSTNAME:-kitconcept-intranet.localhost}/Plone/VirtualHostRoot/_vh_ClassicUI$$1"
## Basic Authentication
### Note: all dollar signs in the hash need to be doubled for escaping.
### To create user:password pair, it's possible to use this command:
### echo $(htpasswd -nb user password) | sed -e s/\\$/\\$\\$/g
### Defaults to admin:admin
- traefik.http.middlewares.mw-backend-auth.basicauth.users=admin:$$apr1$$uZPT5Fgu$$AmlIdamxT5ipBvPlsdfD70
# Routers
- traefik.http.routers.rt-backend-api.rule=Host(`${STACK_HOSTNAME:-kitconcept-intranet.localhost}`) && (PathPrefix(`/++api++`))
- traefik.http.routers.rt-backend-api.entrypoints=http
- traefik.http.routers.rt-backend-api.service=svc-backend
- traefik.http.routers.rt-backend-api.middlewares=gzip,mw-backend-vhm-api
## /ClassicUI
- traefik.http.routers.rt-backend-classic.rule=Host(`${STACK_HOSTNAME:-kitconcept-intranet.localhost}`) && PathPrefix(`/ClassicUI`)
- traefik.http.routers.rt-backend-classic.entrypoints=http
- traefik.http.routers.rt-backend-classic.service=svc-backend
- traefik.http.routers.rt-backend-classic.middlewares=gzip,mw-backend-auth,mw-backend-vhm-classic
## Intranet Admin
- traefik.http.routers.rt-backend-zmi.rule=Host(`admin-${STACK_HOSTNAME:-kitconcept-intranet.localhost}`)
- traefik.http.routers.rt-backend-zmi.entrypoints=http
- traefik.http.routers.rt-backend-zmi.service=svc-backend
- traefik.http.routers.rt-backend-zmi.middlewares=gzip
db:
image: postgres:14
profiles: ["dev"]
environment:
POSTGRES_USER: plone
POSTGRES_PASSWORD: OwAaOExRfIvY
POSTGRES_DB: plone
volumes:
- vol-site-data:/var/lib/postgresql/data
tika:
<<: *tika
profiles: ["dev"]
solr:
<<: *solr
profiles: ["dev"]
depends_on:
- tika
environment:
SOLR_MODULES: extraction
SOLR_OPTS: "-Dsolr.tika.url=http://tika:9998"
# Acceptance / A11y Testing Services
frontend-acceptance:
<<: *frontend-tests
profiles: ["acceptance"]
environment:
RAZZLE_INTERNAL_API_PATH: http://backend-acceptance:55001/plone
SITE_DEFAULT_LANGUAGE: en
depends_on:
- backend-acceptance
frontend-a11y:
<<: *frontend-tests
profiles: ["a11y"]
environment:
RAZZLE_INTERNAL_API_PATH: http://backend-a11y:8080/plone
depends_on:
- backend-a11y
backend-acceptance:
<<: *backend-acceptance
profiles: ["acceptance"]
ports:
- 55001:55001
backend-a11y:
<<: *backend-tests
profiles: ["a11y"]
environment:
- SITE=plone
ports:
- 8080:8080
tika-acceptance:
<<: *tika
profiles: ["solr", "acceptance", "a11y"]
solr-acceptance:
<<: *solr
profiles: ["solr", "acceptance", "a11y"]
depends_on:
- tika-acceptance
environment:
SOLR_MODULES: extraction
SOLR_OPTS: "-Dsolr.tika.url=http://tika-acceptance:9998"
volumes:
vol-site-data: {}