ex18: nginx-default.conf für Quadlets (systemd-visitcounter-app als Upstream)

Compose und Quadlets brauchen unterschiedliche nginx-Configs:
- Compose: proxy_pass http://app:8080
- Quadlets: proxy_pass http://systemd-visitcounter-app:8080

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Frank Engel 2026-05-21 11:09:58 +02:00
parent 04075c0ae4
commit 9e3225db6e
2 changed files with 11 additions and 2 deletions

View file

@ -1,8 +1,8 @@
# Exercise 18 — Deploy VisitCounter via Quadlets
# nginx config an Ort und Stelle bringen (wird vom Proxy-Quadlet als Bind Mount erwartet)
# nginx config an Ort und Stelle bringen (Quadlet-Version mit systemd-visitcounter-app als Hostname)
mkdir -p ~/visitcounter/nginx
cp listings/visitcounter/nginx/default.conf ~/visitcounter/nginx/
cp listings/visitcounter/quadlets/nginx-default.conf ~/visitcounter/nginx/default.conf
# Create the Quadlet directory
mkdir -p ~/.config/containers/systemd/

View file

@ -0,0 +1,9 @@
server {
listen 80;
location / {
proxy_pass http://systemd-visitcounter-app:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}