forked from theriverman/django-minio-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
103 lines (94 loc) · 2.5 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
98
99
100
101
102
103
# ORIGINAL SOURCE
# https://docs.min.io/docs/deploy-minio-on-docker-compose.html
# https://github.com/minio/minio/blob/master/docs/orchestration/docker-compose/docker-compose.yaml?raw=true
# IN THIS CONFIGURATION, THE PROJECT FILES ARE COPIED INTO THE CONTAINER
version: "3.9"
# Settings and configurations that are common for all containers
x-minio-common: &minio-common
image: minio/minio:RELEASE.2021-07-30T00-02-00Z
command: server --console-address ":9001" http://minio{1...4}/data{1...2}
expose:
- "9000"
- "9001"
environment:
MINIO_ROOT_USER: minio
MINIO_ROOT_PASSWORD: minio123
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:9000/minio/health/live" ]
interval: 30s
timeout: 20s
retries: 3
services:
# starts Django from DjangoExampleProject + DjangoExampleApplication
web:
build: .
command: bash -c "
python manage.py migrate
&& python manage.py runserver 0.0.0.0:8000
"
environment:
GH_MINIO_ENDPOINT: "nginx:9000"
GH_MINIO_USE_HTTPS: "false"
GH_MINIO_EXTERNAL_ENDPOINT: "localhost:9000"
GH_MINIO_EXTERNAL_ENDPOINT_USE_HTTPS: "false"
GH_MINIO_ACCESS_KEY: "minio"
GH_MINIO_SECRET_KEY: "minio123"
# CREATE AN ADMIN ACCOUNT FOR INTERNAL DEMO PURPOSES ONLY!
DJANGO_SUPERUSER_USERNAME: "admin"
DJANGO_SUPERUSER_PASSWORD: "123123"
DJANGO_SUPERUSER_EMAIL: "[email protected]"
ports:
- "8000:8000"
depends_on:
- nginx
# starts 4 docker containers running minio server instances.
# using nginx reverse proxy, load balancing, you can access
# it through port 9000.
minio1:
<<: *minio-common
hostname: minio1
volumes:
- data1-1:/data1
- data1-2:/data2
minio2:
<<: *minio-common
hostname: minio2
volumes:
- data2-1:/data1
- data2-2:/data2
minio3:
<<: *minio-common
hostname: minio3
volumes:
- data3-1:/data1
- data3-2:/data2
minio4:
<<: *minio-common
hostname: minio4
volumes:
- data4-1:/data1
- data4-2:/data2
nginx:
image: nginx:1.19.2-alpine
hostname: nginx
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
ports:
- "9000:9000"
- "9001:9001"
depends_on:
- minio1
- minio2
- minio3
- minio4
## By default this config uses default local driver,
## For custom volumes replace with volume driver configuration.
volumes:
data1-1:
data1-2:
data2-1:
data2-2:
data3-1:
data3-2:
data4-1:
data4-2: