-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
205 lines (193 loc) · 7.83 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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
version: "3.3"
services:
proxy:
depends_on:
- backend
- celery_worker
- tile_server
- landing_page
image: ${NS_ECOTEKA_PROXY_IMAGE:-traefik:v2.6}
networks:
- traefik
volumes:
- /var/run/docker.sock:/var/run/docker.sock
restart: always
labels:
- traefik.enable=true
db:
image: ${NS_ECOTEKA_DB_IMAGE:-postgis/postgis:14-master}
networks:
- traefik
volumes:
- app-db-data:/var/lib/postgresql/data/pgdata
restart: always
environment:
- PGDATA=/var/lib/postgresql/data/pgdata
- POSTGRES_DB=${NS_ECOTEKA_DB_NAME}
- POSTGRES_PASSWORD=${NS_ECOTEKA_DB_PASSWORD}
- POSTGRES_SERVER=${NS_ECOTEKA_DB_SERVER}
- POSTGRES_USER=${NS_ECOTEKA_DB_USER}
redis:
image: ${NS_ECOTEKA_REDIS_IMAGE}
restart: always
networks:
- traefik
volumes:
- ${NS_ECOTEKA_REDIS_VOLUME}:/data
celery_worker:
image: ecoteka-backend:dev
networks:
- traefik
command: bash /app/worker-start.sh
restart: always
volumes:
- ${NS_ECOTEKA_BACKEND_TILES_FOLDER}:/app/tiles
- ${NS_ECOTEKA_BACKEND_UPLOADED_FILES_FOLDER}:/app/app/uploaded_files
environment:
- DB_NAME=${NS_ECOTEKA_DB_NAME}
- DB_PASSWORD=${NS_ECOTEKA_DB_PASSWORD}
- DB_SERVER=${NS_ECOTEKA_DB_SERVER}
- DB_USER=${NS_ECOTEKA_DB_USER}
- EMAIL_RESET_TOKEN_EXPIRE_HOURS=${NS_ECOTEKA_BACKEND_EMAIL_RESET_TOKEN_EXPIRE_HOURS}
- EMAILS_ENABLED=${NS_ECOTEKA_BACKEND_EMAILS_ENABLED}
- EMAILS_FROM_EMAIL=${NS_ECOTEKA_BACKEND_EMAILS_FROM_EMAIL}
- EMAILS_FROM_NAME=${NS_ECOTEKA_BACKEND_PROJECT_NAME}
- EMAILS_TEMPLATES_DIR=${NS_ECOTEKA_BACKEND_EMAILS_TEMPLATES_DIR}
- EXTERNAL_PATH=${NS_ECOTEKA_BACKEND_EXTERNAL_PATH}
- FIRST_SUPERUSER_PASSWORD=${NS_ECOTEKA_BACKEND_FIRST_SUPERUSER_PASSWORD}
- FIRST_SUPERUSER=${NS_ECOTEKA_BACKEND_FIRST_SUPERUSER_EMAIL}
- FIRST_SUPERUSER_FULLNAME=${NS_ECOTEKA_BACKEND_FIRST_SUPERUSER_FULLNAME}
- SUPERUSERS_CONTACT_LIST=${NS_ECOTEKA_BACKEND_SUPERUSERS_CONTACT_LIST}
- PROJECT_NAME=${NS_ECOTEKA_BACKEND_PROJECT_NAME}
- ROOT_PATH=${NS_ECOTEKA_BACKEND_BASE_PATH}
- SERVER_HOST=https://${NS_ECOTEKA_DOMAIN_NAME}
- SERVER_NAME=${NS_ECOTEKA_DOMAIN_NAME}
- SMTP_HOST=${NS_ECOTEKA_BACKEND_SMTP_HOST}
- SMTP_PASSWORD=${NS_ECOTEKA_BACKEND_SMTP_PASSWORD}
- SMTP_PORT=${NS_ECOTEKA_BACKEND_SMTP_PORT}
- SMTP_TLS=${NS_ECOTEKA_BACKEND_SMTP_TLS}
- SMTP_USER=${NS_ECOTEKA_BACKEND_SMTP_USER}
- SECRET_KEY=${NS_ECOTEKA_BACKEND_SECRET_KEY}
- TILES_FOLDER=${NS_ECOTEKA_BACKEND_TILES_FOLDER}
- TILES_SERVER=${NS_ECOTEKA_BACKEND_TILES_SERVER}
- CELERY_BROKER_URL=${NS_ECOTEKA_BACKEND_CELERY_BROKER_URL}
- CELERY_BACKEND=${NS_ECOTEKA_BACKEND_CELERY_BACKEND}
- MEILI_API_URL=http://meilisearch:7700
- MEILI_MASTER_KEY=${NS_ECOTEKA_MEILISEARCH_MASTER_KEY}
backend:
image: ecoteka-backend:dev
restart: always
networks:
- traefik
volumes:
- ${NS_ECOTEKA_BACKEND_TILES_FOLDER}:/app/tiles
- ${NS_ECOTEKA_BACKEND_UPLOADED_FILES_FOLDER}:/app/app/uploaded_files
labels:
- traefik.enable=true
- traefik.http.routers.backend.rule=PathPrefix(`${NS_ECOTEKA_BACKEND_BASE_PATH}`)
- traefik.http.routers.backend.middlewares=api-stripprefix
- traefik.http.middlewares.api-stripprefix.stripprefix.prefixes=${NS_ECOTEKA_BACKEND_BASE_PATH}
- traefik.http.services.backend.loadbalancer.server.port=80
environment:
- DB_NAME=${NS_ECOTEKA_DB_NAME}
- DB_PASSWORD=${NS_ECOTEKA_DB_PASSWORD}
- DB_SERVER=${NS_ECOTEKA_DB_SERVER}
- DB_USER=${NS_ECOTEKA_DB_USER}
- EMAIL_RESET_TOKEN_EXPIRE_HOURS=${NS_ECOTEKA_BACKEND_EMAIL_RESET_TOKEN_EXPIRE_HOURS}
- EMAILS_ENABLED=${NS_ECOTEKA_BACKEND_EMAILS_ENABLED}
- EMAILS_FROM_EMAIL=${NS_ECOTEKA_BACKEND_EMAILS_FROM_EMAIL}
- EMAILS_FROM_NAME=${NS_ECOTEKA_BACKEND_PROJECT_NAME}
- EMAILS_TEMPLATES_DIR=${NS_ECOTEKA_BACKEND_EMAILS_TEMPLATES_DIR}
- EXTERNAL_PATH=${NS_ECOTEKA_BACKEND_EXTERNAL_PATH}
- FIRST_SUPERUSER_PASSWORD=${NS_ECOTEKA_BACKEND_FIRST_SUPERUSER_PASSWORD}
- FIRST_SUPERUSER=${NS_ECOTEKA_BACKEND_FIRST_SUPERUSER_EMAIL}
- FIRST_SUPERUSER_FULLNAME=${NS_ECOTEKA_BACKEND_FIRST_SUPERUSER_FULLNAME}
- SUPERUSERS_CONTACT_LIST=${NS_ECOTEKA_BACKEND_SUPERUSERS_CONTACT_LIST}
- PROJECT_NAME=${NS_ECOTEKA_BACKEND_PROJECT_NAME}
- ROOT_PATH=${NS_ECOTEKA_BACKEND_BASE_PATH}
- SERVER_HOST=https://${NS_ECOTEKA_DOMAIN_NAME}
- SERVER_NAME=${NS_ECOTEKA_DOMAIN_NAME}
- SMTP_HOST=${NS_ECOTEKA_BACKEND_SMTP_HOST}
- SMTP_PASSWORD=${NS_ECOTEKA_BACKEND_SMTP_PASSWORD}
- SMTP_PORT=${NS_ECOTEKA_BACKEND_SMTP_PORT}
- SMTP_TLS=${NS_ECOTEKA_BACKEND_SMTP_TLS}
- SMTP_USER=${NS_ECOTEKA_BACKEND_SMTP_USER}
- SECRET_KEY=${NS_ECOTEKA_BACKEND_SECRET_KEY}
- TILES_FOLDER=${NS_ECOTEKA_BACKEND_TILES_FOLDER}
- TILES_SERVER=${NS_ECOTEKA_BACKEND_TILES_SERVER}
- CELERY_BROKER_URL=${NS_ECOTEKA_BACKEND_CELERY_BROKER_URL}
- CELERY_BACKEND=${NS_ECOTEKA_BACKEND_CELERY_BACKEND}
- MEILI_API_URL=http://meilisearch:7700
- MEILI_MASTER_KEY=${NS_ECOTEKA_MEILISEARCH_MASTER_KEY}
frontend:
image: ecoteka-frontend:dev
restart: always
networks:
- traefik
labels:
- traefik.enable=true
- traefik.http.routers.frontend.rule=PathPrefix(`/`)
environment:
- API_URL=${NS_ECOTEKA_BACKEND_EXTERNAL_PATH}
- TOKEN_STORAGE=${NS_ECOTEKA_FRONTEND_TOKEN_STORAGE}
- REFRESH_TOKEN_STORAGE=${NS_ECOTEKA_FRONTEND_REFRESH_TOKEN_STORAGE}
- MEILI_API_URL=${NS_ECOTEKA_MEILISEARCH_API_URL}
- MEILI_MASTER_KEY=${NS_ECOTEKA_MEILISEARCH_MASTER_KEY}
- MAPILLARY_API_CLIENT=${NS_ECOTEKA_FRONTEND_MAPILLARY_API_CLIENT}
- GOOGLE_ANALYTICS=${NS_ECOTEKA_FRONTEND_GOOGLE_ANALYTICS}
- COOKIE_CONSENT=${NS_ECOTEKA_FRONTEND_COOKIE_CONSENT}
landing_page:
image: ${NS_ECOTEKA_LANDING_PAGE_IMAGE}
restart: always
networks:
- traefik
environment:
- STUDIO_URL=https://${NS_ECOTEKA_STUDIO_DOMAIN_NAME}
labels:
- traefik.enable=true
- traefik.http.routers.landing_page.rule=PathPrefix(`/lp`)
- traefik.http.services.landing_page.loadbalancer.server.port=3000
- traefik.http.routers.landing_page.middlewares=landing_page-stripprefix
- traefik.http.middlewares.landing_page-stripprefix.stripprefix.prefixes=/lp
osm_thumbnails:
image: ${NS_ECOTEKA_OSM_THUMBNAILS_IMAGE}
restart: always
networks:
- traefik
labels:
- traefik.enable=true
- traefik.http.routers.osm_thumbnails.rule=PathPrefix(`/osm_thumbnails`)
- traefik.http.routers.osm_thumbnails.middlewares=osm_thumbnails-stripprefix
- traefik.http.middlewares.osm_thumbnails-stripprefix.stripprefix.prefixes=/osm_thumbnails
environment:
- REDIS_HOST=${NS_ECOTEKA_OSM_THUMBNAILS_REDIS_HOST}
tile_server:
restart: always
image: ${NS_ECOTEKA_TILE_SERVER_IMAGE}
networks:
- traefik
labels:
- traefik.enable=true
- traefik.http.routers.tile_server.rule=PathPrefix(`/tiles`)
volumes:
- ${NS_ECOTEKA_TILE_SERVER_PUBLIC_FOLDER}:/tiles/public
- ${NS_ECOTEKA_TILE_SERVER_PRIVATE_FOLDER}:/tiles/private
environment:
- KEY_SECRET=${NS_ECOTEKA_BACKEND_SECRET_KEY}
meilisearch:
image: ${NS_ECOTEKA_MEILISEARCH_IMAGE}
networks:
- traefik
labels:
- traefik.enable=true
- traefik.http.routers.meilisearch.rule=PathPrefix(`/meilisearch`)
- traefik.http.services.meilisearch.loadbalancer.server.port=7700
- traefik.http.routers.meilisearch.middlewares=meilisearch-stripprefix
- traefik.http.middlewares.meilisearch-stripprefix.stripprefix.prefixes=/meilisearch
environment:
- MEILI_NO_SENTRY=true
volumes:
app-db-data:
networks:
traefik:
external: true