-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
48 lines (46 loc) · 1.18 KB
/
Copy pathdocker-compose.yml
File metadata and controls
48 lines (46 loc) · 1.18 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
services:
app:
build: .
env_file: .env
restart: unless-stopped
# Acota la RAM del contenedor para que un pico (p. ej. PyMuPDF render de un
# PDF grande) no consuma toda la memoria física y arrastre sshd/Caddy. Con
# el swap de la VM, al tocar el tope va a swap en vez de disparar OOM global;
# si igual se excede, el OOM-killer mata solo este contenedor (lo reinicia
# restart: unless-stopped) en vez de tumbar el host.
mem_limit: 700m
memswap_limit: 1700m
ports:
- "127.0.0.1:8000:8000"
healthcheck:
test: ["CMD", "curl", "-fsS", "http://localhost:8000/health"]
interval: 30s
timeout: 5s
retries: 3
start_period: 15s
logging:
driver: json-file
options:
max-size: "50m"
max-file: "3"
caddy:
image: caddy:2-alpine
restart: unless-stopped
ports:
- "80:80"
- "443:443"
env_file: .env
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
- caddy_data:/data
- caddy_config:/config
depends_on:
- app
logging:
driver: json-file
options:
max-size: "20m"
max-file: "3"
volumes:
caddy_data:
caddy_config: