forked from memeLab/Jandig
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
65 lines (60 loc) · 1.58 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.5'
services:
django:
build:
dockerfile: Dockerfile
context: .
ports:
- 8000:8000
volumes:
- ./src/:/src/
- ./docs/:/src/docs/
- ./etc/:/src/etc/
- ./locale/:/src/locale/
- ./run.sh:/src/run.sh
- ./tasks.py:/src/tasks.py
env_file:
- .envs/.example
depends_on:
- postgres
- storage
- createbuckets
command: ./run.sh
postgres:
image: postgres:15.2
env_file:
- .envs/.env
command: postgres -c max_connections=10000
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
storage:
image: minio/minio:latest
ports:
- 9000:9000
- 9001:9001
volumes:
- storage:/storage
env_file:
- .envs/.env
command: server /storage --console-address ":9001"
createbuckets:
image: minio/mc:RELEASE.2022-09-16T09-16-47Z
depends_on:
- storage
env_file:
- .envs/.env
entrypoint: >
/bin/sh -c "
until (/usr/bin/mc config host add myminio $${MINIO_S3_ENDPOINT_URL} $${MINIO_ROOT_USER} $${MINIO_ROOT_PASSWORD}) do echo '...waiting...' && sleep 1; done;
/usr/bin/mc mb myminio/$${AWS_STORAGE_BUCKET_NAME};
/usr/bin/mc policy set download myminio/$${AWS_STORAGE_BUCKET_NAME};
/usr/bin/mc mb myminio/$${AWS_PRIVATE_STORAGE_BUCKET_NAME};
/usr/bin/mc admin user add myminio $${MINIO_USER_ACCESS_KEY} $${MINIO_USER_SECRET_KEY};
/usr/bin/mc admin policy set myminio readwrite user=$${MINIO_USER_ACCESS_KEY};
exit 0;
"
volumes:
postgres_data:
storage: