From 21c98f726e9a1418769bb220e7095a66dd26bcb0 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sat, 17 Jan 2026 08:45:50 +0000 Subject: [PATCH] Upgrade Node.js to v22 and enable HTTP proxy support - Upgrade base Node.js image from v20 to v22-alpine3.20 - Upgrade Alpine from 3.19 to 3.20 for both Node and Go base images - Add NODE_USE_ENV_PROXY=1 environment variable to enable automatic proxy configuration - Document HTTP proxy environment variables (HTTP_PROXY, HTTPS_PROXY, NO_PROXY) This enables Sourcebot to work in enterprise environments that require HTTP/HTTPS proxies for external access. Node.js v22 natively supports proxy configuration via environment variables when NODE_USE_ENV_PROXY is enabled. Co-authored-by: brendan --- Dockerfile | 5 +++-- docs/docs/configuration/environment-variables.mdx | 8 ++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5ea04e1b4..c63ae31e6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,8 +15,8 @@ ARG NEXT_PUBLIC_SENTRY_BACKEND_DSN ARG NEXT_PUBLIC_LANGFUSE_PUBLIC_KEY ARG NEXT_PUBLIC_LANGFUSE_BASE_URL -FROM node:20-alpine3.19 AS node-alpine -FROM golang:1.23.4-alpine3.19 AS go-alpine +FROM node:22-alpine3.20 AS node-alpine +FROM golang:1.23.4-alpine3.20 AS go-alpine # ---------------------------------- # ------ Build Zoekt ------ @@ -159,6 +159,7 @@ ENV NEXT_PUBLIC_LANGFUSE_BASE_URL=$NEXT_PUBLIC_LANGFUSE_BASE_URL WORKDIR /app ENV NODE_ENV=production ENV NEXT_TELEMETRY_DISABLED=1 +ENV NODE_USE_ENV_PROXY=1 ENV DATA_DIR=/data ENV DATA_CACHE_DIR=$DATA_DIR/.sourcebot ENV DATABASE_DATA_DIR=$DATA_CACHE_DIR/db diff --git a/docs/docs/configuration/environment-variables.mdx b/docs/docs/configuration/environment-variables.mdx index e29fb88fc..4be51ca12 100644 --- a/docs/docs/configuration/environment-variables.mdx +++ b/docs/docs/configuration/environment-variables.mdx @@ -37,6 +37,14 @@ The following environment variables allow you to configure your Sourcebot deploy | `DEFAULT_MAX_MATCH_COUNT` | `10000` |

The default maximum number of search results to return when using search in the web app.

| | `ALWAYS_INDEX_FILE_PATTERNS` | - |

A comma separated list of glob patterns matching file paths that should always be indexed, regardless of size or number of trigrams.

| +### HTTP Proxy Configuration +|| Variable | Default | Description | +|| :------- | :------ | :---------- | +|| `HTTP_PROXY` | - |

HTTP proxy URL for routing non-SSL requests through a proxy server (e.g., `http://proxy.company.com:8080`). Requires Node.js to be configured with `NODE_USE_ENV_PROXY=1`.

| +|| `HTTPS_PROXY` | - |

HTTPS proxy URL for routing SSL requests through a proxy server (e.g., `http://proxy.company.com:8080`). Requires Node.js to be configured with `NODE_USE_ENV_PROXY=1`.

| +|| `NO_PROXY` | - |

Comma-separated list of hostnames or domains that should bypass the proxy (e.g., `localhost,127.0.0.1,.internal.domain`). Requires Node.js to be configured with `NODE_USE_ENV_PROXY=1`.

| +|| `NODE_USE_ENV_PROXY` | `1` |

Enables Node.js to automatically use `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` environment variables for network requests. Set to `1` to enable or `0` to disable.

| + ### Enterprise Environment Variables | Variable | Default | Description | | :------- | :------ | :---------- |