-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
97 lines (92 loc) · 4.27 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
version: "2.4"
# MinIO
# "mkdir ./minio-data/ && chmod 777 ./minio-data/" when use user/group settings
services:
minio:
#build:
# context: ./
# dockerfile: alpine.multiarch.git_master.Dockerfile
#image: tobi312/minio:development
image: tobi312/minio:latest # or: tobi312/minio:scratch
container_name: minio
#restart: unless-stopped
ports:
- "9000:9000" # MinIO Buckets API
- "9001:9001" # MinIO Console
volumes:
#- minio-data:/data:rw
- ./minio-data:/data:rw
#- ./ssl/ssl.crt:/root/.minio/certs/public.crt:ro # works only with root user and set URLs (and Port)
#- ./ssl/ssl.key:/root/.minio/certs/private.key:ro # (https://github.com/Tob1as/docker-minio/issues/1#issuecomment-1003127867)
environment:
#TZ: "Europe/Berlin" # not working
MINIO_ROOT_USER: minio
MINIO_ROOT_PASSWORD: minio123
# user/group in container instead root
#MINIO_USERNAME: minio
#MINIO_GROUPNAME: minio
#MINIO_UID: 1000
#MINIO_GID: 1000
# use for MinIO Console behind a load balancer, proxy or k8s ingress
#MINIO_SERVER_URL: "https://minio.example.net"
#MINIO_BROWSER_REDIRECT_URL: "https://minio-console.example.net"
command: ["server", "--address", ":9000", "--console-address", ":9001", "/data"]
healthcheck:
test: ["CMD", "curl", "--fail", "http://localhost:9000/minio/health/live"]
#test: ["CMD", "curl", "--fail", "--insecure", "https://localhost:9000/minio/health/live"] # when use minio ssl
#start_period: 30s
interval: 60s
timeout: 5s
retries: 3
networks:
storage:
#labels:
# # for Traefik "docker-compose" example see: https://github.com/Tob1as/docker-kubernetes-collection/blob/master/examples_docker-compose/traefik.yml
# - "traefik.enable=true"
# #- "traefik.docker.network=storage"
# # MINIO-Console
# - "traefik.http.services.minio-console.loadbalancer.server.port=9001"
# - "traefik.http.services.minio-console.loadbalancer.server.scheme=http" # when "https" then set "--serversTransport.insecureSkipVerify=true" for traefik
# # http
# - "traefik.http.routers.minio-console-http.rule=Host(`minio-console.example.net`)"
# - "traefik.http.routers.minio-console-http.entrypoints=web"
# - "traefik.http.routers.minio-console-http.service=minio-console"
# # https
# - "traefik.http.routers.minio-console-https.tls=true"
# - "traefik.http.routers.minio-console-https.rule=Host(`minio-console.example.net`)"
# - "traefik.http.routers.minio-console-https.entrypoints=websecure"
# - "traefik.http.routers.minio-console-https.service=minio-console"
# # http to https redirect
# - "traefik.http.routers.minio-console-http.middlewares=minio-console-https"
# - "traefik.http.middlewares.minio-console-https.redirectscheme.scheme=https"
# #- "traefik.http.middlewares.minio-console-https.redirectscheme.permanent=true"
# #- "traefik.http.middlewares.minio-console-https.redirectscheme.port=443"
# # MINIO API
# - "traefik.http.services.minio.loadbalancer.server.port=9000"
# - "traefik.http.services.minio.loadbalancer.server.scheme=http" # when "https" then set "--serversTransport.insecureSkipVerify=true" for traefik
# # http
# - "traefik.http.routers.minio-http.rule=Host(`minio.example.net`)"
# - "traefik.http.routers.minio-http.entrypoints=web"
# - "traefik.http.routers.minio-http.service=minio"
# # https
# - "traefik.http.routers.minio-https.tls=true"
# - "traefik.http.routers.minio-https.rule=Host(`minio.example.net`)"
# - "traefik.http.routers.minio-https.entrypoints=websecure"
# - "traefik.http.routers.minio-https.service=minio"
# # http to https redirect
# - "traefik.http.routers.minio-http.middlewares=minio-https"
# - "traefik.http.middlewares.minio-https.redirectscheme.scheme=https"
# #- "traefik.http.middlewares.minio-https.redirectscheme.permanent=true"
# #- "traefik.http.middlewares.minio-https.redirectscheme.port=443"
networks:
storage:
name: storage
# driver: bridge
# enable_ipv6: true
# ipam:
# driver: default
# config:
# - subnet: 172.20.0.0/24
# - subnet: fd00:dead:beef::/48
#volumes:
# minio-data: