-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
176 lines (164 loc) · 5.12 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
version: "3"
services:
# webserver to handle all traffic. This can use let's encrypt to generate a SSL cert.
traefik:
image: traefik:2.4
command:
- --entrypoints.web.address=:80
- --entrypoints.websecure.address=:443
- --api=true
- --api.insecure=true
- --api.dashboard=true
- --providers.docker=true
- --providers.docker.network=bmp
- --providers.docker.exposedByDefault=false
restart: unless-stopped
networks:
- bmp
ports:
- "${TRAEFIK_HTTP_PORT-80}:80"
- "${TRAEFIK_HTTPS_PORT-443}:443"
labels:
- traefik.enable=true
- traefik.http.routers.dashboard.service=api@internal
- traefik.http.routers.dashboard.rule=Host(`${TRAEFIK_HOST:-localhost}`)
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
postgres:
image: postgis/postgis:13-3.1-alpine
environment:
- POSTGRES_DB=${DB_NAME:-gltg-bmp}
- POSTGRES_USER=${DB_USER:-postgres}
- POSTGRES_PASSWORD=${DB_PASSWORD}
networks:
- bmp
volumes:
- postgis:/var/lib/postgresql/data
restart: unless-stopped
# main clowder application
clowder:
image: clowder/clowder:1.17
restart: unless-stopped
networks:
- bmp
depends_on:
- rabbitmq
- mongo
environment:
- CLOWDER_ADMINS=${CLOWDER_ADMINS:-admin@example.com}
- CLOWDER_REGISTER=${CLOWDER_REGISTER:-false}
- CLOWDER_CONTEXT=${CLOWDER_CONTEXT:-/clowder}
- CLOWDER_SSL=${CLOWDER_SSL:-false}
- RABBITMQ_URI=amqp://${RABBITMQ_DEFAULT_USER:-guest}:${RABBITMQ_DEFAULT_PASS:-guest}@rabbitmq/%2F
- RABBITMQ_EXCHANGE=${RABBITMQ_EXCHANGE:-clowder}
- RABBITMQ_CLOWDERURL=${CLOWDER_URL:-http://clowder:9000}${CLOWDER_CONTEXT:-/clowder}
- SMTP_MOCK=${SMTP_MOCK:-true}
- SMTP_SERVER=${SMTP_SERVER:-smtp}
labels:
- traefik.enable=true
- traefik.http.services.clowder.loadbalancer.server.port=9000
- traefik.http.routers.clowder.rule=PathPrefix(`${CLOWDER_CONTEXT:-/clowder}`)
- traefik.http.routers.clowder.entrypoints=web
volumes:
- ./docker/volumes/clowder/data:/home/clowder/data
# Clowder database to hold metadata (required)
mongo:
image: mongo:3.6
restart: unless-stopped
networks:
- bmp
volumes:
- mongo-config:/data/configdb
- mongo-data:/data/db
# Clowder message broker (optional but needed for extractors)
rabbitmq:
image: rabbitmq:management-alpine
restart: unless-stopped
networks:
- bmp
environment:
- RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS=-rabbitmq_management path_prefix "/rabbitmq"
- DEFAULT_USER=${RABBITMQ_DEFAULT_USER:-guest}
- DEFAULT_PASS=${RABBITMQ_DEFAULT_PASS:-guest}
volumes:
- rabbitmq:/var/lib/rabbitmq
elasticsearch:
image: elasticsearch:2
command: elasticsearch -Des.cluster.name="clowder"
networks:
- bmp
restart: unless-stopped
environment:
- cluster.name=clowder
volumes:
- elasticsearch:/usr/share/elasticsearch/data
# monitor clowder extractors
clowder_monitor:
image: clowder/monitor:1.17
restart: unless-stopped
networks:
- bmp
depends_on:
- rabbitmq
environment:
- RABBITMQ_URI=amqp://${RABBITMQ_DEFAULT_USER:-guest}:${RABBITMQ_DEFAULT_PASS:-guest}@rabbitmq:5672/%2F
- RABBITMQ_MGMT_PORT=15672
- RABBITMQ_MGMT_PATH=/rabbitmq
labels:
- traefik.enable=true
- traefik.http.services.clowder_monitor.loadbalancer.server.port=9999
- traefik.http.routers.clowder_monitor.rule=PathPrefix(`${CLOWDER_MONITOR:-/monitor}`)
- traefik.http.routers.clowder_monitor.entrypoints=web
bmp_api:
build:
context: .
depends_on:
- postgres
command: ["python", "api/app.py", "run" ]
networks:
- bmp
environment:
- API_DEBUG=${API_DEBUG}
- API_PORT=${API_PORT:-8000}
- API_LOG_LEVEL=${API_LOG_LEVEL:-ERROR}
- DB_HOST=${DB_HOST:-postgres}
- DB_PORT=${DB_PORT:-5432}
- DB_NAME=${DB_NAME:-gltg-bmp}
- USER_USER=${DB_USER:-postgres}
- DB_PASSWORD=${DB_PASSWORD}
volumes:
- .:/home/gltg-bmp
labels:
- traefik.enable=true
- traefik.http.services.bmp_api.loadbalancer.server.port=${API_PORT:-8000}
- traefik.http.routers.bmp_api.rule=PathPrefix(`${API_CONTEXT:-/bmp-api}`)
- traefik.http.routers.bmp_api.entrypoints=web
bmp_extractor:
build:
context: .
command: ["python", "-m", "extractor.practices_extractor"]
depends_on:
- rabbitmq
- clowder_monitor
environment:
- CLOWDER_URL=${CLOWDER_URL:-http://clowder:9000}${CLOWDER_CONTEXT:-/clowder}
- RABBITMQ_URI=amqp://${RABBITMQ_DEFAULT_USER:-guest}:${RABBITMQ_DEFAULT_PASS:-guest}@rabbitmq:5672/%2F
- RABBITMQ_EXCHANGE=clowder
- DB_HOST=${DB_HOST:-postgres}
- DB_PORT=${DB_PORT:-5432}
- DB_NAME=${DB_NAME:-gltg-bmp}
- DB_USER=${DB_USER:-postgres}
- DB_PASSWORD=${DB_PASSWORD}
restart: unless-stopped
networks:
- bmp
volumes:
- .:/home/gltg-bmp
networks:
bmp:
volumes:
elasticsearch:
mongo-config:
mongo-data:
postgis:
rabbitmq: