# soilmoisture_client/nginx.conf worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; # Docker's internal DNS resolver resolver 127.0.0.11 valid=10s; server { listen 80; server_name localhost; root /usr/share/nginx/html; index index.html index.htm; # Serve Angular App with Client-Side Routing location / { try_files $uri $uri/ /index.html; } # Proxy API Requests to ASP.NET Core API location /api/ { proxy_pass http://plantpal_api:80/api/; 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; # Optional: Increase timeout settings if necessary proxy_connect_timeout 600; proxy_send_timeout 600; proxy_read_timeout 600; send_timeout 600; } } }