Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
69 lines (63 loc) · 2.25 KB
/
Copy pathdocker-compose.yml
File metadata and controls
69 lines (63 loc) · 2.25 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
# Compose for the runnable pieces of lab-informatics.
# docker compose up lablink -> capture API + dashboard on :8000
# docker compose up analytics -> seeds, dbt build, docs on :8080
# docker compose up review-ui -> trajectory review surface on :8081
# docker compose up lims-demo -> one-shot demo run, writes results/
# docker compose run verify -> all three test suites in the image
services:
lablink:
build: .
command: python -m lablink.demo
environment:
# API must bind beyond loopback inside a container; the emulated
# SCPI instrument stays on loopback.
LABLINK_API_HOST: 0.0.0.0
LABLINK_DB: /data/lablink.db
# Setpoint writes are gated on this bearer token.
LABLINK_API_TOKEN: ${LABLINK_API_TOKEN:?set LABLINK_API_TOKEN}
volumes:
- lablink-data:/data
ports:
- "8000:8000"
lims-demo:
build: .
working_dir: /app/labStackDev
command: python lims/demo_lims.py
volumes:
# Artifacts land back on the host under labStackDev/results/.
- ./labStackDev/results:/app/labStackDev/results
analytics:
build: .
working_dir: /app/analytics
command: >
sh -c "python generate_fixtures.py
&& dbt seed --profiles-dir .
&& dbt build --profiles-dir .
&& dbt docs generate --profiles-dir .
&& python -m http.server 8080 --directory target"
ports:
- "8080:8080"
depends_on:
- lablink
# Review surface: the traj_review_ui static build from trust-tools,
# vendored under review_ui/ (see README for the refresh command).
# nginx-alpine is the only service not built from the repo Dockerfile.
review-ui:
image: nginx:alpine
volumes:
- ./review_ui:/usr/share/nginx/html:ro
ports:
- "8081:80"
depends_on:
- lablink
# Runs every package's tests inside the image — the Dockerfile doubles
# as the reproducible test environment. Exits non-zero on failure.
verify:
build: .
command: >
sh -c "cd labStackDev && python -m pytest -q tests/
&& cd ../lab_instrument_gateway && python -m pytest -q tests/
&& cd ../analytics && python generate_fixtures.py
&& dbt build --profiles-dir ."
volumes:
lablink-data: