-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yml
172 lines (161 loc) · 4.68 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
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
# Development containers, these should only be used if you are developing.
version: '3'
services:
db: # https://github.com/docker-library/docs/tree/master/postgres
image: postgres:12
environment:
- POSTGRES_DB=wrolpi
- POSTGRES_PASSWORD=wrolpi
ports:
- "5432:5432"
healthcheck:
test: [ 'CMD-SHELL', 'pg_isready -U postgres' ]
interval: 10s
volumes:
- ./pg_data:/var/lib/postgresql/data
api:
depends_on:
- db
build:
context: .
dockerfile: docker/api/Dockerfile
volumes:
- './main.py:/opt/wrolpi/main.py'
- './wrolpi:/opt/wrolpi/wrolpi'
- './modules:/opt/wrolpi/modules'
- './scripts:/opt/wrolpi/scripts'
- './test:/opt/wrolpi/test'
- './test:/media/wrolpi'
- './alembic:/opt/wrolpi/alembic'
- './alembic.ini:/opt/wrolpi/alembic.ini'
ports:
- ${REACT_APP_API-127.0.0.1:8081}:8081
user: '${UID-1000}:${GID-1000}'
healthcheck:
test: [ 'CMD-SHELL', 'curl http://127.0.0.1:8081/api/echo' ]
interval: 2m
archive: # Python/Sanic wrapper around Singlefile and Readability.
build:
context: .
dockerfile: docker/archive/Dockerfile
volumes:
- './docker/archive/main.py:/app/main.py'
ports:
- '8083:8080'
healthcheck:
test: [ 'CMD-SHELL', 'curl http://127.0.0.1:8080/' ]
interval: 2m
app: # React App
depends_on:
- api
build:
context: .
dockerfile: docker/app/Dockerfile
volumes:
- './app/public:/app/public'
- './app/src:/app/src'
- './app/package.json:/app/package.json'
- '.env:/app/.env'
command: 'npm run start'
stdin_open: true
healthcheck:
test: [ 'CMD-SHELL', 'curl http://127.0.0.1:3000' ]
interval: 1m
user: '${UID-1000}:${GID-1000}'
environment:
# Force React to use nginx port to connect to it's websocket.
- WDS_SOCKET_PORT=0
map: # https://github.com/Overv/openstreetmap-tile-server
image: overv/openstreetmap-tile-server:v1.6.0
volumes:
- 'openstreetmap-data:/var/lib/postgresql/12/main'
- 'openstreetmap-rendered-tiles:/var/lib/mod_tile'
- './modules/map/leaflet.html:/var/www/html/index.html'
- './modules/map/leaflet.js:/var/www/html/leaflet.js'
- './modules/map/leaflet.css:/var/www/html/leaflet.css'
command: 'run'
shm_size: 1g # Increase shared size to render large map tiles
healthcheck:
test: [ 'CMD-SHELL', 'curl http://127.0.0.1:80' ]
interval: 1m
map_https: # HTTPS for map tile server
depends_on:
- map
build:
context: .
dockerfile: docker/https_proxy/Dockerfile
ports:
- '8084:443'
volumes:
- './docker/map/nginx.map.conf:/etc/nginx/nginx.conf'
healthcheck:
test: [ 'CMD-SHELL', 'curl http://127.0.0.1:443' ]
interval: 1m
web:
depends_on:
- app
build:
context: .
dockerfile: docker/web/Dockerfile
ports:
- ${WEB_HOST-0.0.0.0}:${WEB_PORT-8080}:80
- ${WEB_HOST-0.0.0.0}:${WEB_HTTPS_PORT-8443}:443
volumes:
- './docker/web/nginx.dev.conf:/etc/nginx/nginx.conf'
- './docker/web/wrolpi.dev.conf:/etc/nginx/conf.d/wrolpi.conf'
- './icon.ico:/etc/nginx/favicon.ico'
- './icon.png:/etc/nginx/icon.png'
- './test:/opt/media'
healthcheck:
test: [ 'CMD-SHELL', 'curl http://127.0.0.1:80' ]
interval: 1m
zim: # kiwix-serve
build:
context: .
dockerfile: docker/zim/Dockerfile
volumes:
- './test:/media/wrolpi'
- './docker/zim/entrypoint.sh:/entrypoint.sh'
healthcheck:
test: [ 'CMD-SHELL', 'curl http://127.0.0.1:80' ]
interval: 1m
zim_https: # HTTPS for Zim service.
depends_on:
- zim
build:
context: .
dockerfile: docker/https_proxy/Dockerfile
ports:
- '8085:443'
volumes:
- './docker/zim/nginx.zim.conf:/etc/nginx/nginx.conf'
healthcheck:
test: [ 'CMD-SHELL', 'curl http://127.0.0.1:443' ]
interval: 1m
help: # The WROLPi Help documentation.
build:
context: .
dockerfile: docker/help/Dockerfile
volumes:
- './docker/help/wrolpi-help:/opt/wrolpi-help'
healthcheck:
test: [ 'CMD-SHELL', 'curl http://127.0.0.1:8086' ]
interval: 1m
help_https: # HTTPS for Help service.
depends_on:
- help
build:
context: .
dockerfile: docker/https_proxy/Dockerfile
ports:
- '8086:443'
volumes:
- './docker/help/nginx.help.conf:/etc/nginx/nginx.conf'
healthcheck:
test: [ 'CMD-SHELL', 'curl http://127.0.0.1:443' ]
interval: 1m
volumes:
openstreetmap-data:
external: true
openstreetmap-rendered-tiles:
external: true