forked from Firefishy/kadastr.live
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
147 lines (141 loc) · 5.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
version: "3.5"
services:
sphinx:
image: macbre/sphinxsearch:3.4.1
restart: unless-stopped
ports:
- "127.0.0.1:36307:36307" # bind to local interface only!
volumes:
- ${SPHINX_CACHE_DIR:-./data:/opt/sphinx/index/}
- ./sphinx/sphinx.conf:/opt/sphinx/conf/sphinx.conf
- ./sphinx/sphinx_template.conf:/opt/sphinx/conf/sphinx_template.conf
environment:
- SQL_HOST
- SQL_USER
- SQL_PASS
- SQL_DB
- SQL_PORT
tiles:
build: tiles
restart: unless-stopped
ports:
- 127.0.0.1:8686:8686
environment:
- SQL_HOST
- SQL_USER
- SQL_PASS
- SQL_DB
- SQL_PORT
volumes:
- ${TILES_CACHE_DIR:-/ssd/tegola_cache/:/cache/}
labels:
- "traefik.enable=true"
- "traefik.http.routers.tiles.rule=PathPrefix(`/tiles/`)"
- "traefik.http.routers.tiles.entrypoints=web,websecure"
- "traefik.http.routers.tiles.middlewares=cors"
- "traefik.http.middlewares.cors.headers.accesscontrolalloworiginlist=*"
- "traefik.http.middlewares.cors.headers.addvaryheader=true"
- "containers.group=kadastr.live"
wayback_tiles:
build: wayback
restart: unless-stopped
environment:
- SQL_HOST
- SQL_USER
- SQL_PASS
- SQL_DB
- SQL_PORT
command:
- --config
- "/opt/tegola_config"
- serve
labels:
- "traefik.enable=true"
- "traefik.http.routers.wayback_tiles.rule=PathPrefix(`/wayback_tiles/`)"
- "traefik.http.routers.wayback_tiles.entrypoints=web,websecure"
- "traefik.http.routers.wayback_tiles.middlewares=cors"
- "traefik.http.services.wayback_tiles.loadbalancer.server.port=8080"
- "traefik.http.middlewares.cors.headers.accesscontrolalloworiginlist=*"
- "traefik.http.middlewares.cors.headers.addvaryheader=true"
- "containers.group=kadastr.live"
raster:
build: raster
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.routers.raster.rule=PathPrefix(`/tiles/raster`)"
- "traefik.http.routers.raster.entrypoints=web,websecure"
- "traefik.http.routers.raster.middlewares=cors,raster-stripprefix"
- "traefik.http.middlewares.raster-stripprefix.stripprefix.prefixes=/tiles/raster"
- "traefik.http.middlewares.cors.headers.accesscontrolalloworiginlist=*"
- "traefik.http.middlewares.cors.headers.addvaryheader=true"
- "containers.group=kadastr.live"
command: ["-p", "80", "-c", "/configs/config.json", "--public_url", "https://kadastr.live/tiles/raster"]
nginx:
build: vueapp
restart: unless-stopped
ports:
- 127.0.0.1:8882:80
labels:
- "traefik.enable=true"
- "traefik.http.routers.nginx.rule=PathPrefix(`/`)"
- "traefik.http.routers.nginx.entrypoints=web,websecure"
- "traefik.http.routers.nginx.priority=-1"
- "traefik.http.routers.nginx.middlewares=cors"
- "traefik.http.middlewares.cors.headers.accesscontrolalloworiginlist=*"
- "traefik.http.middlewares.cors.headers.addvaryheader=true"
- "containers.group=kadastr.live"
webserver:
build: .
restart: unless-stopped
environment:
- APP_MODULE=cadastr.wsgi:application
- DEBUG
- LOG_LEVEL=debug
- SQL_HOST
- SQL_USER
- SQL_PASS
- SQL_DB
- SQL_PORT
entrypoint: /app/start-reload.sh
volumes:
- .:/app
- ./empty:/app/venv
labels:
- "traefik.enable=true"
- "traefik.http.routers.webserver.rule=PathPrefix(`/api`) || PathPrefix(`/admin`) || PathPrefix(`/__debug__`) || PathPrefix(`/media`) || PathPrefix(`/static`) || PathPrefix(`/export`) || PathPrefix(`/search`) "
- "traefik.http.routers.webserver.entrypoints=web,websecure"
- "traefik.http.routers.webserver.middlewares=cors"
- "traefik.http.middlewares.cors.headers.accesscontrolalloworiginlist=*"
- "traefik.http.middlewares.cors.headers.addvaryheader=true"
- "containers.group=kadastr.live"
traefik:
image: "traefik:v2.5"
command:
- "--api=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--providers.docker.constraints=Label(`containers.group`,`kadastr.live`)"
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "--entrypoints.websecure.http.tls=true"
- "--entryPoints.web.forwardedHeaders.insecure"
ports:
- "127.0.0.1:11080:80"
- "127.0.0.1:11443:443"
labels:
- "traefik.enable=true"
- "traefik.http.routers.traefik.rule=PathPrefix(`/traefik/admin`) || PathPrefix(`/traefik/api`)|| HeadersRegexp(`Referer`, `.*/traefik/.*`)"
- "traefik.http.routers.traefik.service=api@internal"
- "traefik.http.routers.traefik.middlewares=admin-stripprefix"
- "traefik.http.routers.traefik.entrypoints=web,websecure"
- "traefik.http.routers.traefik.priority=9999"
- "traefik.http.middlewares.admin-stripprefix.stripPrefix.prefixes=/traefik/admin,/traefik/]"
- "traefik.http.middlewares.admin-stripprefix.stripPrefix.forceSlash=true"
- "containers.group=kadastr.live"
depends_on:
- nginx
- webserver
- tiles
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"