@@ -78,6 +78,7 @@ services:
7878 - JAEGER_AGENT_HOST=jaeger
7979 - PGHOST=pgsql
8080 - CODEINTEL_PGHOST=codeintel-db
81+ - CODEINSIGHTS_PGDATASOURCE=postgres://postgres:password@codeinsights-db:5432/postgres
8182 - ' SRC_GIT_SERVERS=gitserver-0:3178'
8283 - ' SRC_SYNTECT_SERVER=http://syntect-server:9238'
8384 - ' SEARCHER_URL=http://searcher-0:3181'
@@ -117,6 +118,7 @@ services:
117118 - GOMAXPROCS=4
118119 - PGHOST=pgsql
119120 - CODEINTEL_PGHOST=codeintel-db
121+ - CODEINSIGHTS_PGDATASOURCE=postgres://postgres:password@codeinsights-db:5432/postgres
120122 - ' SRC_GIT_SERVERS=gitserver-0:3178'
121123 - ' SRC_SYNTECT_SERVER=http://syntect-server:9238'
122124 - ' SEARCHER_URL=http://searcher-0:3181'
@@ -510,6 +512,30 @@ services:
510512 - sourcegraph
511513 restart : always
512514
515+ # Description: TimescaleDB time-series database for code insights data.
516+ #
517+ # Disk: 128GB / persistent SSD
518+ # Network: 1Gbps
519+ # Ports exposed to other Sourcegraph services: 5432/TCP 9187/TCP
520+ # Ports exposed to the public internet: none
521+ #
522+ # Note: You should deploy this as a container, do not try to connect it to your external
523+ # Postgres deployment (TimescaleDB is a bit special and most hosted Postgres deployments
524+ # do not support TimescaleDB, the data here is akin to gitserver's data, where losing it
525+ # would be bad but it can be rebuilt given enough time.)
526+ codeinsights-db :
527+ container_name : codeinsights-db
528+ image : " index.docker.io/sourcegraph/codeinsights-db:insiders@sha256:f985af2fef860cc48be40ded864df025b8794b02b86e66cbc6c55bfe3c418831"
529+ cpus : 4
530+ mem_limit : " 2g"
531+ environment :
532+ - POSTGRES_PASSWORD=password
533+ volumes :
534+ - " codeinsights-db:/data/"
535+ networks :
536+ - sourcegraph
537+ restart : always
538+
513539 # Description: MinIO for storing LSIF uploads.
514540 #
515541 # Disk: 128GB / persistent SSD
@@ -577,6 +603,7 @@ volumes:
577603 grafana :
578604 pgsql :
579605 codeintel-db :
606+ codeinsights-db :
580607 minio :
581608 prometheus-v2 :
582609 redis-cache :
0 commit comments