-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.minio.yml
80 lines (77 loc) · 3.25 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
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
version: '3.8'
services:
# BEGIN minio_frontend
minio_frontend:
image: minio/minio:RELEASE.2024-01-16T16-07-38Z
container_name: minio_frontend
restart: always
command: server /data --console-address ":9000" --address ":9001"
volumes:
- ${s3_data_dir:-./s3_data}:/data
env_file:
- ./.minio.env
labels:
# Enable Traefik for this specific "minio_frontend" service
- traefik.enable=true
# Use the traefik-network network (defined in docker.compose.traefik.yml)
- traefik.docker.network=traefik-network
# Make Traefik use this domain in HTTP
- traefik.http.routers.minio-http.entrypoints=http
- traefik.http.routers.minio-http.rule=Host(`${minio_url}`)
# Make Traefik use this domain in HTTPS
- traefik.http.routers.minio-https.entrypoints=https
- traefik.http.routers.minio-https.rule=Host(`${minio_url}`)
- traefik.http.routers.minio-https.tls=true
# Use the "le" (Let's Encrypt) resolver
- traefik.http.routers.minio-https.tls.certresolver=le
# Plug middleware to redirect HTTP to HTTPS
- traefik.http.routers.minio-http.middlewares=https-redirect
- traefik.http.routers.minio-https.middlewares=secured
# Define the port inside the Docker service to use
- traefik.http.services.minio.loadbalancer.server.port=9000
networks:
- app-network
# Use the public network created to be shared between Traefik and
# any other service that needs to be publicly available with HTTPS
- traefik-network
# END minio_frontend
# BEGIN minio_backend
minio_backend:
image: minio/minio:RELEASE.2024-01-16T16-07-38Z
container_name: minio_backend
restart: always
command: server /data --console-address ":9001" --address ":9000"
volumes:
- ${s3_data_dir:-./s3_data}:/data
env_file:
- ./.minio.env
labels:
# Enable Traefik for this specific "minio_backend" service
- traefik.enable=true
# Use the traefik-network network (defined in docker.compose.traefik.yml)
- traefik.docker.network=traefik-network
# Make Traefik use this domain in HTTP
- traefik.http.routers.minio-admin-http.entrypoints=http
- traefik.http.routers.minio-admin-http.rule=Host(`${admin_minio_url}`)
# Make Traefik use this domain in HTTPS
- traefik.http.routers.minio-admin-https.entrypoints=https
- traefik.http.routers.minio-admin-https.rule=Host(`${admin_minio_url}`)
- traefik.http.routers.minio-admin-https.tls=true
# Use the "le" (Let's Encrypt) resolver
- traefik.http.routers.minio-admin-https.tls.certresolver=le
# https-redirect middleware creation to redirect HTTP to HTTPS
- traefik.http.routers.minio-admin-http.middlewares=https-redirect
- traefik.http.routers.minio-admin-https.middlewares=secured
# Define the port inside the Docker service to use
- traefik.http.services.minio-admin.loadbalancer.server.port=9000
networks:
- app-network
# Use the public network created to be shared between Traefik and
# any other service that needs to be publicly available with HTTPS
- traefik-network
# END minio_backend
networks:
app-network:
external: true
traefik-network:
external: true