-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose-prod-deploy.yaml
146 lines (140 loc) · 5.03 KB
/
docker-compose-prod-deploy.yaml
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
services:
traefik:
image: "traefik:v2.9"
restart: always
container_name: "traefik"
command:
- "--log.level=DEBUG"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--api.insecure=false"
- "--api.dashboard=false"
- "--entrypoints.web.address=:80"
- "--entrypoints.web.http.redirections.entryPoint.to=websecure"
- "--entrypoints.web.http.redirections.entryPoint.scheme=https"
- "--entrypoints.web.http.redirections.entryPoint.permanent=true"
- "--entrypoints.websecure.address=:443"
- "--certificatesresolvers.certresolverone.acme.tlschallenge=true"
- "--certificatesresolvers.certresolverone.acme.email=tom.russell@ouce.ox.ac.uk"
- "--certificatesresolvers.certresolverone.acme.storage=/letsencrypt/acme.json"
ports:
- "80:80"
- "443:443"
volumes:
- "./letsencrypt:/letsencrypt"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
cpus: 0.25
mem_reservation: "50M"
mem_limit: "250M"
web-server:
image: ghcr.io/nismod/irv-frontend:0.32
restart: always
expose:
- "80"
volumes:
- ./irv-autopkg/packages:/usr/share/nginx/html/packages
labels:
- "traefik.enable=true"
- "traefik.http.routers.web-server.rule=Host(`global.infrastructureresilience.org`)"
- "traefik.http.routers.web-server.entrypoints=websecure"
- "traefik.http.routers.web-server.tls.certresolver=certresolverone"
- "traefik.http.services.web-server.loadbalancer.server.port=80"
cpus: 0.25
mem_reservation: "50M"
mem_limit: "250M"
backend:
image: ghcr.io/nismod/gri-backend:1.5.0
restart: always
volumes:
- ./tileserver/raster/data:/data
env_file:
- ./envs/prod/.backend.env
expose:
- "8888"
labels:
- "traefik.enable=true"
- "traefik.http.routers.backend.rule=Host(`global.infrastructureresilience.org`) && PathPrefix(`/api`)"
- "traefik.http.routers.backend.entrypoints=websecure"
- "traefik.http.routers.backend.tls.certresolver=certresolverone"
- "traefik.http.routers.backend.middlewares=backend-stripprefix"
- "traefik.http.middlewares.backend-stripprefix.stripprefix.prefixes=/api"
- "traefik.http.services.backend.loadbalancer.server.port=8888"
cpus: 0.5
mem_reservation: "50M"
mem_limit: "500M"
vector-tileserver:
image: ghcr.io/nismod/gri-vector-tileserver:0.10
restart: always
command:
[
"tileserver-gl-light",
"-c",
"config.json",
"-p",
"8080",
"--verbose",
"-u",
"https://global.infrastructureresilience.org/vector",
]
volumes:
- ./tileserver/vector/data:/data
- ./vector-tileserver/config.json:/config.json
expose:
- "8080"
labels:
- "traefik.enable=true"
- "traefik.http.routers.vector-tileserver.rule=Host(`global.infrastructureresilience.org`) && PathPrefix(`/vector`)"
- "traefik.http.routers.vector-tileserver.entrypoints=websecure"
- "traefik.http.routers.vector-tileserver.tls.certresolver=certresolverone"
- "traefik.http.routers.vector-tileserver.middlewares=vector-tileserver-stripprefix"
- "traefik.http.middlewares.vector-tileserver-stripprefix.stripprefix.prefixes=/vector"
- "traefik.http.services.vector-tileserver.loadbalancer.server.port=8080"
cpus: 0.5
mem_reservation: "50M"
mem_limit: "500M"
redis:
image: ghcr.io/nismod/irv-autopkg-redis:0.1
user: autopkg
restart: always
command: redis-server --save 20 1 --loglevel notice
volumes:
- ./irv-autopkg/redis:/data
cpus: 1.0
mem_reservation: "250M"
mem_limit: "1G"
irv-autopkg-worker:
image: ghcr.io/nismod/irv-autopkg:0.2.7
restart: always
user: autopkg
volumes:
- ./irv-autopkg/packages:/data/packages
- ./irv-autopkg/processing:/data/processing
env_file:
- envs/prod/.irv-autopkg.env
command: celery --app dataproc.tasks worker
cpus: 1.0
mem_reservation: "500M"
mem_limit: "2G"
irv-autopkg-api:
image: ghcr.io/nismod/irv-autopkg:0.2.7
restart: always
user: autopkg
volumes:
- ./irv-autopkg/packages:/data/packages
- ./irv-autopkg/processing:/data/processing
env_file:
- envs/prod/.irv-autopkg.env
ports:
- 8000:8000
command: uvicorn api.main:app --workers 2 --host 0.0.0.0 --port 8000 --root-path /extract
labels:
- "traefik.enable=true"
- "traefik.http.routers.irv-autopkg-api.rule=Host(`global.infrastructureresilience.org`) && PathPrefix(`/extract`)"
- "traefik.http.routers.irv-autopkg-api.entrypoints=websecure"
- "traefik.http.routers.irv-autopkg-api.tls.certresolver=certresolverone"
- "traefik.http.routers.irv-autopkg-api.middlewares=irv-autopkg-api-stripprefix"
- "traefik.http.middlewares.irv-autopkg-api-stripprefix.stripprefix.prefixes=/extract"
- "traefik.http.services.irv-autopkg-api.loadbalancer.server.port=8000"
cpus: 0.5
mem_reservation: "250M"
mem_limit: "500M"