-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
112 lines (106 loc) · 2.93 KB
/
docker-compose.yml
File metadata and controls
112 lines (106 loc) · 2.93 KB
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
104
105
106
107
108
109
110
111
112
name: jandig
services:
django:
build:
dockerfile: Dockerfile
context: .
target: local_dev
user: jandig
ports:
- 8000:8000
volumes:
- ./:/jandig
- /jandig/minio-binaries/
env_file:
- .envs/.example
environment:
- USE_GRANIAN=True
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8000/api/v1/status || exit 1"]
interval: 1m30s
timeout: 30s
retries: 5
start_period: 10s
depends_on:
storage:
condition: service_started
mailpit:
condition: service_started
postgres:
condition: service_healthy
labels:
- "traefik.enable=true"
- "traefik.http.routers.django.rule=PathPrefix(`/`) && !PathPrefix(`/static`) && !PathPrefix(`/media`)"
- "traefik.http.services.django.loadbalancer.server.port=8000"
- "traefik.http.middlewares.django-retry.retry.attempts=5"
- "traefik.http.middlewares.django-retry.retry.initialInterval=100ms"
- "traefik.http.routers.django.middlewares=django-retry@docker"
postgres:
image: postgres:16.8
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:RELEASE.2025-04-22T22-12-26Z
ports:
- 9000:9000
- 9001:9001
volumes:
- media_data:/storage
env_file:
- .envs/.example
command: server /storage --console-address ":9001"
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:9000/minio/health/live || exit 1"]
interval: 1m30s
timeout: 30s
retries: 5
start_period: 30s
labels:
- "traefik.enable=true"
- "traefik.http.routers.storage.rule=PathPrefix(`/static`) || PathPrefix(`/media`)"
- "traefik.http.services.storage.loadbalancer.server.port=9000"
- "traefik.http.middlewares.storage-stripprefix.stripprefix.prefixes=/static,/media"
- "traefik.http.routers.storage.middlewares=storage-stripprefix"
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
traefik:
image: traefik:v3.3.5
ports:
- "80:80"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./etc/traefik:/etc/traefik
depends_on:
- django
- storage
volumes:
postgres_data:
media_data:
static_data:
mailpit_data: