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:
parent
04075c0ae4
commit
9e3225db6e
2 changed files with 11 additions and 2 deletions
|
|
@ -1,8 +1,8 @@
|
||||||
# Exercise 18 — Deploy VisitCounter via Quadlets
|
# 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
|
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
|
# Create the Quadlet directory
|
||||||
mkdir -p ~/.config/containers/systemd/
|
mkdir -p ~/.config/containers/systemd/
|
||||||
|
|
|
||||||
9
listings/visitcounter/quadlets/nginx-default.conf
Normal file
9
listings/visitcounter/quadlets/nginx-default.conf
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Reference in a new issue