-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathdocker-compose.yml
39 lines (36 loc) · 1.04 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
version: "3.7"
services:
minio:
image: quay.io/minio/minio
ports:
- "9000:9000"
- "9001:9001"
volumes:
- ./minio/data:/data
environment:
- MINIO_ROOT_USER=TESTKEY
- MINIO_ROOT_PASSWORD=TESTSECRET
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
command: server /data --console-address ":9001"
mc:
image: quay.io/minio/mc
volumes:
- ./minio/export:/export
depends_on:
- minio
environment:
- MINIO_ROOT_USER=TESTKEY
- MINIO_ROOT_PASSWORD=TESTSECRET
entrypoint: >
/bin/sh -c "
echo Waiting for minio service to start...;
curl --retry 10 --retry-delay 10 -s -o /dev/null http://minio:9000/minio/health/live
echo Minio is started;
/usr/bin/mc config host add my-minio http://minio:9000 $${MINIO_ROOT_USER} $${MINIO_ROOT_PASSWORD};
/usr/bin/mc mb -p my-minio/bucket-1;
/usr/bin/mc mirror export/ my-minio/bucket-1;
"