Skip to content

Commit 21c98f7

Browse files
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 <brendan@sourcebot.dev>
1 parent 2c0b583 commit 21c98f7

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ ARG NEXT_PUBLIC_SENTRY_BACKEND_DSN
1515
ARG NEXT_PUBLIC_LANGFUSE_PUBLIC_KEY
1616
ARG NEXT_PUBLIC_LANGFUSE_BASE_URL
1717

18-
FROM node:20-alpine3.19 AS node-alpine
19-
FROM golang:1.23.4-alpine3.19 AS go-alpine
18+
FROM node:22-alpine3.20 AS node-alpine
19+
FROM golang:1.23.4-alpine3.20 AS go-alpine
2020
# ----------------------------------
2121

2222
# ------ Build Zoekt ------
@@ -159,6 +159,7 @@ ENV NEXT_PUBLIC_LANGFUSE_BASE_URL=$NEXT_PUBLIC_LANGFUSE_BASE_URL
159159
WORKDIR /app
160160
ENV NODE_ENV=production
161161
ENV NEXT_TELEMETRY_DISABLED=1
162+
ENV NODE_USE_ENV_PROXY=1
162163
ENV DATA_DIR=/data
163164
ENV DATA_CACHE_DIR=$DATA_DIR/.sourcebot
164165
ENV DATABASE_DATA_DIR=$DATA_CACHE_DIR/db

docs/docs/configuration/environment-variables.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,14 @@ The following environment variables allow you to configure your Sourcebot deploy
3737
| `DEFAULT_MAX_MATCH_COUNT` | `10000` | <p>The default maximum number of search results to return when using search in the web app.</p> |
3838
| `ALWAYS_INDEX_FILE_PATTERNS` | - | <p>A comma separated list of glob patterns matching file paths that should always be indexed, regardless of size or number of trigrams.</p> |
3939

40+
### HTTP Proxy Configuration
41+
|| Variable | Default | Description |
42+
|| :------- | :------ | :---------- |
43+
|| `HTTP_PROXY` | - | <p>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`.</p> |
44+
|| `HTTPS_PROXY` | - | <p>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`.</p> |
45+
|| `NO_PROXY` | - | <p>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`.</p> |
46+
|| `NODE_USE_ENV_PROXY` | `1` | <p>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.</p> |
47+
4048
### Enterprise Environment Variables
4149
| Variable | Default | Description |
4250
| :------- | :------ | :---------- |

0 commit comments

Comments
 (0)