-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
65 lines (53 loc) · 1.16 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
version: '3'
services:
app:
build:
context: .
ports:
- "8000:8000"
depends_on:
- minio
volumes:
- .:/app
networks:
- django_network
command: >
sh -c "python3 manage.py migrate &&
python3 manage.py runserver 0.0.0.0:8000 && python manage.py initialize_buckets"
minio:
image: minio/minio:latest
volumes:
- s3-volume:/data
ports:
- "9000:9000"
- "9001:9001"
expose:
- "9000"
- "9001"
networks:
- django_network
environment:
MINIO_ROOT_USER: minio
MINIO_ROOT_PASSWORD: minio123
command: server /data --console-address :9001
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
create_buckets:
image: minio/mc:latest
depends_on:
- minio
networks:
- django_network
entrypoint: >
/bin/sh -c '
mc config host add s3 http://minio:9000 minio minio123 --api S3v4;
[[ ! -z "`mc ls s3 | grep test`" ]] || mc mb s3/test;
exit 0;
'
volumes:
s3-volume:
networks:
django_network: