Skip to content

Commit 4fe9ddc

Browse files
authored
Merge pull request #52 from mcinquin/docker-compose
chore(docker-compose): fix issue with stop_grace_period parameter
2 parents 533c724 + 23b3050 commit 4fe9ddc

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ docker compose up -d
8484

8585
Override via `.env` if needed. See [SECURITY.md](SECURITY.md).
8686

87-
Production-oriented options in Compose include: non-root user, `read_only` root filesystem, dropped capabilities, resource limits, health check on `/api/health`, and log rotation. The reverse proxy stays **outside** Compose (Apache on the host).
87+
Production-oriented options in Compose include: non-root user, `read_only` root filesystem, dropped capabilities, health check on `/api/health`, and log rotation. **No CPU/RAM cap** by default (a low `mem_limit` / `cpus` makes Next.js feel very slow). The reverse proxy stays **outside** Compose (Apache on the host).
8888

8989
### Local Docker (build)
9090

docker-compose.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ services:
1717
- no-new-privileges:true
1818
cap_drop:
1919
- ALL
20-
pids_limit: 128
21-
mem_limit: 768m
22-
cpus: "1.0"
23-
stop_grace_period: 30s
20+
pids_limit: 256
21+
stop_grace_period: "30s"
22+
# Pas de mem_limit / cpus : Next.js + SQLite ont besoin de marge ; un plafond
23+
# bas (ex. 768m, 1 CPU) provoque lenteur, swap et GC agressif.
2424
# Écoute uniquement en local ; Apache proxy vers 127.0.0.1:3000
2525
ports:
2626
- "127.0.0.1:3000:3000"
@@ -36,7 +36,7 @@ services:
3636
volumes:
3737
- ./data:/app/data
3838
tmpfs:
39-
- /tmp:size=64M,mode=1777
39+
- /tmp:size=256M,mode=1777
4040
healthcheck:
4141
test:
4242
[

0 commit comments

Comments
 (0)