forked from tldr-devops/startpack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
minio.yml
83 lines (77 loc) · 2.65 KB
/
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
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
version: '3.8'
x-minio-labels: &minio-labels
labels:
- traefik.enable=true
- traefik.docker.network=minio
- traefik.http.routers.minio-http.rule=Host(`minio.${DOMAIN?Variable DOMAIN not set}`)
- traefik.http.routers.minio-http.entrypoints=http
- traefik.http.routers.minio-http.service=minio
#- traefik.http.routers.minio-http.middlewares=https-redirect
- traefik.http.routers.minio-https.rule=Host(`minio.${DOMAIN?Variable DOMAIN not set}`)
- traefik.http.routers.minio-https.entrypoints=https
- traefik.http.routers.minio-https.tls=true
- traefik.http.routers.minio-https.service=minio
- traefik.http.routers.minio-https.tls.certresolver=le
- traefik.http.services.minio.loadbalancer.server.port=9000
- traefik.http.routers.minio-console-http.rule=Host(`minio-console.${DOMAIN?Variable DOMAIN not set}`)
- traefik.http.routers.minio-console-http.entrypoints=http
- traefik.http.routers.minio-console-http.service=minio-console
#- traefik.http.routers.minio-console-http.middlewares=https-redirect
- traefik.http.routers.minio-console-https.rule=Host(`minio-console.${DOMAIN?Variable DOMAIN not set}`)
- traefik.http.routers.minio-console-https.entrypoints=https
- traefik.http.routers.minio-console-https.tls=true
- traefik.http.routers.minio-console-https.service=minio-console
- traefik.http.routers.minio-console-https.tls.certresolver=le
- traefik.http.services.minio-console.loadbalancer.server.port=9001
x-service: &service
logging:
driver: json-file
options:
max-size: "100m"
max-file: "2"
restart: always
networks:
- minio
services:
# https://docs.docker.com/minio/configuration/
minio:
container_name: minio
image: quay.io/minio/minio
deploy:
mode: replicated
replicas: 1
resources:
reservations:
cpus: '0.03'
memory: 70M
<<: *minio-labels
<<: *minio-labels
<<: *service
environment:
MINIO_ROOT_USER: ${USERNAME?Variable USERNAME not set}
MINIO_ROOT_PASSWORD: ${PASSWORD?Variable PASSWORD not set}
command: server /data --console-address ":9001"
volumes:
- minio-data:/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 1s
timeout: 1s
retries: 120
start_period: 2s
x-volume: &volume
driver: local
x-volume-driver-opts: &volume-driver-opts
type: none
o: bind
volumes:
minio-data:
name: minio-data
<<: *volume
driver_opts:
<<: *volume-driver-opts
device: ${DATAPATH?Variable DATAPATH not set}/minio/data
networks:
minio:
name: minio
external: true