fix: configure gitea webhook auto-deploy and fix provisioning NVS flash

- Add deploy-host.sh script for webhook-triggered docker redeploy
- Mark deploy-host.sh executable in .gitignore / git config
- Update docker-compose.yml and nginx.conf for auto-pull setup
- Fix vite.config.js and admin router for deployment environment
- Fix NVS generator CRC seed to match ESP-IDF esp_rom_crc32_le

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-27 09:14:58 +02:00
parent 57259c2c2f
commit 6eda151f06
7 changed files with 42 additions and 31 deletions

View File

@@ -3,18 +3,17 @@ events {
}
http {
upstream backend {
server backend:8000;
}
upstream frontend {
server frontend:5173;
}
client_max_body_size 10m;
server {
listen 80;
server_name localhost;
# Use Docker's internal DNS so nginx re-resolves after container restarts
resolver 127.0.0.11 valid=5s;
set $backend_upstream http://backend:8000;
set $frontend_upstream http://frontend:5173;
# OTA firmware files — allow browser (esptool-js) to fetch .bin files directly
location /ota/ {
root /srv;
@@ -29,7 +28,7 @@ http {
# API requests → FastAPI backend
location /api/ {
proxy_pass http://backend;
proxy_pass $backend_upstream$request_uri;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@@ -38,7 +37,7 @@ http {
# WebSocket support for MQTT live data
location /api/mqtt/ws {
proxy_pass http://backend;
proxy_pass $backend_upstream$request_uri;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
@@ -47,7 +46,7 @@ http {
# Everything else → React frontend (Vite dev server)
location / {
proxy_pass http://frontend;
proxy_pass $frontend_upstream$request_uri;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;