Skip to content

Commit 286d68d

Browse files
committed
Lock down proxy and docs
1 parent 055bac0 commit 286d68d

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

Caddyfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
:3000 {
22
respond /healthz 200
3-
handle_path /blog* {
3+
redir /blog /blog/ 308
4+
handle /blog* {
45
reverse_proxy blog:3000
56
}
67
handle {

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ This repo is a Next.js app used to generate a static site. The final production
33
## Development (local only)
44
- Install deps: `npm install`
55
- Run dev server: `npm run dev` then open http://localhost:3000
6+
> ⚠️ Te polecenia dotyczą tylko lokalnego developmentu; finalny obraz to tylko statyczne pliki, nie ma tam żadnego node/npn podczas produkcji.
67
78
## Build (production image)
89
- `docker build -t www-website .`
910
- Runtime is static files only; mount/serve with RO filesystem (e.g., `docker run --read-only --tmpfs /tmp --tmpfs /config --tmpfs /data -p 3000:3000 www-website`).
11+
> ⚠️ Finalny kontener musi zawierać wyłącznie katalog `out`/statyczne zasoby i pracować z montowaną przestrzenią tylko do odczytu; nie uruchamiaj tam `npm start` czy podobnych runtime’ów.
1012
1113
## Deployment notes
1214
- Published image: `ghcr.io/devsh-graphics-programming/www-website` (tags: `latest`, `master`, `sha-*`).

docker-compose.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,20 @@ services:
44
image: devsh-website
55
read_only: true
66
tmpfs:
7-
- /tmp
8-
- /config
9-
- /data
7+
- /tmp:size=32m
8+
- /config:size=32m
9+
- /data:size=32m
1010
restart: unless-stopped
1111

1212
blog:
1313
image: ${BLOG_IMAGE:-ghcr.io/devsh-graphics-programming/www-blog:latest}
14+
ports:
15+
- "3001:3000"
1416
read_only: true
1517
tmpfs:
16-
- /tmp
17-
- /config
18-
- /data
18+
- /tmp:size=32m
19+
- /config:size=16m
20+
- /data:size=16m
1921
restart: unless-stopped
2022

2123
proxy:

0 commit comments

Comments
 (0)