-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
110 lines (97 loc) · 4.41 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
---
name: kitconcept-intranet
services:
traefik:
image: traefik:v2.11
ports:
- 80:80
labels:
- traefik.enable=true
- traefik.constraint-label=public
- traefik.http.routers.traefik-public-http.rule=Host(`traefik.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:
image: ghcr.io/kitconcept/kitconcept-intranet-frontend:1.0.0a3
platform: linux/amd64
environment:
RAZZLE_INTERNAL_API_PATH: http://backend:8080/Plone
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(`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:
image: ghcr.io/kitconcept/kitconcept-intranet-backend:1.0.0a3
platform: linux/amd64
environment:
RELSTORAGE_DSN: "dbname='${DB_NAME:-plone}' user='${DB_NAME:-plone}' host='${DB_HOST:-db}' password='${DB_PASSWORD:-HxfQYJgHCtjM}' port='${DB_PORT:-5432}'"
ZOPE_FORM_MEMORY_LIMIT: 250MB
HONEYPOT_FIELD: your_email
depends_on:
- db
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/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/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(`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(`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
## admin
- traefik.http.routers.rt-backend-admin.rule=Host(`admin.kitconcept-intranet.localhost`)
- traefik.http.routers.rt-backend-admin.entrypoints=http
- traefik.http.routers.rt-backend-admin.service=svc-backend
- traefik.http.routers.rt-backend-admin.middlewares=gzip,mw-backend-auth
db:
image: postgres:14
environment:
POSTGRES_USER: plone
POSTGRES_PASSWORD: HxfQYJgHCtjM
POSTGRES_DB: plone
volumes:
- vol-site-data:/var/lib/postgresql/data
volumes:
vol-site-data: {}