Some checks are pending
Bidi Control Character Guard / bidi-control-guard (push) Waiting to run
Circular Dependency Check / Check for new circular dependencies (push) Waiting to run
Citus Migration Smoke / Combined migrations on single-node Citus (push) Waiting to run
E2E Fresh Install Tests / fresh-install-e2e (push) Waiting to run
ext-v2 guardrails / Run ext-v2 guard and ESLint (push) Waiting to run
Integration Tests / Check for relevant changes (push) Waiting to run
Integration Tests / ${{ (github.event_name == 'schedule' || github.event.inputs.suite == 'full') && 'Full integration suite' || 'Tier-1 integration subset' }} (push) Blocked by required conditions
Mobile checks / Mobile lint + typecheck (push) Waiting to run
Mobile checks / Mobile unit tests (push) Waiting to run
Mobile checks / Mobile dependency audit (report) (push) Waiting to run
Mobile checks / Mobile reproducibility checks (push) Waiting to run
Secrets guard (env backups) / Ensure no tracked env backup files (push) Waiting to run
Temporal Readiness / fast-readiness (push) Waiting to run
Temporal Readiness / docker-parity (push) Waiting to run
TypeScript Type Check / Nx affected typecheck (push) Waiting to run
Unit Tests / Skipped-test budget (push) Waiting to run
Unit Tests / Nx affected unit tests (push) Waiting to run
Unit Tests / Server unit coverage (informational) (push) Waiting to run
Validate Tenant Management Schema / Check for relevant changes (push) Waiting to run
Validate Tenant Management Schema / Validate Tenant Management Schema (push) Blocked by required conditions
EE Workflows Build Guard / ee-workflows-build-guard (push) Waiting to run
Excluded: .git, node_modules, secrets/, compose.env, assemblyscript tgz Source: /opt/alga-psa on psa.joliet.tech
147 lines
4.8 KiB
YAML
147 lines
4.8 KiB
YAML
{{- if and .Values.devEnv.enabled .Values.devEnv.aiAutomation.enabled }}
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: {{ include "sebastian.fullname" . }}-ai-nginx-config
|
|
namespace: {{ .Values.devEnv.namespace }}
|
|
data:
|
|
nginx.conf: |
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
http {
|
|
upstream ai_web {
|
|
server {{ include "sebastian.fullname" . }}-ai-web:3000;
|
|
}
|
|
|
|
upstream ai_api {
|
|
server {{ include "sebastian.fullname" . }}-ai-api:4000;
|
|
}
|
|
|
|
map $http_upgrade $connection_upgrade {
|
|
default upgrade;
|
|
'' close;
|
|
}
|
|
|
|
map $http_x_forwarded_host $best_host {
|
|
default $http_host;
|
|
"~.+" $http_x_forwarded_host;
|
|
}
|
|
|
|
map $http_x_forwarded_proto $proxy_scheme {
|
|
default $scheme;
|
|
"~.+" $http_x_forwarded_proto;
|
|
}
|
|
|
|
server {
|
|
listen 8080;
|
|
|
|
# WebSocket connections to AI API
|
|
location /socket.io/ {
|
|
proxy_pass http://ai_api;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $connection_upgrade;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
# WebSocket specific timeouts
|
|
proxy_connect_timeout 7d;
|
|
proxy_send_timeout 7d;
|
|
proxy_read_timeout 7d;
|
|
}
|
|
|
|
# AI LLM endpoint - route to AI Web service (Next.js app)
|
|
location /api/ai {
|
|
proxy_pass http://ai_web;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
# Support for streaming responses
|
|
proxy_buffering off;
|
|
proxy_cache off;
|
|
proxy_set_header Connection '';
|
|
proxy_http_version 1.1;
|
|
chunked_transfer_encoding off;
|
|
}
|
|
|
|
# Other API calls to AI API (browser automation, tools, etc.)
|
|
location /api/ {
|
|
proxy_pass http://ai_api;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
}
|
|
|
|
# Handle /vnc without trailing slash
|
|
location = /vnc {
|
|
return 301 "$proxy_scheme://$best_host/vnc/";
|
|
}
|
|
|
|
# Handle WebSocket connections specifically
|
|
location /vnc/websockify {
|
|
proxy_pass http://{{ include "sebastian.fullname" . }}-ai-api:5900/websockify;
|
|
proxy_http_version 1.1;
|
|
|
|
# WebSocket headers
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $connection_upgrade;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
# Disable buffering for WebSocket
|
|
proxy_buffering off;
|
|
proxy_request_buffering off;
|
|
tcp_nodelay on;
|
|
|
|
# Long timeouts for persistent connections
|
|
proxy_connect_timeout 3600s;
|
|
proxy_send_timeout 3600s;
|
|
proxy_read_timeout 3600s;
|
|
}
|
|
|
|
# VNC NoVNC interface - serve static files and handle WebSocket
|
|
location /vnc/ {
|
|
# Serve NoVNC files and handle WebSocket connections
|
|
proxy_pass http://{{ include "sebastian.fullname" . }}-ai-api:5900/;
|
|
proxy_http_version 1.1;
|
|
|
|
# Standard proxy headers
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
# WebSocket support for NoVNC connections
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $connection_upgrade;
|
|
|
|
# Disable buffering for WebSocket
|
|
proxy_buffering off;
|
|
proxy_request_buffering off;
|
|
tcp_nodelay on;
|
|
|
|
# Long timeouts for persistent connections
|
|
proxy_connect_timeout 3600s;
|
|
proxy_send_timeout 3600s;
|
|
proxy_read_timeout 3600s;
|
|
}
|
|
|
|
# Everything else to AI Web
|
|
location / {
|
|
proxy_pass http://ai_web;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
}
|
|
}
|
|
}
|
|
{{- end }} |