diff --git a/docker-compose/examples/outbound-http-proxy/docker-compose.override.yaml b/docker-compose/examples/outbound-http-proxy/docker-compose.override.yaml new file mode 100644 index 000000000..f44001812 --- /dev/null +++ b/docker-compose/examples/outbound-http-proxy/docker-compose.override.yaml @@ -0,0 +1,65 @@ +# Docker Compose override file for routing outbound HTTP(S) traffic through an HTTP proxy +# ex. telemetry, update checks, and license verification to services.sourcegraph.com, +# and connections to code hosts, auth providers, and LLM providers outside your private network +# See https://sourcegraph.com/docs/self-hosted/private-network#http-proxy-configuration + + +# Reusable block of environment variables, for services which initiate outbound connections +x-proxy-env-vars: &proxy-env-vars + + HTTP_PROXY: http://proxy.example.com:8080 + HTTPS_PROXY: http://proxy.example.com:8080 + + # Skip the proxy for local traffic + # Add your internal code hosts, auth providers, image registries, etc. which are reachable without the proxy + # If a container fails its health check after adding the proxy, also add the Docker network's CIDR range, ex. 172.16.0.0/12 + # Each line needs a trailing comma, as YAML folds these lines into one line, separated by spaces + NO_PROXY: >- + blobstore, + caddy, + cadvisor, + codeinsights-db, + codeinsights-db-exporter, + codeintel-db, + codeintel-db-exporter, + gitserver-0, + grafana, + migrator, + node-exporter, + otel-collector, + pgsql, + pgsql-exporter, + precise-code-intel-worker, + prometheus, + redis-cache, + redis-store, + searcher-0, + sourcegraph-frontend-0, + sourcegraph-frontend-internal, + syntactic-code-intel-worker, + syntect-server, + worker, + zoekt-indexserver-0, + zoekt-webserver-0, + localhost, + 127.0.0.1 + + +services: + + sourcegraph-frontend-0: + environment: + <<: *proxy-env-vars + + sourcegraph-frontend-internal: + environment: + <<: *proxy-env-vars + + # Uncomment if connections to code hosts outside your private network need to use the proxy + # gitserver-0: + # environment: + # <<: *proxy-env-vars + + worker: + environment: + <<: *proxy-env-vars