-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathdocker-compose.yml
114 lines (108 loc) · 2.57 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
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
# Base docker-compose file for aquarium
#
# Defines services for Aquarium, Krill, database, and S3. Uses Docker network
# address translation, and containers for MySQL, and the Minio S3 server.
#
version: "3.5"
services:
app:
environment:
- DB_NAME=${DB_NAME}
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
- S3_ACCESS_KEY_ID=${S3_ID}
- S3_SECRET_ACCESS_KEY=${S3_SECRET_ACCESS_KEY}
- S3_REGION=${S3_REGION}
- SECRET_KEY_BASE=${SECRET_KEY_BASE}
- TECH_DASHBOARD=${TECH_DASHBOARD}
- TZ=${TIMEZONE}
volumes:
- ./db:/aquarium/db
- ./log:/aquarium/log
- ./biofab-eula.yml:/aquarium/config/user_agreement.yml
networks:
- aquarium_net
expose:
- "3000"
depends_on:
- db
- s3
cap_add:
- NET_ADMIN
sysctls:
- net.ipv4.conf.all.route_localnet=1
db:
image: mysql:5.7
restart: always
environment:
MYSQL_DATABASE: ${DB_NAME}
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
TZ: ${TIMEZONE}
networks:
- aquarium_net
krill:
networks:
- aquarium_net
expose:
- "3500"
environment:
DB_NAME: ${DB_NAME}
DB_USER: ${DB_USER}
DB_PASSWORD: ${DB_PASSWORD}
S3_ACCESS_KEY_ID: ${S3_ID}
S3_SECRET_ACCESS_KEY: ${S3_SECRET_ACCESS_KEY}
S3_REGION: ${S3_REGION}
TZ: ${TIMEZONE}
depends_on:
- db
- app
cap_add:
- NET_ADMIN
sysctls:
- net.ipv4.conf.all.route_localnet=1
s3:
image: minio/minio:edge
volumes:
- ./data/s3/data:/data
- ./data/s3/config:/root/.minio
command: server /data
expose:
- "9000"
environment:
MINIO_ACCESS_KEY: ${S3_ID}
MINIO_SECRET_KEY: ${S3_SECRET_ACCESS_KEY}
MINIO_REGION: ${S3_REGION}
networks:
- aquarium_net
createbucket:
image: minio/mc:RELEASE.2020-11-25T23-04-07Z
depends_on:
- s3
entrypoint: >
/bin/sh -c "
while ! nc -z s3 9000; do
sleep 1;
done;
sleep 5;
/usr/bin/mc config host add aqminio http://s3:9000 ${S3_ID} ${S3_SECRET_ACCESS_KEY};
/usr/bin/mc mb --region ${S3_REGION} -p aqminio/images;
/usr/bin/mc policy set download aqminio/images;
exit 0;
"
networks:
- aquarium_net
web:
image: nginx:stable-alpine
ports:
- "${APP_PUBLIC_PORT:-80}:80"
- "${S3_PUBLIC_PORT:-9000}:9000"
networks:
- aquarium_net
depends_on:
- app
- s3
- createbucket
networks:
aquarium_net: