apiVersion: v1
kind: ConfigMap
metadata:
  name: nginx-conf
  namespace: tekton-manualapprove
data:
  nginx.conf: |
    worker_processes  3;
    pid /tmp/nginx.pid; # Changed from /var/run/nginx.pid
    error_log  /var/log/nginx/error.log;
    events {
      worker_connections  10240;
    }
    http {
      server {
          listen       8080; # Changed from default 80 port
          server_name  _;
          location / {
              root /usr/share/nginx/html;
              autoindex on;
          }
          location /server/ {
                proxy_pass http://127.0.0.1:8090/;
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection ‘upgrade’;
                proxy_set_header Host $host;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_cache_bypass $http_upgrade;
          }
      }
    }