-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
53 lines (46 loc) · 1.41 KB
/
docker-compose.yml
File metadata and controls
53 lines (46 loc) · 1.41 KB
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
services:
minio:
image: minio/minio
container_name: s3v-minio
ports:
- "9000:9000" # S3 API
- "9001:9001" # Web Console
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
command: server /data --console-address ":9001"
volumes:
- minio-data:/data
# Seed test data after minio starts
minio-seed:
image: minio/mc
container_name: s3v-minio-seed
depends_on:
- minio
entrypoint: /bin/sh
command:
- -c
- |
sleep 3
mc alias set local http://minio:9000 minioadmin minioadmin
# Create buckets
mc mb --ignore-existing local/test-small
mc mb --ignore-existing local/test-large
mc mb --ignore-existing local/test-nested
# test-small: a few files
for i in $$(seq 1 10); do
echo "content $$i" | mc pipe local/test-small/file-$$(printf '%03d' $$i).txt
done
# test-large: 2500 files (tests pagination at 1000/page)
for i in $$(seq 1 2500); do
echo "content $$i" | mc pipe local/test-large/file-$$(printf '%05d' $$i).txt
done
# test-nested: folder hierarchy
for dir in photos docs docs/reports videos; do
for i in $$(seq 1 5); do
echo "content" | mc pipe local/test-nested/$$dir/item-$$i.txt
done
done
echo "=== Seed complete ==="
volumes:
minio-data: