-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdocker-compose.yml
71 lines (65 loc) · 1.67 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
version: "3.5"
networks:
local:
driver: bridge
volumes:
postgres:
redis:
minio_data:
services:
postgres:
image: postgres:13
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: root
POSTGRES_DB: espectateur
volumes:
- ./.data:/var/lib/postgresql/data
- /etc/localtime:/etc/localtime:ro
ports:
- "5432:5432"
restart: unless-stopped
healthcheck:
test: "pg_isready -h 127.0.0.1 -U postgres -d espectateur"
networks:
- local
minio:
restart: unless-stopped
image: minio/minio
ports:
- "9000:9000"
- "9001:9001"
volumes:
- minio_data:/data
environment:
MINIO_ROOT_USER: ${STORAGE_ACCESS_KEY}
MINIO_ROOT_PASSWORD: ${STORAGE_SECRET_KEY}
command: server /data --console-address ":9001"
healthcheck:
test: ["CMD", "mc", "ready", "local"]
interval: 5s
timeout: 5s
retries: 5
networks:
- local
createbuckets:
image: minio/mc
depends_on:
- minio
entrypoint: >
/bin/sh -c " mc alias set myminio http://minio:9000 ${STORAGE_ACCESS_KEY} ${STORAGE_SECRET_KEY}; mc mb
myminio/${STORAGE_BUCKET}; mc anonymous set public myminio/${STORAGE_BUCKET}; echo '{\"Version\": \"2012-10-17\",
\"Statement\": [{\"Effect\": \"Allow\", \"Action\": \"s3:PutObject\", \"Resource\":
\"arn:aws:s3:::${STORAGE_BUCKET}/*\"}]}' > /tmp/mypolicy.json; mc admin policy create myminio mypolicy
/tmp/mypolicy.json; exit 0; "
networks:
- local
redis:
image: redis:6-alpine
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- redis:/redis:/data
networks:
- local