-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.minio.yml
36 lines (34 loc) · 1.14 KB
/
docker-compose.minio.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
version: "3"
networks:
default:
name: water-api_default
services:
minio:
image: minio/minio
environment:
- MINIO_ROOT_USER=AKIAIOSFODNN7EXAMPLE
- MINIO_ROOT_PASSWORD=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
command: server /data --console-address ":9001"
ports:
- "9000:9000"
- "9001:9001"
# configure minio on startup (create buckets, etc)
# inspired by https://github.com/minio/minio/issues/4769
# and https://gist.github.com/haxoza/22afe7cc4a9da7e8bdc09aad393a99cc
minio_init:
image: minio/mc
depends_on:
- minio
entrypoint: >
/bin/sh -c "
echo 'sleeping for 10 seconds while minio starts...';
sleep 10;
/usr/bin/mc config host add minio http://minio:9000 AKIAIOSFODNN7EXAMPLE wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY;
/usr/bin/mc mb minio/castle-data-develop minio/castle-data-stable;
/usr/bin/mc policy set public minio/castle-data-develop;
/usr/bin/mc policy set public minio/castle-data-stable;
/usr/bin/mc cp --recursive /media/water/ minio/castle-data-develop/water/;
exit 0;
"
volumes:
- ./media:/media