-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
77 lines (75 loc) · 1.9 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
services:
# Run SERIE in development mode in an existing miniChRIS network.
dev:
build:
context: .
command: fastapi dev --host 0.0.0.0 main.py
volumes:
- ./src:/app:ro
ports:
- 8888:8000
networks:
minichris-local:
aliases:
- dev.serie
# End-to-end testing
test:
image: localhost/fnndsc/serie:dev
build: &build
context: .
args:
REQUIREMENTS_FILE: requirements-dev.lock
command: pytest --color=yes --code-highlight=yes --run-integration
working_dir: /app
volumes:
# /app is a volume and the source code files are binded as subdirectories
# instead of directly mounting `.:/app` so that pytest and coverage can
# write temporary files to /app
- test:/app
- ./src/serie:/app/serie:ro
- ./tests:/app/tests:ro
- ./hasura:/hasura:ro
environment:
CHRIS_HOST: http://chris:8000
networks:
minichris-local:
aliases:
- test.serie
# Setup and test reset functions should be described here
depends_on:
setup-hasura:
condition: service_completed_successfully
setup-and-reset-cube:
condition: service_completed_successfully
profiles:
- test
setup-hasura:
image: ghcr.io/fnndsc/hasura-cli:2.44.0
command: hasura metadata apply
volumes:
- ./hasura:/hasura:ro
working_dir: /hasura
networks:
minichris-local:
profiles:
- test
setup-and-reset-cube:
image: localhost/fnndsc/serie:dev
build: *build
volumes:
- ./src/serie:/app/serie:ro
- ./tests:/app/tests:ro
- /var/run/docker.sock:/var/run/docker.sock
working_dir: /app
command: python -m tests.e2e_setup_and_reset
environment:
CHRIS_HOST: http://chris:8000
networks:
minichris-local:
profiles:
- test
networks:
minichris-local:
external: true
volumes:
test: