-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-htsget.yml
142 lines (135 loc) · 3.69 KB
/
docker-compose-htsget.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
services:
server:
image: harbor.nbis.se/gdi/htsget-refserver:0.1.0
container_name: htsget-server
command:
- /usr/src/app/htsget-refserver
- -config
- /config/config.json
networks:
- public
- secure
ports:
- 3000:3000
volumes:
# If you want to start the docker compose without tls, remove the line below,
# remove the starter-kit-storage-and-interfaces_shared volume from the bottom
# of the file and the relevant configuration from the config-htsget/config.json
# file, which are the lines for serverCert and serverKey.
# The TLS version assumes that this compose file is running along with the
# storage and interfaces.
# If you want to run the htsget with TLS but without the storage and interfaces,
# add the certificates in the volume below
- starter-kit-storage-and-interfaces_shared:/shared
- ./config-htsget:/config # copy any *.json.example files to *.json beforehand
- ./logs:/logs
extra_hosts:
- dockerhost:host-gateway
client:
image: python:3.11-slim
container_name: htsget-client
networks:
- public
- secure
command:
- /bin/bash
- -c
- apt update; apt install -y curl;
if ! which htsget >/dev/null; then pip install htsget; fi;
while true; do sleep 250; done
extra_hosts:
- dockerhost:host-gateway
samtools:
image: staphb/samtools:1.17
container_name: samtools-client
networks:
- public
- secure
command:
- /bin/bash
- -c
- apt update; apt install -y curl jq;
while true; do sleep 250; done
volumes:
- starter-kit-storage-and-interfaces_shared:/shared
extra_hosts:
- dockerhost:host-gateway
s3public:
profiles: ["demo"]
command: server /data --console-address ":9001"
container_name: s3public
depends_on:
server:
condition: service_started
environment:
- MINIO_ROOT_USER=access
- MINIO_ROOT_PASSWORD=secretkey
- MINIO_SERVER_URL=http://127.0.0.1:9000
healthcheck:
test:
[
"CMD",
"curl",
"-fq",
"http://localhost:9000/minio/health/live"
]
interval: 5s
timeout: 20s
retries: 3
image: minio/minio:RELEASE.2023-02-10T18-48-39Z
networks:
- secure
ports:
- "9003:9000"
- "9004:9001"
restart: always
volumes:
- s3pubdata:/data
createbucket:
profiles: ["demo"]
image: minio/mc
container_name: mc-s3
depends_on:
s3public:
condition: service_started
networks:
- secure
entrypoint: >
/bin/sh -c "
sleep 10;
/usr/bin/mc -q config host add s3 http://s3public:9000 access secretkey;
/usr/bin/mc -q mb s3/inbox;
/usr/bin/mc anonymous set public s3/inbox;
/usr/bin/mc cp /data/NA12878.bam s3/inbox/NA12878.bam;
exit 0;
"
volumes:
- ./demo-data:/data
data_downloader:
profiles: ["demo"]
image: staphb/samtools:1.17
container_name: data-downloader
depends_on:
createbucket:
condition: service_completed_successfully
networks:
- public
- secure
command:
- /bin/bash
- -c
- export HTS_ALLOW_UNENCRYPTED_AUTHORIZATION_HEADER="I understand the risks";
export HTS_AUTH_LOCATION=token.txt;
echo "some-token" > token.txt;
apt update; apt install -y curl jq;
samtools view -b http://server:3000/reads/pub/NA12878.bam > NA12878.bam;
exit 0;
volumes:
- ./output:/data
volumes:
s3pubdata:
starter-kit-storage-and-interfaces_shared:
external: true
networks:
public:
secure: