forked from hotosm/fmtm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
192 lines (181 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
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
# Copyright (c) 2022, 2023 Humanitarian OpenStreetMap Team
# This file is part of FMTM.
#
# FMTM is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# FMTM is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with FMTM. If not, see <https:#www.gnu.org/licenses/>.
#
version: "3"
volumes:
fmtm_db_data:
fmtm_images:
central_db_data:
networks:
fmtm-dev:
services:
fmtm-db:
image: "postgis/postgis:14-3.3-alpine"
container_name: fmtm_db
volumes:
- fmtm_db_data:/var/lib/postgresql/data/
environment:
- POSTGRES_USER=${FMTM_DB_USER:-fmtm}
- POSTGRES_PASSWORD=${FMTM_DB_PASSWORD:-fmtm}
- POSTGRES_DB=${FMTM_DB_NAME:-fmtm}
ports:
- "5432:5432"
networks:
- fmtm-dev
restart: unless-stopped
api:
image: "ghcr.io/hotosm/fmtm/backend:debug"
build:
context: src/backend
target: debug-with-odk
args:
APP_VERSION: debug
container_name: fmtm_api
volumes:
- fmtm_images:/opt/app/images
- ./src/backend/app:/opt/app
depends_on:
- fmtm-db
- central-proxy
env_file:
- .env
ports:
- "8000:8000"
- "5678:5678"
networks:
- fmtm-dev
restart: unless-stopped
ui-main:
image: "ghcr.io/hotosm/fmtm/frontend/main:debug"
build:
context: src/frontend
dockerfile: debug.dockerfile
args:
APP_NAME: main
API_URL: ${URL_SCHEME}://${API_URL}
FRONTEND_MAIN_URL: ${URL_SCHEME}://${FRONTEND_MAIN_URL}
FRONTEND_MAP_URL: ${URL_SCHEME}://${FRONTEND_MAP_URL}
container_name: fmtm_main
depends_on:
- api
volumes:
- ./src/frontend/main:/app
- /app/node_modules/
environment:
- API_URL=${URL_SCHEME}://${API_URL}
- FRONTEND_MAIN_URL=${URL_SCHEME}://${FRONTEND_MAIN_URL}
- FRONTEND_MAP_URL=${URL_SCHEME}://${FRONTEND_MAP_URL}
ports:
- "8080:8080"
networks:
- fmtm-dev
restart: unless-stopped
ui-map:
image: "ghcr.io/hotosm/fmtm/frontend/map:debug"
build:
context: src/frontend
dockerfile: debug.dockerfile
args:
APP_NAME: fmtm_openlayer_map
API_URL: ${URL_SCHEME}://${API_URL}
FRONTEND_MAIN_URL: ${URL_SCHEME}://${FRONTEND_MAIN_URL}
FRONTEND_MAP_URL: ${URL_SCHEME}://${FRONTEND_MAP_URL}
container_name: fmtm_map
depends_on:
- api
volumes:
- ./src/frontend/fmtm_openlayer_map:/app
- /app/node_modules/
environment:
- API_URL=${URL_SCHEME}://${API_URL}
- FRONTEND_MAIN_URL=${URL_SCHEME}://${FRONTEND_MAIN_URL}
- FRONTEND_MAP_URL=${URL_SCHEME}://${FRONTEND_MAP_URL}
ports:
- "8081:8081"
networks:
- fmtm-dev
restart: unless-stopped
central-db:
image: "postgis/postgis:14-3.3-alpine"
container_name: central_db
volumes:
- central_db_data:/var/lib/postgresql/data/
environment:
- POSTGRES_USER=${CENTRAL_DB_USER:-odk}
- POSTGRES_PASSWORD=${CENTRAL_DB_PASSWORD:-odk}
- POSTGRES_DB=${CENTRAL_DB_NAME:-odk}
ports:
- "5433:5432"
networks:
- fmtm-dev
restart: unless-stopped
central:
image: "ghcr.io/hotosm/fmtm/odkcentral:v2023.2.1"
build:
context: odkcentral/api
args:
ODK_CENTRAL_VERSION: v2023.2.1
container_name: central_api
depends_on:
- central-db
- pyxform
environment:
- DOMAIN=local
- SYSADMIN_EMAIL=${ODK_CENTRAL_USER}
- SYSADMIN_PASSWD=${ODK_CENTRAL_PASSWD}
- HTTPS_PORT=${HTTPS_PORT:-443}
- DB_HOST=${CENTRAL_DB_HOST:-postgres14}
- DB_USER=${CENTRAL_DB_USER:-odk}
- DB_PASSWORD=${CENTRAL_DB_PASSWORD:-odk}
- DB_NAME=${CENTRAL_DB_NAME:-odk}
- DB_SSL=${DB_SSL:-null}
- EMAIL_FROM=${ODK_CENTRAL_USER}
- EMAIL_HOST=${EMAIL_HOST:-mail}
- EMAIL_PORT=${EMAIL_PORT:-25}
- EMAIL_SECURE=${EMAIL_SECURE:-false}
- EMAIL_IGNORE_TLS=${EMAIL_IGNORE_TLS:-true}
- EMAIL_USER=${EMAIL_USER:-''}
- EMAIL_PASSWORD=${EMAIL_PASSWORD:-''}
- SENTRY_ORG_SUBDOMAIN=${SENTRY_ORG_SUBDOMAIN:-o130137}
- SENTRY_KEY=${SENTRY_KEY:-3cf75f54983e473da6bd07daddf0d2ee}
- SENTRY_PROJECT=${SENTRY_PROJECT:-1298632}
ports:
- "8383:8383"
networks:
- fmtm-dev
command:
[
"./wait-for-it.sh",
"${CENTRAL_DB_HOST:-central-db}:5432",
"--",
"./init-user-and-start.sh",
]
restart: unless-stopped
central-proxy:
image: "ghcr.io/hotosm/fmtm/odkcentral-proxy:latest"
build:
context: odkcentral/proxy
container_name: central_proxy
depends_on:
- central
networks:
- fmtm-dev
restart: unless-stopped
pyxform:
image: "ghcr.io/getodk/pyxform-http:v1.10.1.1"
networks:
- fmtm-dev
restart: always