forked from georchestra/docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.override.yml
144 lines (132 loc) · 5.23 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
version: "3.1"
# Complementary services, not part of geOrchestra core.
# They are made to ease your life as a developer.
# **NOT** production ready !
volumes:
smtp_maildir:
services:
traefik-me-certificate-downloader:
image: alpine
command: sh -c "cd /etc/ssl/traefik
&& wget traefik.me/fullchain.pem -O traefik.me.crt
&& wget traefik.me/privkey.pem -O traefik.me-key.pem"
volumes:
- ./resources/ssl:/etc/ssl/traefik
georchestra-127-0-1-1.traefik.me:
image: traefik:2.9
depends_on:
- traefik-me-certificate-downloader
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./resources/ssl:/etc/certs:ro
- ./resources/traefik.yml:/etc/traefik/traefik.yml:ro
- ./resources/traefik-config.yml:/etc/traefik/config.yml:ro
restart: always
labels:
- "traefik.enable=true"
- "traefik.http.routers.traefik.tls=true"
- "traefik.http.routers.traefik.rule=Host(`georchestra-127-0-1-1.traefik.me`) && (PathPrefix(`/traefik`) || PathPrefix(`/api`))"
- "traefik.http.routers.traefik.service=api@internal"
- "traefik.http.routers.traefik.middlewares=traefik-strip@docker"
- "traefik.http.middlewares.traefik-strip.stripprefix.prefixes=/traefik"
static:
image: nginx:stable
restart: unless-stopped
volumes:
- ./resources/static:/usr/share/nginx/html:ro
- /etc/localtime:/etc/localtime:ro
labels:
- "traefik.enable=true"
- "traefik.http.routers.static.tls=true"
- "traefik.http.routers.static.rule=Host(`georchestra-127-0-1-1.traefik.me`)"
- "traefik.http.routers.static.priority=1"
proxy:
labels:
- "traefik.enable=true"
- "traefik.http.routers.proxy.tls=true"
- "traefik.http.routers.proxy.priority=2"
- >-
traefik.http.routers.proxy.rule=Host(`georchestra-127-0-1-1.traefik.me`) && (
PathPrefix(`/analytics`)
|| PathPrefix(`/datafeeder`)
|| PathPrefix(`/datahub`)
|| PathPrefix(`/console`)
|| PathPrefix(`/extractorapp`)
|| PathPrefix(`/geonetwork`)
|| PathPrefix(`/geoserver`)
|| PathPrefix(`/header`)
|| PathPrefix(`/import`)
|| PathPrefix(`/login`)
|| PathPrefix(`/logout`)
|| PathPrefix(`/mapstore`)
|| PathPrefix(`/_static`)
)
- "traefik.http.services.proxy.loadbalancer.server.port=8080"
# CORS related. Open everything to the world.
- "traefik.http.routers.proxy.middlewares=corsheader@docker"
- "traefik.http.middlewares.corsheader.headers.accesscontrolallowmethods=GET, HEAD, POST, PUT, DELETE, OPTIONS, PATCH"
- "traefik.http.middlewares.corsheader.headers.accesscontrolalloworiginlist=*"
- "traefik.http.middlewares.corsheader.headers.accesscontrolmaxage=1800"
- "traefik.http.middlewares.corsheader.headers.addvaryheader=true"
- "traefik.http.middlewares.corsheader.headers.accesscontrolallowcredentials=true"
- "traefik.http.routers.proxy.middlewares=corsheader@docker,static-errors-middleware@docker"
# handle downstream errors
- "traefik.http.middlewares.static-errors-middleware.errors.status=500-599"
- "traefik.http.middlewares.static-errors-middleware.errors.service=static-docker@docker"
- "traefik.http.middlewares.static-errors-middleware.errors.query=/errors/50x.html"
# Add trailing slash to well-known apps
- "traefik.http.routers.traefik-redirect.tls=true"
- >-
traefik.http.routers.traefik-redirect.rule=Host(`georchestra-127-0-1-1.traefik.me`) && (
Path(`/analytics`)
|| Path(`/datafeeder`)
|| Path(`/datahub`)
|| Path(`/console`)
|| Path(`/geonetwork`)
|| Path(`/geoserver`)
|| Path(`/header`)
|| Path(`/import`)
|| Path(`/mapstore`)
)
- "traefik.http.routers.traefik-redirect.priority=10"
- "traefik.http.routers.traefik-redirect.middlewares=add-trailing-slash@docker"
- "traefik.http.middlewares.add-trailing-slash.redirectregex.regex=^https?://(.*)/(.+)"
- "traefik.http.middlewares.add-trailing-slash.redirectregex.replacement=https://$${1}/$${2}/"
- "traefik.http.middlewares.add-trailing-slash.redirectregex.permanent=false"
cas:
labels:
- "traefik.enable=true"
- "traefik.http.routers.cas.tls=true"
- "traefik.http.routers.cas.rule=Host(`georchestra-127-0-1-1.traefik.me`) && PathPrefix(`/cas`)"
smtp:
image: camptocamp/smtp-sink:latest
volumes:
- smtp_maildir:/home/smtp/Maildir/
restart: always
courier-imap:
image: camptocamp/courier-imap:latest
volumes:
- smtp_maildir:/home/smtp/Maildir/
restart: always
webmail:
image: camptocamp/sqwebmail:latest
environment:
- IMAP_HOSTNAME=courier-imap
- SMTP_HOSTNAME=smtp-sink
volumes:
- smtp_maildir:/home/smtp/Maildir/
labels:
- "traefik.enable=true"
- "traefik.http.routers.webmail.tls=true"
- "traefik.http.routers.webmail.rule=Host(`georchestra-127-0-1-1.traefik.me`) && PathPrefix(`/webmail`)"
restart: always
ssh:
image: georchestra/ssh_data:latest
ports:
- "2222:22"
volumes:
- geoserver_geodata:/mnt/geoserver_geodata
restart: always