generated from CDCgov/template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yml
78 lines (75 loc) · 2.49 KB
/
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
services:
db:
# The PostgreSQL database that is used to store the patient and person data
image: "postgres:13-alpine"
environment:
POSTGRES_PASSWORD: "pw"
ports:
- "5432:5432"
volumes:
- ./tests/performance/conf/postgresql.conf:/etc/postgresql/postgresql.conf
- ./tests/performance/conf/init.sql:/docker-entrypoint-initdb.d/init.sql
- ./tests/performance/tmp/results/psql/:/var/log/psql/
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
jaeger:
# The Jaeger all-in-one container that is used to collect, store and visualize
# the traces of the service(s).
image: "jaegertracing/all-in-one:latest"
ports:
- "16686:16686"
healthcheck:
test: ["CMD-SHELL", "nc -z localhost 16686"]
api:
# The record linkage API that we are developing
build:
context: .
args:
ENVIRONMENT: dev
PORT: 8080
USE_OTEL: ${USE_OTEL:-true}
USE_MSSQL: ${USE_MSSQL:-false}
LOG_CONFIG: ""
ports:
- "8080:8080"
environment:
DB_URI: "postgresql+psycopg2://postgres:pw@db:5432/postgres"
TEST_DB_URI: "sqlite:///:memory:"
OTEL_TRACES_EXPORTER: "otlp"
OTEL_EXPORTER_OTLP_ENDPOINT: "http://jaeger:4317"
command: >
opentelemetry-instrument --service_name recordlinker
uvicorn recordlinker.main:app --app-dir src
--host 0 --port 8080
depends_on:
db:
condition: service_healthy
jaeger:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/"]
perf-runner:
# The orchestration container of the environment that is used to initialize
# run the tests. This container will eventually use Synthea to generate
# synthetic data, transform it into FHIR payloads acceptable by the linkage
# API and then run the tests.
profiles:
- perf
build:
context: tests/performance
dockerfile: Dockerfile.runner
env_file:
- tests/performance/rlpt.env
environment:
DB_URL: "postgres://postgres:pw@db:5432/postgres"
LINKAGE_API_URL: "http://api:8080"
SYNTHEA_OUTPUT_DIR: "results/synthea_output/"
POSTGRES_LOG: "/code/results/psql/postgresql.log"
PGBADGER_REPORT: "/code/results/psql/pgbadger.html"
volumes:
- ./tests/performance/scripts:/code/scripts
- ./tests/performance/tmp/results:/code/results
- ./tests/performance/tmp/data:/code/data
depends_on:
api:
condition: service_healthy