This repository has been archived by the owner on Jun 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yml
128 lines (121 loc) · 3.09 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
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
services:
certfixer:
command:
- /bin/sh
- -c
- |
cp /origcerts/* /certs
chown -R nobody.nobody /certs/*
chmod -R 644 /certs/*
chmod -R og-rw /certs/*-key.pem
chown -R 70.70 /certs/db*
ls -la /certs/
container_name: certfixer
image: alpine:latest
volumes:
- ./certs:/origcerts
- certs:/certs
db:
command: server /data
container_name: db
depends_on:
certfixer:
condition: service_completed_successfully
environment:
- DB_LEGA_IN_PASSWORD=lega_in
- DB_LEGA_OUT_PASSWORD=lega_out
- PKI_VOLUME_PATH=/certs/
- PG_CA=/var/lib/postgresql/tls/ca.pem
- PG_SERVER_CERT=/var/lib/postgresql/tls/db.pem
- PG_SERVER_KEY=/var/lib/postgresql/tls/db-key.pem
- POSTGRES_PASSWORD=rootpassword
healthcheck:
test: ["CMD", "pg_isready", "-h", "localhost", "-U", "lega_out"]
interval: 5s
timeout: 20s
retries: 3
image: ghcr.io/neicnordic/sda-db:v2.1.4
ports:
- "5432:5432"
volumes:
- /tmp/data:/data
- certs:/var/lib/postgresql/tls/
s3:
command: server /data
container_name: s3
environment:
- MINIO_ACCESS_KEY=access
- MINIO_SECRET_KEY=secretkey
healthcheck:
test: ["CMD", "curl", "-fkq", "https://localhost:9000/minio/health/live"]
interval: 5s
timeout: 20s
retries: 3
image: minio/minio:RELEASE.2020-06-03T22-13-49Z
ports:
- "9000:9000"
volumes:
- ./certs/ca.pem:/root/.minio/certs/CAs/public.crt
- ./certs/s3.pem:/root/.minio/certs/public.crt
- ./certs/s3-key.pem:/root/.minio/certs/private.key
createbucket:
container_name: buckets
image: minio/mc
depends_on:
s3:
condition: service_healthy
entrypoint: >
/bin/sh -c "
/usr/bin/mc config host add s3 https://s3:9000 access secretkey;
/usr/bin/mc mb s3/archive;
exit 0;
"
volumes:
- ./certs/ca.pem:/etc/ssl/certs/public.crt
restart: on-failure
download:
command: sda-download
container_name: download
depends_on:
certfixer:
condition: service_completed_successfully
db:
condition: service_healthy
s3:
condition: service_healthy
mockauth:
condition: service_started
env_file: ./env.download
image: neicnordic/sda-download:latest
build:
context: ..
volumes:
- ./config.yaml:/config.yaml
- ./:/dev_utils/
- ./iss.json:/iss.json
- certs:/dev_utils/certs
- ./archive_data/4293c9a7-dc50-46db-b79a-27ddc0dad1c6:/tmp/4293c9a7-dc50-46db-b79a-27ddc0dad1c6
mem_limit: 256m
ports:
- "8443:8443"
restart: always
mockauth:
command:
- /bin/sh
- -c
- |
pip install --upgrade pip
pip install aiohttp Authlib
python -u /mockoidc.py
container_name: mockauth
image: python:3.8-slim
volumes:
- ./mockoidc/mockoidc.py:/mockoidc.py
- certs:/certs
mem_limit: 256m
ports:
- "8000:8000"
restart: always
volumes:
archive:
certs: