mirror of
https://github.com/RustyRaptor/deploy-sourcegraph-docker.git
synced 2026-12-03 15:55:17 -07:00
664 lines
22 KiB
YAML
664 lines
22 KiB
YAML
version: '2.4'
|
|
services:
|
|
# Description: Acts as a reverse proxy for all of the sourcegraph-frontend instances
|
|
#
|
|
# Disk: 1GB / persistent SSD
|
|
# Ports exposed to other Sourcegraph services: none
|
|
# Ports exposed to the public internet: 80 (HTTP) and 443 (HTTPS)
|
|
#
|
|
# Sourcegraph ships with a few builtin templates that cover common HTTP/HTTPS configurations:
|
|
# - HTTP only (default)
|
|
# - HTTPS with Let's Encrypt
|
|
# - HTTPS with custom certificates
|
|
#
|
|
# Follow the directions in the comments below to swap between these configurations.
|
|
#
|
|
# If none of these built-in configurations suit your needs, then you can create your own Caddyfile, see:
|
|
# https://caddyserver.com/docs/caddyfile
|
|
caddy:
|
|
container_name: caddy
|
|
image: 'index.docker.io/caddy/caddy:alpine@sha256:83d9aa7a5f1bbcc0fc1b4720c183a5ec53dae7dc5d9fa555daf3db345010e7f9'
|
|
cpus: 4
|
|
mem_limit: '4g'
|
|
environment:
|
|
- 'XDG_DATA_HOME=/caddy-storage/data'
|
|
- 'XDG_CONFIG_HOME=/caddy-storage/config'
|
|
- 'SRC_FRONTEND_ADDRESSES=sourcegraph-frontend-0:3080'
|
|
# Uncomment & update this line when using Let's Encrypt or custom HTTPS certificates:
|
|
# - 'SRC_SITE_ADDRESS=sourcegraph.example.com'
|
|
#
|
|
# Uncomment & update the following line when using HTTPS with Let's Encrypt
|
|
# - 'SRC_ACME_EMAIL=admin@example.com'
|
|
volumes:
|
|
- 'caddy:/caddy-storage'
|
|
#
|
|
# Comment out the following line when using HTTPS with either Let's Encrypt or custom certficates
|
|
- '../caddy/builtins/http.Caddyfile:/etc/caddy/Caddyfile'
|
|
#
|
|
# Uncomment the following line when using HTTPS with Let's Encrypt's staging environment
|
|
# - '../caddy/builtins/https.lets-encrypt-staging.Caddyfile:/etc/caddy/Caddyfile'
|
|
#
|
|
# Uncomment the following line when using HTTPS with Let's Encrypt's production environment
|
|
# IMPORTANT: Strongly recommended to test with the staging configuration above first, see that file for details.
|
|
# - '../caddy/builtins/https.lets-encrypt-prod.Caddyfile:/etc/caddy/Caddyfile'
|
|
#
|
|
# Uncomment the following line when using HTTPS with custom certificates
|
|
# - '../caddy/builtins/https.custom-cert.Caddyfile:/etc/caddy/Caddyfile'
|
|
#
|
|
# Uncomment / update the following line when using HTTPS with custom certficates
|
|
# - '/LOCAL/CERT/PATH.pem:/sourcegraph.pem'
|
|
#
|
|
# Uncomment / update the following line when using HTTPS with custom certficates
|
|
# - '/LOCAL/KEY/PATH.key:/sourcegraph.key'
|
|
ports:
|
|
- '0.0.0.0:80:80'
|
|
- '0.0.0.0:443:443'
|
|
networks:
|
|
- sourcegraph
|
|
restart: always
|
|
|
|
# Description: Serves the frontend of Sourcegraph via HTTP(S).
|
|
#
|
|
# Disk: 128GB / non-persistent SSD
|
|
# Ports exposed to other Sourcegraph services: 6060/TCP, 3080 (HTTP), and/or 3443 (HTTPS)
|
|
# Ports exposed to the public internet: none
|
|
#
|
|
# Note: SRC_GIT_SERVERS, SEARCHER_URL, and SYMBOLS_URL are space-separated
|
|
# lists which each allow you to specify more container instances for scaling
|
|
# purposes. Be sure to also apply such a change here to the frontend-internal
|
|
# service.
|
|
sourcegraph-frontend-0:
|
|
container_name: sourcegraph-frontend-0
|
|
image: 'index.docker.io/sourcegraph/frontend:insiders@sha256:7c453e79a63e92b79901a6b523859d43e870f978162a60a4b219a6e54aa6c98a'
|
|
cpus: 4
|
|
mem_limit: '8g'
|
|
environment:
|
|
- DEPLOY_TYPE=docker-compose
|
|
- GOMAXPROCS=12
|
|
- JAEGER_AGENT_HOST=jaeger
|
|
- PGHOST=pgsql
|
|
- CODEINTEL_PGHOST=codeintel-db
|
|
- CODEINSIGHTS_PGDATASOURCE=postgres://postgres:password@codeinsights-db:5432/postgres
|
|
- 'SRC_GIT_SERVERS=gitserver-0:3178'
|
|
- 'SRC_SYNTECT_SERVER=http://syntect-server:9238'
|
|
- 'SEARCHER_URL=http://searcher-0:3181'
|
|
- 'SYMBOLS_URL=http://symbols-0:3184'
|
|
- 'INDEXED_SEARCH_SERVERS=zoekt-webserver-0:6070'
|
|
- 'SRC_FRONTEND_INTERNAL=sourcegraph-frontend-internal:3090'
|
|
- 'REPO_UPDATER_URL=http://repo-updater:3182'
|
|
- 'GRAFANA_SERVER_URL=http://grafana:3370'
|
|
- 'JAEGER_SERVER_URL=http://jaeger:16686'
|
|
- 'GITHUB_BASE_URL=http://github-proxy:3180'
|
|
- 'PROMETHEUS_URL=http://prometheus:9090'
|
|
healthcheck:
|
|
test: "wget -q 'http://127.0.0.1:3080/healthz' -O /dev/null || exit 1"
|
|
interval: 5s
|
|
timeout: 10s
|
|
retries: 5
|
|
start_period: 300s
|
|
volumes:
|
|
- 'sourcegraph-frontend-0:/mnt/cache'
|
|
networks:
|
|
- sourcegraph
|
|
restart: always
|
|
depends_on:
|
|
sourcegraph-frontend-internal:
|
|
condition: service_healthy
|
|
|
|
# Description: Serves the internal Sourcegraph frontend API.
|
|
#
|
|
# Disk: 128GB / non-persistent SSD
|
|
# Ports exposed to other Sourcegraph services: 3090/TCP 6060/TCP
|
|
# Ports exposed to the public internet: none
|
|
#
|
|
sourcegraph-frontend-internal:
|
|
container_name: sourcegraph-frontend-internal
|
|
image: 'index.docker.io/sourcegraph/frontend:insiders@sha256:7c453e79a63e92b79901a6b523859d43e870f978162a60a4b219a6e54aa6c98a'
|
|
cpus: 4
|
|
mem_limit: '8g'
|
|
environment:
|
|
- DEPLOY_TYPE=docker-compose
|
|
- GOMAXPROCS=4
|
|
- PGHOST=pgsql
|
|
- CODEINTEL_PGHOST=codeintel-db
|
|
- CODEINSIGHTS_PGDATASOURCE=postgres://postgres:password@codeinsights-db:5432/postgres
|
|
- 'SRC_GIT_SERVERS=gitserver-0:3178'
|
|
- 'SRC_SYNTECT_SERVER=http://syntect-server:9238'
|
|
- 'SEARCHER_URL=http://searcher-0:3181'
|
|
- 'SYMBOLS_URL=http://symbols-0:3184'
|
|
- 'INDEXED_SEARCH_SERVERS=zoekt-webserver-0:6070'
|
|
- 'SRC_FRONTEND_INTERNAL=sourcegraph-frontend-internal:3090'
|
|
- 'REPO_UPDATER_URL=http://repo-updater:3182'
|
|
- 'GRAFANA_SERVER_URL=http://grafana:3000'
|
|
- 'JAEGER_SERVER_URL=http://jaeger:16686'
|
|
- 'GITHUB_BASE_URL=http://github-proxy:3180'
|
|
- 'PROMETHEUS_URL=http://prometheus:9090'
|
|
volumes:
|
|
- 'sourcegraph-frontend-internal-0:/mnt/cache'
|
|
networks:
|
|
- sourcegraph
|
|
restart: always
|
|
healthcheck:
|
|
test: "wget -q 'http://127.0.0.1:3080/healthz' -O /dev/null || exit 1"
|
|
interval: 5s
|
|
timeout: 10s
|
|
retries: 5
|
|
start_period: 300s
|
|
depends_on:
|
|
pgsql:
|
|
condition: service_healthy
|
|
codeintel-db:
|
|
condition: service_healthy
|
|
|
|
|
|
# Description: Stores clones of repositories to perform Git operations.
|
|
#
|
|
# Disk: 200GB / persistent SSD
|
|
# Ports exposed to other Sourcegraph services: 3178/TCP 6060/TCP
|
|
# Ports exposed to the public internet: none
|
|
#
|
|
gitserver-0:
|
|
container_name: gitserver-0
|
|
image: 'index.docker.io/sourcegraph/gitserver:insiders@sha256:4f67f43a5bbefef5829da08be8f96235935d048218a22b96dd9f8af6f7fe7256'
|
|
cpus: 4
|
|
mem_limit: '8g'
|
|
environment:
|
|
- GOMAXPROCS=4
|
|
- 'SRC_FRONTEND_INTERNAL=sourcegraph-frontend-internal:3090'
|
|
- JAEGER_AGENT_HOST=jaeger
|
|
volumes:
|
|
- 'gitserver-0:/data/repos'
|
|
networks:
|
|
- sourcegraph
|
|
restart: always
|
|
hostname: gitserver-0
|
|
|
|
# Description: Backend for indexed text search operations.
|
|
#
|
|
# Disk: 200GB / persistent SSD
|
|
# Network: 100mbps
|
|
# Liveness probe: n/a
|
|
# Ports exposed to other Sourcegraph services: 6072/TCP
|
|
# Ports exposed to the public internet: none
|
|
#
|
|
zoekt-indexserver-0:
|
|
container_name: zoekt-indexserver-0
|
|
image: 'index.docker.io/sourcegraph/search-indexer:insiders@sha256:c0eed47bb3bdaff187501d7f6f0336ab407a2bdc8581fe8163ca973dde4f5d76'
|
|
mem_limit: '16g'
|
|
environment:
|
|
- GOMAXPROCS=8
|
|
- 'HOSTNAME=zoekt-webserver-0:6070'
|
|
- 'SRC_FRONTEND_INTERNAL=http://sourcegraph-frontend-internal:3090'
|
|
volumes:
|
|
- 'zoekt-0-shared:/data/index'
|
|
networks:
|
|
- sourcegraph
|
|
restart: always
|
|
hostname: zoekt-indexserver-0
|
|
# Description: Backend for indexed text search operations.
|
|
#
|
|
# Disk: 200GB / persistent SSD
|
|
# Ports exposed to other Sourcegraph services: 6070/TCP
|
|
# Ports exposed to the public internet: none
|
|
#
|
|
zoekt-webserver-0:
|
|
container_name: zoekt-webserver-0
|
|
image: 'index.docker.io/sourcegraph/indexed-searcher:insiders@sha256:fc5dba37a7cb08fbc2401559e5bce2299770d9cd2861ce555d3c89817089c878'
|
|
cpus: 8
|
|
mem_limit: '50g'
|
|
environment:
|
|
- GOMAXPROCS=8
|
|
- 'HOSTNAME=zoekt-webserver-0:6070'
|
|
healthcheck:
|
|
test: "wget -q 'http://127.0.0.1:6070/healthz' -O /dev/null || exit 1"
|
|
interval: 5s
|
|
timeout: 10s
|
|
retries: 3
|
|
volumes:
|
|
- 'zoekt-0-shared:/data/index'
|
|
networks:
|
|
- sourcegraph
|
|
restart: always
|
|
hostname: zoekt-webserver-0
|
|
|
|
# Description: Backend for text search operations.
|
|
#
|
|
# Disk: 128GB / non-persistent SSD
|
|
# Ports exposed to other Sourcegraph services: 3181/TCP 6060/TCP
|
|
# Ports exposed to the public internet: none
|
|
#
|
|
searcher-0:
|
|
container_name: searcher-0
|
|
image: 'index.docker.io/sourcegraph/searcher:insiders@sha256:2928e90db6b3f7737ef8846babde67cdb421427289c753e3fdac42412efbf42f'
|
|
cpus: 2
|
|
mem_limit: '2g'
|
|
environment:
|
|
- GOMAXPROCS=2
|
|
- 'SRC_FRONTEND_INTERNAL=sourcegraph-frontend-internal:3090'
|
|
- JAEGER_AGENT_HOST=jaeger
|
|
healthcheck:
|
|
test: "wget -q 'http://127.0.0.1:3181/healthz' -O /dev/null || exit 1"
|
|
interval: 5s
|
|
timeout: 10s
|
|
retries: 3
|
|
volumes:
|
|
- 'searcher-0:/mnt/cache'
|
|
networks:
|
|
- sourcegraph
|
|
restart: always
|
|
|
|
# Description: Rate-limiting proxy for the GitHub API.
|
|
#
|
|
# CPU: 1
|
|
# Memory: 1GB
|
|
# Disk: 1GB / non-persistent SSD (only for read-only config file)
|
|
# Ports exposed to other Sourcegraph services: 3180/TCP 6060/TCP
|
|
# Ports exposed to the public internet: none
|
|
#
|
|
github-proxy:
|
|
container_name: github-proxy
|
|
image: 'index.docker.io/sourcegraph/github-proxy:insiders@sha256:cbb091ece7dc9bd00a91d7c748df64b85e605e7baef7a4e78f0ab58deef21045'
|
|
cpus: 1
|
|
mem_limit: '1g'
|
|
environment:
|
|
- GOMAXPROCS=1
|
|
- 'SRC_FRONTEND_INTERNAL=sourcegraph-frontend-internal:3090'
|
|
- JAEGER_AGENT_HOST=jaeger
|
|
networks:
|
|
- sourcegraph
|
|
restart: always
|
|
|
|
# Description: Handles conversion of uploaded precise code intelligence bundles.
|
|
#
|
|
# Ports exposed to other Sourcegraph services: 3188/TCP
|
|
# Ports exposed to the public internet: none
|
|
#
|
|
precise-code-intel-worker:
|
|
container_name: precise-code-intel-worker
|
|
image: 'index.docker.io/sourcegraph/precise-code-intel-worker:insiders@sha256:f6874c1164627500d11ed4eba3d9cfb73ec4ccd23890485bf1f66d2dd1fa7691'
|
|
cpus: 2
|
|
mem_limit: '4g'
|
|
environment:
|
|
- 'SRC_FRONTEND_INTERNAL=sourcegraph-frontend-internal:3090'
|
|
- JAEGER_AGENT_HOST=jaeger
|
|
healthcheck:
|
|
test: "wget -q 'http://127.0.0.1:3188/healthz' -O /dev/null || exit 1"
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 60s
|
|
networks:
|
|
- sourcegraph
|
|
restart: always
|
|
|
|
# Description: Saved search query runner / notification service.
|
|
#
|
|
# Disk: 1GB / non-persistent SSD (only for read-only config file)
|
|
# Network: 100mbps
|
|
# Liveness probe: n/a
|
|
# Ports exposed to other Sourcegraph services: 3183/TCP 6060/TCP
|
|
# Ports exposed to the public internet: none
|
|
#
|
|
query-runner:
|
|
container_name: query-runner
|
|
image: 'index.docker.io/sourcegraph/query-runner:insiders@sha256:54773f1663b0e9b83ebc616c0ebaeea8190cf1b7afc36f495e26dc625b982a67'
|
|
cpus: 1
|
|
mem_limit: '1g'
|
|
environment:
|
|
- GOMAXPROCS=1
|
|
- 'SRC_FRONTEND_INTERNAL=sourcegraph-frontend-internal:3090'
|
|
- JAEGER_AGENT_HOST=jaeger
|
|
networks:
|
|
- sourcegraph
|
|
restart: always
|
|
|
|
# Description: Handles repository metadata (not Git data) lookups and updates from external code hosts and other similar services.
|
|
#
|
|
# Disk: 128GB / non-persistent SSD
|
|
# Ports exposed to other Sourcegraph services: 3182/TCP 6060/TCP
|
|
# Ports exposed to the public internet: none
|
|
#
|
|
repo-updater:
|
|
container_name: repo-updater
|
|
image: 'index.docker.io/sourcegraph/repo-updater:insiders@sha256:3d98205ae2f4585bdb6a8c7d99b15542187689fd3608e197c9f2e0afc5e496c9'
|
|
cpus: 4
|
|
mem_limit: '4g'
|
|
environment:
|
|
- GOMAXPROCS=1
|
|
- 'SRC_FRONTEND_INTERNAL=sourcegraph-frontend-internal:3090'
|
|
- JAEGER_AGENT_HOST=jaeger
|
|
- 'GITHUB_BASE_URL=http://github-proxy:3180'
|
|
volumes:
|
|
- 'repo-updater:/mnt/cache'
|
|
networks:
|
|
- sourcegraph
|
|
restart: always
|
|
|
|
# Description: Manages background processes.
|
|
#
|
|
# Disk: 128GB / non-persistent SSD
|
|
# Ports exposed to other Sourcegraph services: 3189/TCP 6060/TCP
|
|
# Ports exposed to the public internet: none
|
|
#
|
|
worker:
|
|
container_name: worker
|
|
image: 'index.docker.io/sourcegraph/worker:insiders@sha256:f8bab666696183f69208bef489c5ffa0531fcb40f696db9ce6ed98926827f08c'
|
|
cpus: 4
|
|
mem_limit: '4g'
|
|
environment:
|
|
- GOMAXPROCS=1
|
|
- 'SRC_FRONTEND_INTERNAL=sourcegraph-frontend-internal:3090'
|
|
- JAEGER_AGENT_HOST=jaeger
|
|
volumes:
|
|
- 'worker:/mnt/cache'
|
|
networks:
|
|
- sourcegraph
|
|
restart: always
|
|
|
|
# Description: Backend for syntax highlighting operations.
|
|
#
|
|
# Disk: none
|
|
# Ports exposed to other Sourcegraph services: 9238/TCP 6060/TCP
|
|
# Ports exposed to the public internet: none
|
|
#
|
|
syntect-server:
|
|
container_name: syntect-server
|
|
image: 'index.docker.io/sourcegraph/syntax-highlighter:insiders@sha256:98e85074ae6e0a6c1386d66e8a96c6568c416fd6206c9791d5cc0c4a5849af7e'
|
|
cpus: 4
|
|
mem_limit: '6g'
|
|
healthcheck:
|
|
test: "wget -q 'http://127.0.0.1:9238/health' -O /dev/null || exit 1"
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 5s
|
|
networks:
|
|
- sourcegraph
|
|
restart: always
|
|
|
|
# Description: Backend for symbols operations.
|
|
#
|
|
# Disk: 128GB / non-persistent SSD
|
|
# Ports exposed to other Sourcegraph services: 3184/TCP 6060/TCP
|
|
# Ports exposed to the public internet: none
|
|
#
|
|
symbols-0:
|
|
container_name: symbols-0
|
|
image: 'index.docker.io/sourcegraph/symbols:insiders@sha256:b117fda313714b45a03dd5cdb53d2274d8577d777ffd2c6ab7dbe22dedd9fd08'
|
|
cpus: 2
|
|
mem_limit: '4g'
|
|
environment:
|
|
- GOMAXPROCS=2
|
|
- 'SRC_FRONTEND_INTERNAL=sourcegraph-frontend-internal:3090'
|
|
- JAEGER_AGENT_HOST=jaeger
|
|
healthcheck:
|
|
test: "wget -q 'http://127.0.0.1:3184/healthz' -O /dev/null || exit 1"
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 60s
|
|
volumes:
|
|
- 'symbols-0:/mnt/cache'
|
|
networks:
|
|
- sourcegraph
|
|
restart: always
|
|
|
|
# Description: Prometheus collects metrics and aggregates them into graphs.
|
|
#
|
|
# Disk: 200GB / persistent SSD
|
|
# Ports exposed to other Sourcegraph services: none
|
|
# Ports exposed to the public internet: none (HTTP 9090 should be exposed to admins only)
|
|
#
|
|
prometheus:
|
|
container_name: prometheus
|
|
image: 'index.docker.io/sourcegraph/prometheus:insiders@sha256:7deb73094bd07c7d7940c6c8c8f743b510e52271158b30306174551af64ccbc0'
|
|
cpus: 4
|
|
mem_limit: '8g'
|
|
volumes:
|
|
- 'prometheus-v2:/prometheus'
|
|
- '../prometheus:/sg_prometheus_add_ons'
|
|
ports:
|
|
- '0.0.0.0:9090:9090'
|
|
networks:
|
|
- sourcegraph
|
|
restart: always
|
|
environment:
|
|
- 'SRC_FRONTEND_INTERNAL=sourcegraph-frontend-internal:3090'
|
|
|
|
# Description: Dashboards and graphs for Prometheus metrics.
|
|
#
|
|
# Disk: 2GB / persistent SSD
|
|
# Ports exposed to other Sourcegraph services: none
|
|
# Ports exposed to the public internet: none (HTTP 3370 should be exposed to admins only)
|
|
#
|
|
# Add the following environment variables if you wish to use an auth proxy with Grafana:
|
|
#
|
|
# 'GF_AUTH_PROXY_ENABLED=true'
|
|
# 'GF_AUTH_PROXY_HEADER_NAME='X-Forwarded-User'
|
|
# 'GF_SERVER_ROOT_URL='https://grafana.example.com'
|
|
grafana:
|
|
container_name: grafana
|
|
image: 'index.docker.io/sourcegraph/grafana:insiders@sha256:728828e10bb835ec7d69b3925753abb6c4605a007d57bb1d249cfd26e166266d'
|
|
cpus: 1
|
|
mem_limit: '1g'
|
|
volumes:
|
|
- 'grafana:/var/lib/grafana'
|
|
- '../grafana/datasources:/sg_config_grafana/provisioning/datasources'
|
|
- '../grafana/dashboards:/sg_grafana_additional_dashboards'
|
|
ports:
|
|
- '0.0.0.0:3370:3370'
|
|
networks:
|
|
- sourcegraph
|
|
restart: always
|
|
|
|
# Description: Publishes Prometheus metrics about Docker containers.
|
|
#
|
|
# Disk: none
|
|
# Ports exposed to other Sourcegraph services: 8080/TCP
|
|
# Ports exposed to the public internet: none
|
|
#
|
|
cadvisor:
|
|
container_name: cadvisor
|
|
image: 'index.docker.io/sourcegraph/cadvisor:insiders@sha256:fc88eeedf3929cdf228ca762f0580c768b3f4be2f08283c6c7dcef2bf17922f1'
|
|
cpus: 1
|
|
mem_limit: '1g'
|
|
volumes:
|
|
- '/:/rootfs:ro'
|
|
- '/var/run:/var/run:ro'
|
|
- '/sys:/sys:ro'
|
|
- '/var/lib/docker/:/var/lib/docker:ro'
|
|
- '/dev/disk/:/dev/disk:ro'
|
|
# Uncomment to enable container monitoring on MacOS
|
|
# - '/var/run/docker.sock:/var/run/docker.sock:ro'
|
|
networks:
|
|
- sourcegraph
|
|
restart: always
|
|
command:
|
|
- --port=8080
|
|
|
|
# Description: Jaeger all-in-one instance
|
|
# (https://www.jaegertracing.io/docs/1.17/getting-started/#all-in-one) for distributed tracing.
|
|
#
|
|
# Disk: none
|
|
# Ports exposed to other Sourcegraph services: 5778/TCP 6831/UDP 6832/UDP 14250/TCP
|
|
# Ports exposed to the public internet: none
|
|
# Ports exposed to site admins only: 16686/HTTP
|
|
#
|
|
jaeger:
|
|
container_name: jaeger
|
|
image: 'index.docker.io/sourcegraph/jaeger-all-in-one:insiders@sha256:a53e65a7625d9728859161db0c83b2c0139390b892fbbb99ca94e0d40f5a9f54'
|
|
cpus: 0.5
|
|
mem_limit: '512m'
|
|
ports:
|
|
# Query port
|
|
- '0.0.0.0:16686:16686'
|
|
# Collector port
|
|
- '0.0.0.0:14250:14250'
|
|
# Agent ports
|
|
- '0.0.0.0:5778:5778'
|
|
- '0.0.0.0:6831:6831'
|
|
- '0.0.0.0:6832:6832'
|
|
networks:
|
|
- sourcegraph
|
|
restart: always
|
|
command: ['--memory.max-traces=20000']
|
|
environment:
|
|
- 'SAMPLING_STRATEGIES_FILE=/etc/jaeger/sampling_strategies.json'
|
|
|
|
# Description: PostgreSQL database for various data.
|
|
#
|
|
# Disk: 128GB / persistent SSD
|
|
# Ports exposed to other Sourcegraph services: 5432/TCP 9187/TCP
|
|
# Ports exposed to the public internet: none
|
|
#
|
|
pgsql:
|
|
container_name: pgsql
|
|
image: 'index.docker.io/sourcegraph/postgres-12.6-alpine:insiders@sha256:695eaa5070a879863597b077c610129685a7ab4e8ac0039864b7aad3dfc5cf5b'
|
|
cpus: 4
|
|
mem_limit: '2g'
|
|
healthcheck:
|
|
test: '/liveness.sh'
|
|
interval: 10s
|
|
timeout: 1s
|
|
retries: 10
|
|
start_period: 15s
|
|
volumes:
|
|
- 'pgsql:/data/'
|
|
networks:
|
|
- sourcegraph
|
|
restart: always
|
|
stop_grace_period: 120s
|
|
|
|
# Description: PostgreSQL database for code intelligence data.
|
|
#
|
|
# Disk: 128GB / persistent SSD
|
|
# Network: 1Gbps
|
|
# Ports exposed to other Sourcegraph services: 5432/TCP 9187/TCP
|
|
# Ports exposed to the public internet: none
|
|
#
|
|
codeintel-db:
|
|
container_name: codeintel-db
|
|
image: 'index.docker.io/sourcegraph/codeintel-db:insiders@sha256:a525705803fc787d20aed15e74c739bbfb77eed4351cbb6d1a46edc89877319b'
|
|
cpus: 4
|
|
mem_limit: '2g'
|
|
healthcheck:
|
|
test: '/liveness.sh'
|
|
interval: 10s
|
|
timeout: 1s
|
|
retries: 10
|
|
start_period: 15s
|
|
volumes:
|
|
- 'codeintel-db:/data/'
|
|
networks:
|
|
- sourcegraph
|
|
restart: always
|
|
stop_grace_period: 120s
|
|
|
|
# Description: TimescaleDB time-series database for code insights data.
|
|
#
|
|
# Disk: 128GB / persistent SSD
|
|
# Network: 1Gbps
|
|
# Ports exposed to other Sourcegraph services: 5432/TCP 9187/TCP
|
|
# Ports exposed to the public internet: none
|
|
#
|
|
# Note: You should deploy this as a container, do not try to connect it to your external
|
|
# Postgres deployment (TimescaleDB is a bit special and most hosted Postgres deployments
|
|
# do not support TimescaleDB, the data here is akin to gitserver's data, where losing it
|
|
# would be bad but it can be rebuilt given enough time.)
|
|
codeinsights-db:
|
|
container_name: codeinsights-db
|
|
image: "index.docker.io/sourcegraph/codeinsights-db:insiders@sha256:56596dff34785b950fe69bcf051cbd2b7cd47fbc8d9733e8fd8af180047cdcb8"
|
|
cpus: 4
|
|
mem_limit: "2g"
|
|
environment:
|
|
- POSTGRES_PASSWORD=password
|
|
- PGDATA=/var/lib/postgresql/data/pgdata
|
|
volumes:
|
|
- "codeinsights-db:/var/lib/postgresql/data/"
|
|
networks:
|
|
- sourcegraph
|
|
restart: always
|
|
stop_grace_period: 120s
|
|
|
|
# Description: MinIO for storing LSIF uploads.
|
|
#
|
|
# Disk: 128GB / persistent SSD
|
|
# Network: 1Gbps
|
|
# Ports exposed to other Sourcegraph services: 9000/TCP
|
|
# Ports exposed to public internet: none
|
|
#
|
|
minio:
|
|
container_name: minio
|
|
image: 'index.docker.io/sourcegraph/minio:insiders@sha256:fccfad6cbd7b717472c7f200cdd65807ff742f883fe1d08986fc09ff3bd7df5e'
|
|
cpus: 1
|
|
mem_limit: '1g'
|
|
environment:
|
|
- 'MINIO_ACCESS_KEY=AKIAIOSFODNN7EXAMPLE'
|
|
- 'MINIO_SECRET_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY'
|
|
healthcheck:
|
|
test: ['CMD', 'curl', '-f', 'http://127.0.0.1:9000/minio/health/live']
|
|
interval: 10s
|
|
timeout: 1s
|
|
retries: 3
|
|
start_period: 15s
|
|
volumes:
|
|
- 'minio:/data'
|
|
networks:
|
|
- sourcegraph
|
|
restart: always
|
|
command: ['server', '/data']
|
|
|
|
# Description: Redis for storing short-lived caches.
|
|
#
|
|
# Disk: 128GB / persistent SSD
|
|
# Ports exposed to other Sourcegraph services: 6379/TCP 9121/TCP
|
|
# Ports exposed to the public internet: none
|
|
#
|
|
redis-cache:
|
|
container_name: redis-cache
|
|
image: 'index.docker.io/sourcegraph/redis-cache:insiders@sha256:f985f2aac930e1c4c05ce4d6cfd1a5a2f17214d792e112899f9763a7f47fb43c'
|
|
cpus: 1
|
|
mem_limit: '7g'
|
|
volumes:
|
|
- 'redis-cache:/redis-data'
|
|
networks:
|
|
- sourcegraph
|
|
restart: always
|
|
# Description: Redis for storing semi-persistent data like user sessions.
|
|
#
|
|
# Disk: 128GB / persistent SSD
|
|
# Ports exposed to other Sourcegraph services: 6379/TCP 9121/TCP
|
|
# Ports exposed to the public internet: none
|
|
#
|
|
redis-store:
|
|
container_name: redis-store
|
|
image: 'index.docker.io/sourcegraph/redis-store:insiders@sha256:2ba46cbd22081cc0cd1b896f4b2890e0f3d60219db45c5bd7ed39becb0a71290'
|
|
cpus: 1
|
|
mem_limit: '7g'
|
|
volumes:
|
|
- 'redis-store:/redis-data'
|
|
networks:
|
|
- sourcegraph
|
|
restart: always
|
|
|
|
volumes:
|
|
caddy:
|
|
gitserver-0:
|
|
grafana:
|
|
pgsql:
|
|
codeintel-db:
|
|
codeinsights-db:
|
|
minio:
|
|
prometheus-v2:
|
|
redis-cache:
|
|
redis-store:
|
|
repo-updater:
|
|
worker:
|
|
searcher-0:
|
|
sourcegraph-frontend-0:
|
|
sourcegraph-frontend-internal-0:
|
|
symbols-0:
|
|
zoekt-0-shared:
|
|
networks:
|
|
sourcegraph:
|