-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
85 lines (84 loc) · 2.31 KB
/
docker-compose.yml
File metadata and controls
85 lines (84 loc) · 2.31 KB
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
services:
nginx-harvest-source:
image: nginx
volumes:
- ./example_data:/usr/share/nginx/html
- ./nginx.conf:/etc/nginx/conf.d/default.conf
ports:
- "${HARVEST_SOURCE_PORT}:80"
db:
restart: always
image: postgis/postgis:latest
env_file:
- .env
environment:
PGPORT: ${DATABASE_PORT}
POSTGRES_USER: ${DATABASE_USER}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
POSTGRES_DB: ${DATABASE_NAME}
ports:
- "${DATABASE_PORT}:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 5s
timeout: 5s
retries: 5
opensearch:
image: opensearchproject/opensearch:2.11.1
environment:
discovery.type: single-node
cluster.routing.allocation.disk.threshold_enabled: "false"
ports:
- "9200:9200"
- "9600:9600"
healthcheck:
test: ['CMD-SHELL', 'curl -sk -u admin:admin https://localhost:9200/_cluster/health?wait_for_status=yellow\&timeout=1s | grep -q ''"timed_out":false''']
interval: 5s
timeout: 5s
retries: 12
start_period: 10s
transformer:
image: ghcr.io/gsa/mdtranslator:latest
restart: always
env_file:
- .env
environment:
MDTRANSLATOR_PORT: ${MDTRANSLATOR_PORT}
MDTRANSLATOR_URL: ${MDTRANSLATOR_URL}
ports:
- "${MDTRANSLATOR_PORT}:3000"
healthcheck:
test: "curl -I -X POST http://localhost:3000/translates | grep 422"
interval: 5s
timeout: 5s
retries: 5
app:
build: .
depends_on:
db:
condition: service_healthy
opensearch:
condition: service_healthy
transformer:
condition: service_healthy
volumes:
- .:/app
environment:
OPENSEARCH_HOST: opensearch
DATABASE_URI: postgresql+psycopg://${DATABASE_USER}:${DATABASE_PASSWORD}@db:${DATABASE_PORT}/${DATABASE_NAME}
CF_SERVICE_USER: ${CF_SERVICE_USER}
CF_SERVICE_AUTH: ${CF_SERVICE_AUTH}
FLASK_APP: run.py
FLASK_ENV: development
ports:
- "8080:8080"
command:
- /bin/sh
- -c
- |
flask db upgrade
flask run --host=0.0.0.0 --port=8080 --reload
volumes:
postgres_data: