-
Notifications
You must be signed in to change notification settings - Fork 21
/
docker-compose.yml
91 lines (87 loc) · 2.27 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
services:
django:
build:
dockerfile: Dockerfile
context: .
user: jandig
ports:
- 80:8000
volumes:
- ./:/jandig
- poetry_cache:/home/jandig/cache/pypoetry
env_file:
- .envs/.example
environment:
- USE_GUNICORN=True
- INSTALL_DEV=True
depends_on:
storage:
condition: service_started
createbuckets:
condition: service_started
mailpit:
condition: service_started
postgres:
condition: service_healthy
postgres:
image: postgres:15.4
env_file:
- .envs/.example
environment:
PGUSER: jandig
command: postgres -c max_connections=10000
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready", "-d", "jandig"]
interval: 5s
timeout: 60s
retries: 20
start_interval: 5s
storage:
image: minio/minio:latest
ports:
- 9000:9000
- 9001:9001
volumes:
- media_data:/storage
env_file:
- .envs/.example
command: server /storage --console-address ":9001"
createbuckets:
image: minio/mc:RELEASE.2022-09-16T09-16-47Z
depends_on:
- storage
env_file:
- .envs/.example
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 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;
"
mailpit:
image: axllent/mailpit
volumes:
- mailpit_data:/data
- ./etc/mailpit/:/self_signed/
ports:
- 8025:8025
- 1025:1025
environment:
MP_MAX_MESSAGES: 5000
MP_DATABASE: /data/mailpit.db
MP_SMTP_AUTH_ACCEPT_ANY: 1
MP_SMTP_AUTH_ALLOW_INSECURE: 1
MP_SMTP_TLS_CERT: /self_signed/mailpit_cert.pem
MP_SMTP_TLS_KEY: /self_signed/mailpit_key.pem
volumes:
postgres_data:
media_data:
mailpit_data:
poetry_cache: