Add nginx reverse proxy to compose stack for /bodenfeuchte routing

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-15 19:07:18 +02:00
parent a9fbf25d9f
commit 3dba022221
2 changed files with 25 additions and 2 deletions
+12 -2
View File
@@ -1,13 +1,23 @@
services: services:
bodenfeuchte: bodenfeuchte:
build: . build: .
ports: expose:
- "3000:3000" - "3000"
volumes: volumes:
- bodenfeuchte-data:/app/data - bodenfeuchte-data:/app/data
env_file: env_file:
- .env - .env
restart: unless-stopped restart: unless-stopped
nginx:
image: nginx:alpine
ports:
- "80:80"
volumes:
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
- bodenfeuchte
restart: unless-stopped
volumes: volumes:
bodenfeuchte-data: bodenfeuchte-data:
+13
View File
@@ -0,0 +1,13 @@
server {
listen 80;
server_name _;
location /bodenfeuchte {
proxy_pass http://bodenfeuchte:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}