-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
40 lines (37 loc) · 1.16 KB
/
Copy pathdocker-compose.yml
File metadata and controls
40 lines (37 loc) · 1.16 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
version: '3.8'
services:
minio:
image: minio/minio:RELEASE.2025-09-07T16-13-09Z
container_name: minio
hostname: 'minio'
ports:
- "9000:9000" # MinIO API port
- "9001:9001" # MinIO Console port
environment:
MINIO_ROOT_USER: admin
MINIO_ROOT_PASSWORD: password
#not work
# MINIO_DEFAULT_BUCKETS: testbucket1,testbucket2
# MINIO_BUCKET: test_bucket
command: 'server /data --console-address ":9001"'
# volumes:
# - minio_data:/data # Persist data in a named volume
healthcheck: # Optional: Health check to ensure MinIO is running
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 5s
timeout: 5s
retries: 3
restart: unless-stopped # Restart policy
createbuckets:
image: minio/minio:RELEASE.2025-09-07T16-13-09Z
depends_on:
minio:
condition: service_healthy
restart: on-failure
entrypoint: >
/bin/sh -c "
/usr/bin/mc alias set dockerminio http://minio:9000 admin password;
/usr/bin/mc mb dockerminio/my-bucket/some-directory;
/usr/bin/mc mb dockerminio/my-other-bucket;
exit 0;
"