-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
62 lines (61 loc) · 1.62 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
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:
image: postgres:latest
restart: always
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
transformer:
image: ghcr.io/gsa/mdtranslator:latest
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
transformer:
condition: service_healthy
volumes:
- .:/app
environment:
DATABASE_URI: postgresql://${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: flask run --host=0.0.0.0 --port=8080 --reload
volumes:
postgres_data: