-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yml
39 lines (38 loc) · 1.2 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
services:
keymaker:
image: golang:alpine3.16
volumes:
- keys:/keys
command:
- "/bin/sh"
- "-c"
- if [ ! -f "/keys/c4gh.sec.pem" ]; then git --help >/dev/null 2>&1; [[ "$$?" != "0" ]] && apk add git;
[ ! -d "crypt4gh" ] && git clone https://github.com/neicnordic/crypt4gh.git;
cd crypt4gh;
[ ! -f "crypt4gh" ] && go build .;
./crypt4gh generate -n c4gh -p 'pass' && mv *.pem /keys/; fi;
[ ! -f /keys/jwt.key ] && apk add openssl && openssl ecparam -name prime256v1 -genkey -noout -out /keys/jwt.key && chmod 644 /keys/jwt.key || true
uppmax-integration:
build:
context: .
depends_on:
keymaker:
condition: service_completed_successfully
environment:
- LOG_LEVEL=debug
- GLOBAL_CRYPT4GHKEY=/keys/c4gh.sec.pem
- GLOBAL_EGAUSER=sda
- GLOBAL_EGAPASSWORD=pass
- GLOBAL_EGAURL=http://ega.dev
- GLOBAL_EXPIRATIONDAYS=14
- GLOBAL_ISS=https://login.sda.dev
- GLOBAL_JWTKEY=/keys/jwt.key
- GLOBAL_S3URL=inbox.sda.dev
- GLOBAL_UPPMAXUSERNAME=uppmax
- GLOBAL_UPPMAXPASSWORD=uppmax
volumes:
- keys:/keys
ports:
- 8080:8080
volumes:
keys: