2021-03-29 08:14:53 +00:00
|
|
|
env:
|
2021-07-21 15:37:24 +00:00
|
|
|
PGPORT: 5432
|
|
|
|
|
PGHOST: localhost
|
|
|
|
|
PGUSER: sourcegraph
|
|
|
|
|
PGPASSWORD: sourcegraph
|
|
|
|
|
PGDATABASE: sourcegraph
|
|
|
|
|
PGSSLMODE: disable
|
|
|
|
|
|
2021-03-29 08:14:53 +00:00
|
|
|
SRC_REPOS_DIR: $HOME/.sourcegraph/repos
|
|
|
|
|
SRC_LOG_LEVEL: info
|
|
|
|
|
SRC_LOG_FORMAT: condensed
|
|
|
|
|
SRC_GIT_SERVER_1: 127.0.0.1:3178
|
|
|
|
|
SRC_GIT_SERVERS: 127.0.0.1:3178
|
|
|
|
|
|
|
|
|
|
# Enable sharded indexed search mode:
|
|
|
|
|
INDEXED_SEARCH_SERVERS: localhost:3070 localhost:3071
|
|
|
|
|
|
2021-08-06 08:51:09 +00:00
|
|
|
GO111MODULE: 'on'
|
|
|
|
|
|
2021-03-29 08:14:53 +00:00
|
|
|
DEPLOY_TYPE: dev
|
|
|
|
|
|
2021-05-31 07:51:39 +00:00
|
|
|
SRC_HTTP_ADDR: ':3082'
|
2021-03-29 08:14:53 +00:00
|
|
|
|
|
|
|
|
GITHUB_BASE_URL: http://127.0.0.1:3180
|
|
|
|
|
# I don't think we even need to set these?
|
|
|
|
|
SEARCHER_URL: http://127.0.0.1:3181
|
|
|
|
|
REPO_UPDATER_URL: http://127.0.0.1:3182
|
|
|
|
|
REDIS_ENDPOINT: 127.0.0.1:6379
|
|
|
|
|
SYMBOLS_URL: http://localhost:3184
|
|
|
|
|
SRC_SYNTECT_SERVER: http://localhost:9238
|
|
|
|
|
SRC_FRONTEND_INTERNAL: localhost:3090
|
|
|
|
|
GRAFANA_SERVER_URL: http://localhost:3370
|
|
|
|
|
PROMETHEUS_URL: http://localhost:9090
|
|
|
|
|
JAEGER_SERVER_URL: http://localhost:16686
|
|
|
|
|
ZOEKT_HOST: localhost:3070
|
|
|
|
|
|
2021-07-05 10:24:20 +00:00
|
|
|
SRC_PROF_HTTP: ''
|
|
|
|
|
SRC_PROF_SERVICES: |
|
|
|
|
|
[
|
|
|
|
|
{ "Name": "frontend", "Host": "127.0.0.1:6063" },
|
|
|
|
|
{ "Name": "enterprise-frontend", "Host": "127.0.0.1:6063" },
|
|
|
|
|
{ "Name": "gitserver", "Host": "127.0.0.1:6068" },
|
|
|
|
|
{ "Name": "searcher", "Host": "127.0.0.1:6069" },
|
|
|
|
|
{ "Name": "symbols", "Host": "127.0.0.1:6071" },
|
|
|
|
|
{ "Name": "repo-updater", "Host": "127.0.0.1:6074" },
|
|
|
|
|
{ "Name": "enterprise-repo-updater", "Host": "127.0.0.1:6074" },
|
|
|
|
|
{ "Name": "precise-code-intel-worker", "Host": "127.0.0.1:6088" },
|
|
|
|
|
{ "Name": "worker", "Host": "127.0.0.1:6089" },
|
|
|
|
|
{ "Name": "enterprise-worker", "Host": "127.0.0.1:6089" },
|
2021-07-06 15:14:39 +00:00
|
|
|
{ "Name": "executor-codeintel", "Host": "127.0.0.1:6092" },
|
|
|
|
|
{ "Name": "executor-batches", "Host": "127.0.0.1:6093" },
|
2021-07-05 10:24:20 +00:00
|
|
|
{ "Name": "zoekt-indexserver-0", "Host": "127.0.0.1:6072" },
|
|
|
|
|
{ "Name": "zoekt-indexserver-1", "Host": "127.0.0.1:6073" },
|
|
|
|
|
{ "Name": "zoekt-webserver-0", "Host": "127.0.0.1:3070", "DefaultPath": "/debug/requests/" },
|
|
|
|
|
{ "Name": "zoekt-webserver-1", "Host": "127.0.0.1:3071", "DefaultPath": "/debug/requests/" }
|
|
|
|
|
]
|
2021-03-29 08:14:53 +00:00
|
|
|
OVERRIDE_AUTH_SECRET: sSsNGlI8fBDftBz0LDQNXEnP6lrWdt9g0fK6hoFvGQ
|
|
|
|
|
# Settings/config
|
|
|
|
|
SITE_CONFIG_FILE: ./dev/site-config.json
|
|
|
|
|
SITE_CONFIG_ALLOW_EDITS: true
|
|
|
|
|
GLOBAL_SETTINGS_FILE: ./dev/global-settings.json
|
|
|
|
|
GLOBAL_SETTINGS_ALLOW_EDITS: true
|
|
|
|
|
|
2021-04-14 10:53:56 +00:00
|
|
|
# Point codeintel to the `frontend` database in development
|
|
|
|
|
CODEINTEL_PGPORT: $PGPORT
|
|
|
|
|
CODEINTEL_PGHOST: $PGHOST
|
|
|
|
|
CODEINTEL_PGUSER: $PGUSER
|
|
|
|
|
CODEINTEL_PGPASSWORD: $PGPASSWORD
|
|
|
|
|
CODEINTEL_PGDATABASE: $PGDATABASE
|
|
|
|
|
CODEINTEL_PGSSLMODE: $PGSSLMODE
|
|
|
|
|
CODEINTEL_PGDATASOURCE: $PGDATASOURCE
|
|
|
|
|
CODEINTEL_PG_ALLOW_SINGLE_DB: true
|
|
|
|
|
|
2021-05-07 11:01:10 +00:00
|
|
|
# Required for `frontend` and `web` commands
|
|
|
|
|
SOURCEGRAPH_HTTPS_DOMAIN: sourcegraph.test
|
|
|
|
|
SOURCEGRAPH_HTTPS_PORT: 3443
|
|
|
|
|
|
|
|
|
|
# Required for `web` commands
|
2021-10-20 14:07:10 +00:00
|
|
|
NODE_OPTIONS: '--max_old_space_size=8192'
|
2021-05-07 11:01:10 +00:00
|
|
|
# Default `NODE_ENV` to `development`
|
|
|
|
|
NODE_ENV: development
|
|
|
|
|
|
2021-05-31 07:51:39 +00:00
|
|
|
# Required for codeintel uploadstore
|
|
|
|
|
MINIO_ACCESS_KEY: AKIAIOSFODNN7EXAMPLE
|
|
|
|
|
MINIO_SECRET_KEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
|
|
|
|
|
PRECISE_CODE_INTEL_UPLOAD_AWS_ENDPOINT: http://localhost:9000
|
|
|
|
|
|
|
|
|
|
# Required for frontend and executor to communicate
|
|
|
|
|
EXECUTOR_FRONTEND_URL: http://localhost:3080
|
2021-10-07 15:57:55 +00:00
|
|
|
# Must match the secret defined in the site config.
|
2021-10-07 16:24:24 +00:00
|
|
|
EXECUTOR_FRONTEND_PASSWORD: hunter2hunter2hunter2
|
2021-05-31 07:51:39 +00:00
|
|
|
|
|
|
|
|
# Disable firecracker inside executor in dev
|
|
|
|
|
EXECUTOR_USE_FIRECRACKER: false
|
|
|
|
|
EXECUTOR_IMAGE_ARCHIVE_PATH: $HOME/.sourcegraph/images
|
|
|
|
|
|
|
|
|
|
# Disable auto-indexing the CNCF repo group (this only works in Cloud)
|
|
|
|
|
# This setting will be going away soon
|
|
|
|
|
DISABLE_CNCF: notonmybox
|
|
|
|
|
|
2021-05-21 16:01:11 +00:00
|
|
|
# Code Insights uses a separate database, because it's easier to run TimescaleDB in
|
|
|
|
|
# Docker than install as a Postgres extension in dev environments.
|
|
|
|
|
CODEINSIGHTS_PGDATASOURCE: postgres://postgres:password@127.0.0.1:5435/postgres
|
|
|
|
|
DB_STARTUP_TIMEOUT: 120s # codeinsights-db needs more time to start in some instances.
|
|
|
|
|
DISABLE_CODE_INSIGHTS_HISTORICAL: true
|
|
|
|
|
DISABLE_CODE_INSIGHTS: true
|
2021-07-13 10:32:31 +00:00
|
|
|
ENABLE_STREAMING_REPOS_SYNCER: true
|
2021-05-21 16:01:11 +00:00
|
|
|
|
2021-03-29 08:14:53 +00:00
|
|
|
commands:
|
|
|
|
|
frontend:
|
2021-07-20 11:05:17 +00:00
|
|
|
cmd: .bin/frontend
|
2021-10-09 01:47:08 +00:00
|
|
|
install: |
|
|
|
|
|
if [ -n "$DELVE" ]; then
|
|
|
|
|
export GCFLAGS='all=-N -l'
|
|
|
|
|
fi
|
|
|
|
|
go build -gcflags="$GCFLAGS" -o .bin/frontend github.com/sourcegraph/sourcegraph/cmd/frontend
|
2021-06-02 09:38:06 +00:00
|
|
|
checkBinary: .bin/frontend
|
2021-03-29 08:14:53 +00:00
|
|
|
env:
|
|
|
|
|
CONFIGURATION_MODE: server
|
|
|
|
|
USE_ENHANCED_LANGUAGE_DETECTION: false
|
2021-04-12 12:14:41 +00:00
|
|
|
# frontend processes need this to be so that the paths to the assets are rendered correctly
|
|
|
|
|
WEBPACK_DEV_SERVER: 1
|
2021-03-29 08:14:53 +00:00
|
|
|
watch:
|
2021-05-31 07:51:39 +00:00
|
|
|
- lib
|
2021-03-29 08:14:53 +00:00
|
|
|
- internal
|
|
|
|
|
- cmd/frontend
|
|
|
|
|
|
|
|
|
|
enterprise-frontend:
|
2021-04-01 11:59:48 +00:00
|
|
|
cmd: |
|
|
|
|
|
# TODO: This should be fixed
|
|
|
|
|
export SOURCEGRAPH_LICENSE_GENERATION_KEY=$(cat ../dev-private/enterprise/dev/test-license-generation-key.pem)
|
|
|
|
|
.bin/enterprise-frontend
|
2021-10-09 01:47:08 +00:00
|
|
|
install: |
|
|
|
|
|
if [ -n "$DELVE" ]; then
|
|
|
|
|
export GCFLAGS='all=-N -l'
|
|
|
|
|
fi
|
|
|
|
|
go build -gcflags="$GCFLAGS" -o .bin/enterprise-frontend github.com/sourcegraph/sourcegraph/enterprise/cmd/frontend
|
2021-06-02 09:38:06 +00:00
|
|
|
checkBinary: .bin/enterprise-frontend
|
2021-04-01 11:59:48 +00:00
|
|
|
env:
|
|
|
|
|
CONFIGURATION_MODE: server
|
|
|
|
|
USE_ENHANCED_LANGUAGE_DETECTION: false
|
|
|
|
|
ENTERPRISE: 1
|
|
|
|
|
SITE_CONFIG_FILE: '../dev-private/enterprise/dev/site-config.json'
|
|
|
|
|
EXTSVC_CONFIG_FILE: '../dev-private/enterprise/dev/external-services-config.json'
|
2021-09-27 14:34:19 +00:00
|
|
|
SITE_CONFIG_ESCAPE_HATCH_PATH: '$HOME/.sourcegraph/site-config.json'
|
2021-04-12 12:14:41 +00:00
|
|
|
# frontend processes need this to be so that the paths to the assets are rendered correctly
|
|
|
|
|
WEBPACK_DEV_SERVER: 1
|
2021-03-29 08:14:53 +00:00
|
|
|
watch:
|
2021-05-31 07:51:39 +00:00
|
|
|
- lib
|
2021-03-29 08:14:53 +00:00
|
|
|
- internal
|
|
|
|
|
- cmd/frontend
|
2021-05-31 07:51:39 +00:00
|
|
|
- enterprise/internal
|
2021-03-29 08:14:53 +00:00
|
|
|
- enterprise/cmd/frontend
|
|
|
|
|
|
|
|
|
|
gitserver:
|
|
|
|
|
cmd: .bin/gitserver
|
2021-10-09 01:47:08 +00:00
|
|
|
install: |
|
|
|
|
|
if [ -n "$DELVE" ]; then
|
|
|
|
|
export GCFLAGS='all=-N -l'
|
|
|
|
|
fi
|
|
|
|
|
go build -gcflags="$GCFLAGS" -o .bin/gitserver github.com/sourcegraph/sourcegraph/cmd/gitserver
|
2021-06-02 09:38:06 +00:00
|
|
|
checkBinary: .bin/gitserver
|
2021-03-29 08:14:53 +00:00
|
|
|
env:
|
|
|
|
|
HOSTNAME: 127.0.0.1:3178
|
|
|
|
|
watch:
|
2021-05-31 07:51:39 +00:00
|
|
|
- lib
|
2021-03-29 08:14:53 +00:00
|
|
|
- internal
|
|
|
|
|
- cmd/gitserver
|
|
|
|
|
|
|
|
|
|
github-proxy:
|
|
|
|
|
cmd: .bin/github-proxy
|
2021-10-09 01:47:08 +00:00
|
|
|
install: |
|
|
|
|
|
if [ -n "$DELVE" ]; then
|
|
|
|
|
export GCFLAGS='all=-N -l'
|
|
|
|
|
fi
|
|
|
|
|
go build -gcflags="$GCFLAGS" -o .bin/github-proxy github.com/sourcegraph/sourcegraph/cmd/github-proxy
|
2021-06-02 09:38:06 +00:00
|
|
|
checkBinary: .bin/github-proxy
|
2021-03-29 08:14:53 +00:00
|
|
|
env:
|
|
|
|
|
HOSTNAME: 127.0.0.1:3178
|
|
|
|
|
watch:
|
2021-05-31 07:51:39 +00:00
|
|
|
- lib
|
|
|
|
|
- internal
|
2021-03-29 08:14:53 +00:00
|
|
|
- cmd/github-proxy
|
|
|
|
|
|
2021-06-04 19:48:13 +00:00
|
|
|
worker:
|
2021-07-20 11:05:17 +00:00
|
|
|
cmd: .bin/worker
|
2021-10-09 01:47:08 +00:00
|
|
|
install: |
|
|
|
|
|
if [ -n "$DELVE" ]; then
|
|
|
|
|
export GCFLAGS='all=-N -l'
|
|
|
|
|
fi
|
|
|
|
|
go build -gcflags="$GCFLAGS" -o .bin/worker github.com/sourcegraph/sourcegraph/cmd/worker
|
2021-06-04 19:48:13 +00:00
|
|
|
watch:
|
|
|
|
|
- lib
|
|
|
|
|
- internal
|
|
|
|
|
- cmd/worker
|
|
|
|
|
|
|
|
|
|
enterprise-worker:
|
2021-07-20 11:05:17 +00:00
|
|
|
cmd: .bin/worker
|
2021-10-09 01:47:08 +00:00
|
|
|
install: |
|
|
|
|
|
if [ -n "$DELVE" ]; then
|
|
|
|
|
export GCFLAGS='all=-N -l'
|
|
|
|
|
fi
|
|
|
|
|
go build -gcflags="$GCFLAGS" -o .bin/worker github.com/sourcegraph/sourcegraph/enterprise/cmd/worker
|
2021-06-04 19:48:13 +00:00
|
|
|
watch:
|
|
|
|
|
- lib
|
|
|
|
|
- internal
|
|
|
|
|
- enterprise/internal
|
|
|
|
|
- cmd/worker
|
|
|
|
|
- enterprise/cmd/worker
|
|
|
|
|
|
2021-03-29 08:14:53 +00:00
|
|
|
repo-updater:
|
|
|
|
|
cmd: .bin/repo-updater
|
2021-10-09 01:47:08 +00:00
|
|
|
install: |
|
|
|
|
|
if [ -n "$DELVE" ]; then
|
|
|
|
|
export GCFLAGS='all=-N -l'
|
|
|
|
|
fi
|
|
|
|
|
go build -gcflags="$GCFLAGS" -o .bin/repo-updater github.com/sourcegraph/sourcegraph/cmd/repo-updater
|
2021-06-02 09:38:06 +00:00
|
|
|
checkBinary: .bin/repo-updater
|
2021-03-29 08:14:53 +00:00
|
|
|
watch:
|
2021-05-31 07:51:39 +00:00
|
|
|
- lib
|
2021-03-29 08:14:53 +00:00
|
|
|
- internal
|
|
|
|
|
- cmd/repo-updater
|
|
|
|
|
|
|
|
|
|
enterprise-repo-updater:
|
2021-06-02 09:38:06 +00:00
|
|
|
cmd: .bin/enterprise-repo-updater
|
2021-10-09 01:47:08 +00:00
|
|
|
install: |
|
|
|
|
|
if [ -n "$DELVE" ]; then
|
|
|
|
|
export GCFLAGS='all=-N -l'
|
|
|
|
|
fi
|
|
|
|
|
go build -gcflags="$GCFLAGS" -o .bin/enterprise-repo-updater github.com/sourcegraph/sourcegraph/enterprise/cmd/repo-updater
|
2021-06-02 09:38:06 +00:00
|
|
|
checkBinary: .bin/enterprise-repo-updater
|
2021-03-29 08:14:53 +00:00
|
|
|
env:
|
|
|
|
|
HOSTNAME: $SRC_GIT_SERVER_1
|
2021-04-01 11:59:48 +00:00
|
|
|
ENTERPRISE: 1
|
2021-03-29 08:14:53 +00:00
|
|
|
watch:
|
2021-05-31 07:51:39 +00:00
|
|
|
- lib
|
2021-03-29 08:14:53 +00:00
|
|
|
- internal
|
|
|
|
|
- cmd/repo-updater
|
2021-05-31 07:51:39 +00:00
|
|
|
- enterprise/internal
|
2021-03-29 08:14:53 +00:00
|
|
|
- enterprise/cmd/repo-updater
|
|
|
|
|
|
|
|
|
|
symbols:
|
2021-09-28 01:38:37 +00:00
|
|
|
cmd: .bin/symbols
|
2021-03-29 08:14:53 +00:00
|
|
|
install: |
|
2021-09-28 01:38:37 +00:00
|
|
|
# Remove old pcre libs that might still be lying around.
|
|
|
|
|
# TODO delete these two lines after 2021-10-24 (1 month after removal of pcre).
|
|
|
|
|
rm -f libsqlite3-pcre.dylib || true
|
|
|
|
|
rm -f libsqlite3-pcre.so || true
|
|
|
|
|
|
2021-10-09 01:47:08 +00:00
|
|
|
if [ -n "$DELVE" ]; then
|
|
|
|
|
export GCFLAGS='all=-N -l'
|
|
|
|
|
fi
|
|
|
|
|
|
2021-03-29 08:14:53 +00:00
|
|
|
./cmd/symbols/build-ctags.sh &&
|
2021-10-09 01:47:08 +00:00
|
|
|
go build -gcflags="$GCFLAGS" -o .bin/symbols github.com/sourcegraph/sourcegraph/cmd/symbols
|
2021-06-02 09:38:06 +00:00
|
|
|
checkBinary: .bin/symbols
|
2021-03-29 08:14:53 +00:00
|
|
|
env:
|
|
|
|
|
CTAGS_COMMAND: cmd/symbols/universal-ctags-dev
|
|
|
|
|
CTAGS_PROCESSES: 2
|
|
|
|
|
watch:
|
2021-05-31 07:51:39 +00:00
|
|
|
- lib
|
2021-03-29 08:14:53 +00:00
|
|
|
- internal
|
|
|
|
|
- cmd/symbols
|
|
|
|
|
|
|
|
|
|
searcher:
|
|
|
|
|
cmd: .bin/searcher
|
2021-10-09 01:47:08 +00:00
|
|
|
install: |
|
|
|
|
|
if [ -n "$DELVE" ]; then
|
|
|
|
|
export GCFLAGS='all=-N -l'
|
|
|
|
|
fi
|
|
|
|
|
go build -gcflags="$GCFLAGS" -o .bin/searcher github.com/sourcegraph/sourcegraph/cmd/searcher
|
2021-06-02 09:38:06 +00:00
|
|
|
checkBinary: .bin/searcher
|
2021-03-29 08:14:53 +00:00
|
|
|
watch:
|
2021-05-31 07:51:39 +00:00
|
|
|
- lib
|
2021-03-29 08:14:53 +00:00
|
|
|
- internal
|
|
|
|
|
- cmd/searcher
|
|
|
|
|
|
|
|
|
|
caddy:
|
2021-05-06 14:58:47 +00:00
|
|
|
ignoreStdout: true
|
|
|
|
|
ignoreStderr: true
|
2021-10-19 22:06:22 +00:00
|
|
|
cmd: .bin/caddy_${CADDY_VERSION}_$([[ "$(go env GOOS)" = "darwin" ]] && echo "mac" || echo "$(go env GOOS)")_$(go env GOARCH) run --watch --config=dev/Caddyfile
|
2021-03-29 08:14:53 +00:00
|
|
|
install: |
|
|
|
|
|
case "$(go env GOOS)" in
|
|
|
|
|
linux)
|
|
|
|
|
os="linux"
|
|
|
|
|
;;
|
|
|
|
|
darwin)
|
|
|
|
|
os="mac"
|
|
|
|
|
;;
|
|
|
|
|
esac
|
2021-10-19 11:46:06 +00:00
|
|
|
name="caddy_${CADDY_VERSION}_${os}_$(go env GOARCH)"
|
2021-10-19 22:06:22 +00:00
|
|
|
target="$PWD/.bin/$name"
|
2021-03-29 08:14:53 +00:00
|
|
|
url="https://github.com/caddyserver/caddy/releases/download/v${CADDY_VERSION}/${name}.tar.gz"
|
|
|
|
|
|
|
|
|
|
if [ ! -f "${target}" ]; then
|
|
|
|
|
echo "downloading ${url}" 1>&2
|
|
|
|
|
curl -sS -L -f "${url}" | tar -xz --to-stdout "caddy" >"${target}.tmp"
|
|
|
|
|
mv "${target}.tmp" "${target}"
|
2021-11-10 15:16:15 +00:00
|
|
|
chmod +x "${target}"
|
2021-03-29 08:14:53 +00:00
|
|
|
fi
|
|
|
|
|
env:
|
2021-10-19 22:06:22 +00:00
|
|
|
CADDY_VERSION: 2.4.5
|
2021-03-29 08:14:53 +00:00
|
|
|
|
|
|
|
|
web:
|
2021-09-01 08:41:58 +00:00
|
|
|
cmd: ./node_modules/.bin/gulp --color dev
|
2021-03-29 08:14:53 +00:00
|
|
|
install: yarn --no-progress
|
|
|
|
|
|
2021-04-01 11:59:48 +00:00
|
|
|
enterprise-web:
|
2021-09-01 08:41:58 +00:00
|
|
|
cmd: ./node_modules/.bin/gulp --color dev
|
2021-04-01 11:59:48 +00:00
|
|
|
install: yarn --no-progress
|
|
|
|
|
env:
|
|
|
|
|
ENTERPRISE: 1
|
2021-05-07 11:01:10 +00:00
|
|
|
|
2021-10-22 10:30:29 +00:00
|
|
|
web-standalone-http:
|
2021-05-07 11:01:10 +00:00
|
|
|
cmd: yarn workspace @sourcegraph/web serve:dev
|
2021-05-12 12:19:56 +00:00
|
|
|
install: yarn --no-progress
|
2021-05-07 11:01:10 +00:00
|
|
|
env:
|
|
|
|
|
WEBPACK_SERVE_INDEX: true
|
|
|
|
|
SOURCEGRAPH_API_URL: https://k8s.sgdev.org
|
|
|
|
|
|
2021-10-22 10:30:29 +00:00
|
|
|
web-standalone-http-prod:
|
2021-05-07 11:01:10 +00:00
|
|
|
cmd: yarn workspace @sourcegraph/web serve:prod
|
|
|
|
|
install: yarn workspace @sourcegraph/web run build
|
|
|
|
|
env:
|
|
|
|
|
NODE_ENV: production
|
|
|
|
|
WEBPACK_SERVE_INDEX: true
|
|
|
|
|
SOURCEGRAPH_API_URL: https://k8s.sgdev.org
|
|
|
|
|
|
2021-03-29 08:14:53 +00:00
|
|
|
docsite:
|
2021-08-05 08:19:45 +00:00
|
|
|
cmd: .bin/docsite_${DOCSITE_VERSION} -config doc/docsite.json serve -http=localhost:5080
|
2021-03-29 08:14:53 +00:00
|
|
|
install: |
|
2021-08-05 08:19:45 +00:00
|
|
|
if [ ! -x .bin/docsite_${DOCSITE_VERSION} ]; then
|
|
|
|
|
curl -sS -L -f \
|
|
|
|
|
"https://github.com/sourcegraph/docsite/releases/download/${DOCSITE_VERSION}/docsite_${DOCSITE_VERSION}_$(go env GOOS)_$(go env GOARCH)" \
|
|
|
|
|
-o .bin/docsite_${DOCSITE_VERSION} && chmod +x .bin/docsite_${DOCSITE_VERSION}
|
|
|
|
|
fi
|
2021-03-29 08:14:53 +00:00
|
|
|
env:
|
2021-10-27 22:48:33 +00:00
|
|
|
DOCSITE_VERSION: v1.8.4 # make sure to update all DOCSITE_VERSION
|
2021-03-29 08:14:53 +00:00
|
|
|
|
2021-09-28 04:18:12 +00:00
|
|
|
syntax-highlighter:
|
2021-05-06 14:58:47 +00:00
|
|
|
ignoreStdout: true
|
|
|
|
|
ignoreStderr: true
|
2021-03-29 08:14:53 +00:00
|
|
|
cmd: |
|
2021-09-28 04:18:12 +00:00
|
|
|
docker run --name=syntax-highlighter --rm -p9238:9238 \
|
2021-03-29 08:14:53 +00:00
|
|
|
-e WORKERS=1 -e ROCKET_ADDRESS=0.0.0.0 \
|
2021-09-24 21:40:35 +00:00
|
|
|
sourcegraph/syntax-highlighter@sha256:92a5c181dbf2d8aead5171c985139bf38c496bef2ac98afbd64c3612967fe5cc
|
2021-09-28 04:18:12 +00:00
|
|
|
install: |
|
|
|
|
|
# Remove containers by the old name, too.
|
|
|
|
|
docker inspect syntect_server >/dev/null 2>&1 && docker rm -f syntect_server || true
|
|
|
|
|
docker inspect syntax-highlighter >/dev/null 2>&1 && docker rm -f syntax-highlighter || true
|
2021-03-29 08:14:53 +00:00
|
|
|
env:
|
|
|
|
|
# This is not needed actually
|
|
|
|
|
INSECURE_DEV: 1
|
|
|
|
|
|
2021-05-31 07:51:39 +00:00
|
|
|
zoekt-indexserver-template: &zoekt_indexserver_template
|
2021-03-29 08:14:53 +00:00
|
|
|
cmd: |
|
2021-08-20 08:42:05 +00:00
|
|
|
env PATH="${PWD}/.bin:$PATH" .bin/zoekt-sourcegraph-indexserver \
|
2021-03-29 08:14:53 +00:00
|
|
|
-sourcegraph_url 'http://localhost:3090' \
|
2021-05-21 16:01:11 +00:00
|
|
|
-index "$HOME/.sourcegraph/zoekt/index-$ZOEKT_NUM" \
|
|
|
|
|
-hostname "localhost:$ZOEKT_HOSTNAME_PORT" \
|
2021-03-29 08:14:53 +00:00
|
|
|
-interval 1m \
|
2021-05-21 16:01:11 +00:00
|
|
|
-listen ":$ZOEKT_LISTEN_PORT" \
|
2021-03-29 08:14:53 +00:00
|
|
|
-cpu_fraction 0.25
|
|
|
|
|
install: |
|
|
|
|
|
mkdir -p .bin
|
|
|
|
|
export GOBIN="${PWD}/.bin"
|
2021-04-01 11:59:48 +00:00
|
|
|
go install github.com/google/zoekt/cmd/zoekt-archive-index
|
|
|
|
|
go install github.com/google/zoekt/cmd/zoekt-git-index
|
|
|
|
|
go install github.com/google/zoekt/cmd/zoekt-sourcegraph-indexserver
|
2021-06-02 09:38:06 +00:00
|
|
|
checkBinary: .bin/zoekt-sourcegraph-indexserver
|
2021-05-21 16:01:11 +00:00
|
|
|
env: &zoektenv
|
2021-04-01 11:59:48 +00:00
|
|
|
GOGC: 50
|
2021-04-22 07:17:00 +00:00
|
|
|
CTAGS_COMMAND: cmd/symbols/universal-ctags-dev
|
2021-04-01 11:59:48 +00:00
|
|
|
|
2021-05-21 16:01:11 +00:00
|
|
|
zoekt-indexserver-0:
|
2021-05-31 07:51:39 +00:00
|
|
|
<<: *zoekt_indexserver_template
|
2021-05-21 16:01:11 +00:00
|
|
|
env:
|
|
|
|
|
<<: *zoektenv
|
|
|
|
|
ZOEKT_NUM: 0
|
|
|
|
|
ZOEKT_HOSTNAME_PORT: 3070
|
|
|
|
|
ZOEKT_LISTEN_PORT: 6072
|
|
|
|
|
|
2021-04-01 11:59:48 +00:00
|
|
|
zoekt-indexserver-1:
|
2021-05-31 07:51:39 +00:00
|
|
|
<<: *zoekt_indexserver_template
|
2021-03-29 08:14:53 +00:00
|
|
|
env:
|
2021-05-21 16:01:11 +00:00
|
|
|
<<: *zoektenv
|
|
|
|
|
ZOEKT_NUM: 1
|
|
|
|
|
ZOEKT_HOSTNAME_PORT: 3071
|
|
|
|
|
ZOEKT_LISTEN_PORT: 6073
|
2021-03-29 08:14:53 +00:00
|
|
|
|
2021-05-31 07:51:39 +00:00
|
|
|
zoekt-webserver-template: &zoekt_webserver_template
|
2021-03-29 08:14:53 +00:00
|
|
|
install: |
|
|
|
|
|
mkdir -p .bin
|
2021-08-06 08:51:09 +00:00
|
|
|
env GOBIN="${PWD}/.bin" go install github.com/google/zoekt/cmd/zoekt-webserver
|
2021-06-02 09:38:06 +00:00
|
|
|
checkBinary: .bin/zoekt-webserver
|
2021-04-01 11:59:48 +00:00
|
|
|
env:
|
|
|
|
|
JAEGER_DISABLED: false
|
|
|
|
|
GOGC: 50
|
|
|
|
|
|
2021-05-31 07:51:39 +00:00
|
|
|
zoekt-webserver-0:
|
|
|
|
|
<<: *zoekt_webserver_template
|
2021-08-20 08:42:05 +00:00
|
|
|
cmd: env PATH="${PWD}/.bin:$PATH" .bin/zoekt-webserver -index "$HOME/.sourcegraph/zoekt/index-0" -pprof -rpc -listen ":3070"
|
2021-05-31 07:51:39 +00:00
|
|
|
|
2021-04-01 11:59:48 +00:00
|
|
|
zoekt-webserver-1:
|
2021-05-31 07:51:39 +00:00
|
|
|
<<: *zoekt_webserver_template
|
2021-08-20 08:42:05 +00:00
|
|
|
cmd: env PATH="${PWD}/.bin:$PATH" .bin/zoekt-webserver -index "$HOME/.sourcegraph/zoekt/index-1" -pprof -rpc -listen ":3071"
|
2021-03-29 08:14:53 +00:00
|
|
|
|
2021-05-21 16:01:11 +00:00
|
|
|
precise-code-intel-worker:
|
|
|
|
|
cmd: .bin/precise-code-intel-worker
|
|
|
|
|
install: |
|
2021-10-09 01:47:08 +00:00
|
|
|
if [ -n "$DELVE" ]; then
|
|
|
|
|
export GCFLAGS='all=-N -l'
|
|
|
|
|
fi
|
|
|
|
|
go build -gcflags="$GCFLAGS" -o .bin/precise-code-intel-worker github.com/sourcegraph/sourcegraph/enterprise/cmd/precise-code-intel-worker
|
2021-06-02 09:38:06 +00:00
|
|
|
checkBinary: .bin/precise-code-intel-worker
|
2021-05-21 16:01:11 +00:00
|
|
|
watch:
|
2021-05-31 07:51:39 +00:00
|
|
|
- lib
|
2021-05-21 16:01:11 +00:00
|
|
|
- internal
|
2021-05-31 07:51:39 +00:00
|
|
|
- enterprise/cmd/precise-code-intel-worker
|
2021-05-21 16:01:11 +00:00
|
|
|
- enterprise/internal
|
|
|
|
|
- lib/codeintel
|
|
|
|
|
|
2021-07-05 11:06:52 +00:00
|
|
|
executor-template: &executor_template
|
|
|
|
|
# TMPDIR is set here so it's not set in the `install` process, which would trip up `go build`.
|
|
|
|
|
cmd: |
|
|
|
|
|
env TMPDIR="$HOME/.sourcegraph/executor-temp" .bin/executor
|
2021-05-31 07:51:39 +00:00
|
|
|
install: |
|
2021-10-09 01:47:08 +00:00
|
|
|
if [ -n "$DELVE" ]; then
|
|
|
|
|
export GCFLAGS='all=-N -l'
|
|
|
|
|
fi
|
|
|
|
|
go build -gcflags="$GCFLAGS" -o .bin/executor github.com/sourcegraph/sourcegraph/enterprise/cmd/executor &&
|
2021-07-22 15:09:36 +00:00
|
|
|
mkdir -p $EXECUTOR_IMAGE_ARCHIVE_PATH
|
2021-06-02 09:38:06 +00:00
|
|
|
checkBinary: .bin/executor
|
2021-05-21 16:01:11 +00:00
|
|
|
env:
|
2021-07-05 11:06:52 +00:00
|
|
|
EXECUTOR_QUEUE_NAME: TEMPLATE
|
2021-05-31 07:51:39 +00:00
|
|
|
watch:
|
|
|
|
|
- lib
|
|
|
|
|
- internal
|
|
|
|
|
- enterprise/internal
|
|
|
|
|
- enterprise/cmd/executor
|
2021-05-21 16:01:11 +00:00
|
|
|
|
2021-07-05 11:06:52 +00:00
|
|
|
codeintel-executor:
|
|
|
|
|
<<: *executor_template
|
|
|
|
|
cmd: |
|
|
|
|
|
env TMPDIR="$HOME/.sourcegraph/indexer-temp" .bin/executor
|
|
|
|
|
env:
|
|
|
|
|
EXECUTOR_QUEUE_NAME: codeintel
|
2021-07-06 15:14:39 +00:00
|
|
|
SRC_PROF_HTTP: ":6092"
|
2021-07-05 11:06:52 +00:00
|
|
|
|
|
|
|
|
batches-executor:
|
|
|
|
|
<<: *executor_template
|
|
|
|
|
cmd: |
|
|
|
|
|
env TMPDIR="$HOME/.sourcegraph/batches-executor-temp" .bin/executor
|
|
|
|
|
env:
|
2021-09-22 10:03:57 +00:00
|
|
|
EXECUTOR_QUEUE_NAME: batches
|
2021-09-29 12:17:18 +00:00
|
|
|
EXECUTOR_MAXIMUM_NUM_JOBS: 8
|
2021-07-06 15:14:39 +00:00
|
|
|
SRC_PROF_HTTP: ":6093"
|
2021-07-05 11:06:52 +00:00
|
|
|
|
2021-07-23 07:59:43 +00:00
|
|
|
# If you want to use this, either start it with `sg run batches-executor-firecracker` or
|
2021-07-22 15:09:36 +00:00
|
|
|
# modify the `commandsets.batches` in your local `sg.config.overwrite.yaml`
|
|
|
|
|
batches-executor-firecracker:
|
|
|
|
|
<<: *executor_template
|
|
|
|
|
cmd: |
|
|
|
|
|
env TMPDIR="$HOME/.sourcegraph/batches-executor-temp" \
|
2021-10-07 14:15:43 +00:00
|
|
|
sudo --preserve-env=TMPDIR,EXECUTOR_QUEUE_NAME,SRC_PROF_HTTP,EXECUTOR_FRONTEND_URL,EXECUTOR_FRONTEND_PASSWORD,EXECUTOR_USE_FIRECRACKER,EXECUTOR_IMAGE_ARCHIVE_PATH \
|
2021-07-22 15:09:36 +00:00
|
|
|
.bin/executor
|
|
|
|
|
env:
|
|
|
|
|
EXECUTOR_USE_FIRECRACKER: true
|
2021-09-22 10:03:57 +00:00
|
|
|
EXECUTOR_QUEUE_NAME: batches
|
2021-07-22 15:09:36 +00:00
|
|
|
SRC_PROF_HTTP: ":6093"
|
|
|
|
|
|
2021-05-21 16:01:11 +00:00
|
|
|
minio:
|
|
|
|
|
cmd: |
|
|
|
|
|
docker inspect $CONTAINER >/dev/null 2>&1 && docker rm -f $CONTAINER
|
|
|
|
|
docker run --rm \
|
|
|
|
|
--name=$CONTAINER \
|
|
|
|
|
--cpus=1 \
|
|
|
|
|
--memory=1g \
|
|
|
|
|
-p 0.0.0.0:9000:9000 \
|
|
|
|
|
-e 'MINIO_ACCESS_KEY=AKIAIOSFODNN7EXAMPLE' \
|
|
|
|
|
-e 'MINIO_SECRET_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY' \
|
|
|
|
|
-v "$MINIO_DISK":/data \
|
|
|
|
|
$IMAGE server /data >"$MINIO_LOG_FILE" 2>&1
|
|
|
|
|
install: |
|
|
|
|
|
mkdir -p $MINIO_LOGS
|
|
|
|
|
mkdir -p $MINIO_DISK
|
|
|
|
|
CACHE=true ./docker-images/minio/build.sh >$MINIO_LOG_FILE 2>&1
|
|
|
|
|
env:
|
|
|
|
|
MINIO_DISK: $HOME/.sourcegraph-dev/data/minio
|
|
|
|
|
MINIO_LOGS: $HOME/.sourcegraph-dev/logs/minio
|
|
|
|
|
MINIO_LOG_FILE: $HOME/.sourcegraph-dev/logs/minio/minio.log"
|
|
|
|
|
IMAGE: sourcegraph/minio
|
|
|
|
|
CONTAINER: minio
|
|
|
|
|
|
|
|
|
|
codeinsights-db:
|
|
|
|
|
cmd: |
|
|
|
|
|
docker inspect $CONTAINER >/dev/null 2>&1 && docker rm -f $CONTAINER
|
|
|
|
|
docker run --rm \
|
|
|
|
|
--name=${CONTAINER} \
|
|
|
|
|
--cpus=1 \
|
|
|
|
|
--memory=1g \
|
|
|
|
|
-e POSTGRES_PASSWORD=password \
|
|
|
|
|
-p 0.0.0.0:$PORT:5432 \
|
|
|
|
|
-v $DISK:/var/lib/postgresql/data \
|
|
|
|
|
$IMAGE >$LOG_FILE 2>&1
|
|
|
|
|
install: |
|
|
|
|
|
mkdir -p $LOGS
|
|
|
|
|
mkdir -p $DISK
|
|
|
|
|
CACHE=true ./docker-images/codeinsights-db/build.sh >$LOG_FILE 2>&1
|
|
|
|
|
env:
|
|
|
|
|
LOGS: $HOME/.sourcegraph-dev/logs/codeinsights-db
|
|
|
|
|
LOG_FILE: $HOME/.sourcegraph-dev/logs/codeinsights-db/codeinsights-db.log
|
|
|
|
|
DISK: $HOME/.sourcegraph-dev/data/codeinsights-db
|
|
|
|
|
IMAGE: sourcegraph/codeinsights-db:dev
|
|
|
|
|
CONTAINER: codeinsights-db
|
|
|
|
|
PORT: 5435
|
|
|
|
|
|
2021-07-19 16:15:00 +00:00
|
|
|
redis-postgres:
|
|
|
|
|
# Add the following overwrites to your sg.config.overwrite.yaml to use the docker-compose
|
|
|
|
|
# database:
|
|
|
|
|
#
|
|
|
|
|
# env:
|
|
|
|
|
# POSTGRES_HOST: localhost
|
|
|
|
|
# PGPASSWORD: sourcegraph
|
|
|
|
|
# PGUSER: sourcegraph
|
|
|
|
|
#
|
|
|
|
|
# You could also add an overwrite to add `redis-postgres` to the relevant command set(s).
|
2021-09-29 11:57:55 +00:00
|
|
|
cmd: docker-compose -f dev/redis-postgres.yml up $COMPOSE_ARGS
|
|
|
|
|
env:
|
|
|
|
|
COMPOSE_ARGS: --force-recreate
|
2021-07-19 16:15:00 +00:00
|
|
|
|
2021-08-02 08:25:39 +00:00
|
|
|
jaeger:
|
|
|
|
|
cmd: |
|
2021-09-30 07:43:04 +00:00
|
|
|
.bin/jaeger-all-in-one-${JAEGER_VERSION}-$(go env GOOS)-$(go env GOARCH) --log-level ${JAEGER_LOG_LEVEL}
|
2021-08-02 08:25:39 +00:00
|
|
|
install: |
|
2021-11-03 10:15:18 +00:00
|
|
|
set -e
|
2021-08-02 08:25:39 +00:00
|
|
|
mkdir -p "${JAEGER_DISK}"
|
|
|
|
|
|
|
|
|
|
suffix="${JAEGER_VERSION}-$(go env GOOS)-$(go env GOARCH)"
|
|
|
|
|
target="$PWD/.bin/jaeger-all-in-one-${suffix}"
|
2021-11-03 10:15:18 +00:00
|
|
|
url="https://github.com/jaegertracing/jaeger/releases/download/v${JAEGER_VERSION}/jaeger-${suffix}.tar.gz"
|
2021-08-02 08:25:39 +00:00
|
|
|
|
|
|
|
|
if [ ! -f "${target}" ]; then
|
|
|
|
|
echo "downloading ${url}" 1>&2
|
|
|
|
|
curl -sS -L -f "${url}" | tar -xz --to-stdout "jaeger-${suffix}/jaeger-all-in-one" >"${target}.tmp"
|
|
|
|
|
mv "${target}.tmp" "${target}"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
chmod +x "${target}"
|
|
|
|
|
env:
|
|
|
|
|
JAEGER_VERSION: 1.18.1
|
|
|
|
|
JAEGER_DISK: $HOME/.sourcegraph-dev/data/jaeger
|
2021-11-03 10:15:18 +00:00
|
|
|
JAEGER_LOG_LEVEL: error
|
2021-08-02 08:25:39 +00:00
|
|
|
QUERY_BASE_PATH: /-/debug/jaeger
|
|
|
|
|
|
|
|
|
|
grafana:
|
|
|
|
|
cmd: |
|
2021-08-02 11:28:54 +00:00
|
|
|
if [[ "$OSTYPE" == "linux-gnu" ]]; then
|
|
|
|
|
# Linux needs an extra arg to support host.internal.docker, which is how grafana connects
|
|
|
|
|
# to the prometheus backend.
|
|
|
|
|
ADD_HOST_FLAG="--add-host=host.docker.internal:host-gateway"
|
|
|
|
|
|
|
|
|
|
# Docker users on Linux will generally be using direct user mapping, which
|
|
|
|
|
# means that they'll want the data in the volume mount to be owned by the
|
|
|
|
|
# same user as is running this script. Fortunately, the Grafana container
|
|
|
|
|
# doesn't really care what user it runs as, so long as it can write to
|
|
|
|
|
# /var/lib/grafana.
|
|
|
|
|
DOCKER_USER="--user=$UID"
|
|
|
|
|
fi
|
|
|
|
|
|
2021-08-02 08:25:39 +00:00
|
|
|
echo "Grafana: serving on http://localhost:${PORT}"
|
|
|
|
|
echo "Grafana: note that logs are piped to ${GRAFANA_LOG_FILE}"
|
|
|
|
|
docker run --rm ${DOCKER_USER} \
|
|
|
|
|
--name=${CONTAINER} \
|
|
|
|
|
--cpus=1 \
|
|
|
|
|
--memory=1g \
|
|
|
|
|
-p 0.0.0.0:3370:3370 ${ADD_HOST_FLAG} \
|
|
|
|
|
-v "${GRAFANA_DISK}":/var/lib/grafana \
|
|
|
|
|
-v "$(pwd)"/dev/grafana/all:/sg_config_grafana/provisioning/datasources \
|
|
|
|
|
-v "$(pwd)"/docker-images/grafana/config/provisioning/dashboards:/sg_grafana_additional_dashboards \
|
2021-09-14 18:36:04 +00:00
|
|
|
sourcegraph/grafana:dev >"${GRAFANA_LOG_FILE}" 2>&1
|
2021-08-02 08:25:39 +00:00
|
|
|
install: |
|
2021-08-02 11:28:54 +00:00
|
|
|
mkdir -p "${GRAFANA_DISK}"
|
2021-08-02 08:25:39 +00:00
|
|
|
mkdir -p "$(dirname ${GRAFANA_LOG_FILE})"
|
|
|
|
|
|
|
|
|
|
docker inspect $CONTAINER >/dev/null 2>&1 && docker rm -f $CONTAINER
|
2021-09-14 18:36:04 +00:00
|
|
|
./docker-images/grafana/build.sh
|
2021-08-02 08:25:39 +00:00
|
|
|
env:
|
|
|
|
|
GRAFANA_DISK: $HOME/.sourcegraph-dev/data/grafana
|
|
|
|
|
# Log file location: since we log outside of the Docker container, we should
|
|
|
|
|
# log somewhere that's _not_ ~/.sourcegraph-dev/data/grafana, since that gets
|
|
|
|
|
# volume mounted into the container and therefore has its own ownership
|
|
|
|
|
# semantics.
|
|
|
|
|
# Now for the actual logging. Grafana's output gets sent to stdout and stderr.
|
|
|
|
|
# We want to capture that output, but because it's fairly noisy, don't want to
|
|
|
|
|
# display it in the normal case.
|
2021-08-02 11:28:54 +00:00
|
|
|
GRAFANA_LOG_FILE: $HOME/.sourcegraph-dev/logs/grafana/grafana.log
|
2021-11-08 17:09:12 +00:00
|
|
|
IMAGE: sourcegraph/grafana:dev
|
2021-08-02 08:25:39 +00:00
|
|
|
CONTAINER: grafana
|
|
|
|
|
PORT: 3370
|
|
|
|
|
# docker containers must access things via docker host on non-linux platforms
|
|
|
|
|
DOCKER_USER: ""
|
|
|
|
|
ADD_HOST_FLAG: ""
|
2021-09-14 18:36:04 +00:00
|
|
|
CACHE: false
|
2021-08-24 14:48:21 +00:00
|
|
|
watch:
|
|
|
|
|
- monitoring
|
2021-08-02 08:25:39 +00:00
|
|
|
|
|
|
|
|
prometheus:
|
2021-08-02 11:28:54 +00:00
|
|
|
cmd: |
|
|
|
|
|
if [[ "$OSTYPE" == "linux-gnu" ]]; then
|
|
|
|
|
DOCKER_USER="--user=$UID"
|
|
|
|
|
|
|
|
|
|
# Frontend generally runs outside of Docker, so to access it we need to be
|
|
|
|
|
# able to access ports on the host. --net=host is a very dirty way of
|
|
|
|
|
# enabling this.
|
|
|
|
|
DOCKER_NET="--net=host"
|
|
|
|
|
SRC_FRONTEND_INTERNAL="localhost:3090"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
echo "Prometheus: serving on http://localhost:${PORT}"
|
|
|
|
|
echo "Prometheus: note that logs are piped to ${PROMETHEUS_LOG_FILE}"
|
|
|
|
|
docker run --rm ${DOCKER_NET} ${DOCKER_USER} \
|
|
|
|
|
--name=${CONTAINER} \
|
|
|
|
|
--cpus=1 \
|
|
|
|
|
--memory=4g \
|
|
|
|
|
-p 0.0.0.0:9090:9090 \
|
|
|
|
|
-v "${PROMETHEUS_DISK}":/prometheus \
|
|
|
|
|
-v "$(pwd)/${CONFIG_DIR}":/sg_prometheus_add_ons \
|
|
|
|
|
-e SRC_FRONTEND_INTERNAL="${SRC_FRONTEND_INTERNAL}" \
|
|
|
|
|
-e DISABLE_SOURCEGRAPH_CONFIG="${DISABLE_SOURCEGRAPH_CONFIG:-""}" \
|
|
|
|
|
-e DISABLE_ALERTMANAGER="${DISABLE_ALERTMANAGER:-""}" \
|
|
|
|
|
${IMAGE} >"${PROMETHEUS_LOG_FILE}" 2>&1
|
|
|
|
|
install: |
|
|
|
|
|
mkdir -p "${PROMETHEUS_DISK}"
|
|
|
|
|
mkdir -p "$(dirname ${PROMETHEUS_LOG_FILE})"
|
|
|
|
|
|
|
|
|
|
docker inspect $CONTAINER >/dev/null 2>&1 && docker rm -f $CONTAINER
|
|
|
|
|
|
|
|
|
|
if [[ "$OSTYPE" == "linux-gnu" ]]; then
|
|
|
|
|
PROM_TARGETS="dev/prometheus/linux/prometheus_targets.yml"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
cp ${PROM_TARGETS} "${CONFIG_DIR}"/prometheus_targets.yml
|
|
|
|
|
CACHE=true ./docker-images/prometheus/build.sh
|
|
|
|
|
env:
|
|
|
|
|
PROMETHEUS_DISK: $HOME/.sourcegraph-dev/data/prometheus
|
|
|
|
|
# See comment above for `grafana`
|
|
|
|
|
PROMETHEUS_LOG_FILE: $HOME/.sourcegraph-dev/logs/prometheus/prometheus.log
|
|
|
|
|
IMAGE: sourcegraph/prometheus:dev
|
|
|
|
|
CONTAINER: prometheus
|
|
|
|
|
PORT: 9090
|
|
|
|
|
CONFIG_DIR: docker-images/prometheus/config
|
|
|
|
|
DOCKER_USER: ""
|
|
|
|
|
DOCKER_NET: ""
|
|
|
|
|
PROM_TARGETS: dev/prometheus/all/prometheus_targets.yml
|
|
|
|
|
SRC_FRONTEND_INTERNAL: host.docker.internal:3090
|
|
|
|
|
ADD_HOST_FLAG: ""
|
|
|
|
|
DISABLE_SOURCEGRAPH_CONFIG: false
|
2021-08-02 08:25:39 +00:00
|
|
|
|
|
|
|
|
postgres_exporter:
|
|
|
|
|
cmd: ./dev/postgres_exporter.sh
|
|
|
|
|
|
2021-08-13 17:50:27 +00:00
|
|
|
monitoring-generator:
|
|
|
|
|
cmd: go generate ./monitoring
|
|
|
|
|
env:
|
|
|
|
|
RELOAD: true
|
|
|
|
|
watch:
|
|
|
|
|
- monitoring
|
|
|
|
|
continueWatchOnExit: true
|
|
|
|
|
|
2021-10-12 15:14:50 +00:00
|
|
|
loki:
|
|
|
|
|
cmd: |
|
2021-11-05 23:16:36 +00:00
|
|
|
echo "Loki: serving on http://localhost:3100"
|
2021-10-12 15:14:50 +00:00
|
|
|
echo "Loki: note that logs are piped to ${LOKI_LOG_FILE}"
|
|
|
|
|
docker run --rm --name=loki \
|
|
|
|
|
-p 3100:3100 -v $LOKI_DISK:/loki \
|
|
|
|
|
index.docker.io/grafana/loki:$LOKI_VERSION >"${LOKI_LOG_FILE}" 2>&1
|
|
|
|
|
install: |
|
|
|
|
|
mkdir -p "${LOKI_DISK}"
|
|
|
|
|
mkdir -p "$(dirname ${LOKI_LOG_FILE})"
|
|
|
|
|
docker pull index.docker.io/grafana/loki:$LOKI_VERSION
|
|
|
|
|
env:
|
|
|
|
|
LOKI_DISK: $HOME/.sourcegraph-dev/data/loki
|
|
|
|
|
LOKI_VERSION: "2.3.0"
|
|
|
|
|
LOKI_LOG_FILE: $HOME/.sourcegraph-dev/logs/loki/loki.log
|
|
|
|
|
|
2021-10-19 13:11:21 +00:00
|
|
|
storybook:
|
|
|
|
|
cmd: yarn storybook
|
|
|
|
|
install: yarn
|
|
|
|
|
|
2021-09-30 07:23:24 +00:00
|
|
|
# This will execute `env`, a utility to print the process environment. Can
|
|
|
|
|
# be used to debug which global vars `sg` uses.
|
|
|
|
|
debug-env:
|
|
|
|
|
cmd: env
|
|
|
|
|
|
2021-11-10 09:26:15 +00:00
|
|
|
bext:
|
|
|
|
|
cmd: yarn --cwd client/browser dev
|
|
|
|
|
install: yarn
|
|
|
|
|
|
2021-05-14 15:39:48 +00:00
|
|
|
checks:
|
|
|
|
|
docker:
|
2021-06-03 12:55:18 +00:00
|
|
|
cmd: docker version
|
|
|
|
|
failMessage: "Failed to run 'docker version'. Please make sure Docker is running."
|
2021-05-14 15:39:48 +00:00
|
|
|
|
2021-11-05 10:17:27 +00:00
|
|
|
docker-compose:
|
|
|
|
|
cmd: docker-compose version
|
|
|
|
|
failMessage: "Failed to run 'docker-compose version'. Please make sure Docker is running."
|
|
|
|
|
|
|
|
|
|
go:
|
|
|
|
|
cmd: go version || (echo "➡️ Install Go or make it sure it is in the \$PATH" && exit 1)
|
|
|
|
|
failMessage: 'Failed to run go'
|
|
|
|
|
|
|
|
|
|
go-version:
|
|
|
|
|
cmd: |
|
|
|
|
|
go_version=#$(go version | cut -d' ' -f 3 | sed 's/go//')
|
|
|
|
|
tools_version=$(cat .tool-versions | grep golang | sed 's/golang //')
|
|
|
|
|
[ "$go_version" = "$tools_version" ] || (echo "➡️ Need go version $tools_version, but got $go_version instead" && exit 1)
|
|
|
|
|
failMessage: 'Incorrect go version'
|
|
|
|
|
|
2021-05-14 15:39:48 +00:00
|
|
|
redis:
|
2021-07-21 15:37:24 +00:00
|
|
|
cmd: (command -v redis-cli && redis-cli -p 6379 PING) || docker-compose -f dev/redis-postgres.yml exec -T redis redis-cli PING
|
2021-05-31 07:51:39 +00:00
|
|
|
failMessage: 'Failed to connect to Redis on port 6379. Please make sure Redis is running.'
|
2021-05-14 15:39:48 +00:00
|
|
|
|
|
|
|
|
postgres:
|
2021-07-21 15:37:24 +00:00
|
|
|
cmd: (command -v psql && psql -c 'SELECT 1;') || docker-compose -f dev/redis-postgres.yml exec -T postgresql psql -U ${PGUSER} -c 'select 1;'
|
2021-05-31 07:51:39 +00:00
|
|
|
failMessage: 'Failed to connect to Postgres database. Make sure environment variables are setup correctly so that psql can connect.'
|
2021-05-14 15:39:48 +00:00
|
|
|
|
2021-10-01 13:36:24 +00:00
|
|
|
defaultCommandset: enterprise
|
2021-03-29 08:14:53 +00:00
|
|
|
commandsets:
|
2021-07-13 16:13:18 +00:00
|
|
|
oss:
|
2021-09-29 14:22:16 +00:00
|
|
|
# open-source version doesn't require the dev-private repository
|
|
|
|
|
requiresDevPrivate: false
|
2021-07-21 15:37:24 +00:00
|
|
|
checks:
|
|
|
|
|
- docker
|
|
|
|
|
- redis
|
|
|
|
|
- postgres
|
|
|
|
|
commands:
|
|
|
|
|
- frontend
|
|
|
|
|
- worker
|
|
|
|
|
- repo-updater
|
|
|
|
|
- gitserver
|
|
|
|
|
- searcher
|
|
|
|
|
- symbols
|
|
|
|
|
- web
|
|
|
|
|
- caddy
|
|
|
|
|
- docsite
|
2021-09-28 04:18:12 +00:00
|
|
|
- syntax-highlighter
|
2021-07-21 15:37:24 +00:00
|
|
|
- github-proxy
|
|
|
|
|
- zoekt-indexserver-0
|
|
|
|
|
- zoekt-indexserver-1
|
|
|
|
|
- zoekt-webserver-0
|
|
|
|
|
- zoekt-webserver-1
|
2021-03-29 08:14:53 +00:00
|
|
|
|
2021-07-13 16:13:18 +00:00
|
|
|
enterprise: &enterprise_set
|
2021-09-29 14:22:16 +00:00
|
|
|
requiresDevPrivate: true
|
2021-07-21 15:37:24 +00:00
|
|
|
checks:
|
|
|
|
|
- docker
|
|
|
|
|
- redis
|
|
|
|
|
- postgres
|
|
|
|
|
commands:
|
|
|
|
|
- enterprise-frontend
|
|
|
|
|
- enterprise-worker
|
|
|
|
|
- enterprise-repo-updater
|
|
|
|
|
- enterprise-web
|
|
|
|
|
- gitserver
|
|
|
|
|
- searcher
|
|
|
|
|
- symbols
|
|
|
|
|
- caddy
|
|
|
|
|
- docsite
|
2021-09-28 04:18:12 +00:00
|
|
|
- syntax-highlighter
|
2021-07-21 15:37:24 +00:00
|
|
|
- github-proxy
|
|
|
|
|
- zoekt-indexserver-0
|
|
|
|
|
- zoekt-indexserver-1
|
|
|
|
|
- zoekt-webserver-0
|
|
|
|
|
- zoekt-webserver-1
|
2021-03-29 08:14:53 +00:00
|
|
|
|
2021-09-08 08:41:06 +00:00
|
|
|
dotcom:
|
|
|
|
|
<<: *enterprise_set
|
|
|
|
|
env:
|
|
|
|
|
SOURCEGRAPHDOTCOM_MODE: true
|
|
|
|
|
|
2021-05-21 16:01:11 +00:00
|
|
|
enterprise-codeintel:
|
2021-09-29 14:22:16 +00:00
|
|
|
requiresDevPrivate: true
|
2021-07-21 15:37:24 +00:00
|
|
|
checks:
|
|
|
|
|
- docker
|
|
|
|
|
- redis
|
|
|
|
|
- postgres
|
|
|
|
|
commands:
|
|
|
|
|
- enterprise-frontend
|
|
|
|
|
- enterprise-worker
|
|
|
|
|
- enterprise-repo-updater
|
|
|
|
|
- enterprise-web
|
|
|
|
|
- gitserver
|
|
|
|
|
- searcher
|
|
|
|
|
- symbols
|
|
|
|
|
- caddy
|
|
|
|
|
- docsite
|
2021-09-28 04:18:12 +00:00
|
|
|
- syntax-highlighter
|
2021-07-21 15:37:24 +00:00
|
|
|
- github-proxy
|
|
|
|
|
- zoekt-indexserver-0
|
|
|
|
|
- zoekt-indexserver-1
|
|
|
|
|
- zoekt-webserver-0
|
|
|
|
|
- zoekt-webserver-1
|
|
|
|
|
- minio
|
|
|
|
|
- precise-code-intel-worker
|
|
|
|
|
- codeintel-executor
|
2021-05-21 16:01:11 +00:00
|
|
|
|
|
|
|
|
enterprise-codeinsights:
|
2021-09-29 14:22:16 +00:00
|
|
|
requiresDevPrivate: true
|
2021-07-21 15:37:24 +00:00
|
|
|
checks:
|
|
|
|
|
- docker
|
|
|
|
|
- redis
|
|
|
|
|
- postgres
|
|
|
|
|
commands:
|
|
|
|
|
- enterprise-frontend
|
|
|
|
|
- enterprise-worker
|
|
|
|
|
- enterprise-repo-updater
|
|
|
|
|
- enterprise-web
|
|
|
|
|
- gitserver
|
|
|
|
|
- searcher
|
|
|
|
|
- symbols
|
|
|
|
|
- caddy
|
|
|
|
|
- docsite
|
2021-09-28 04:18:12 +00:00
|
|
|
- syntax-highlighter
|
2021-07-21 15:37:24 +00:00
|
|
|
- github-proxy
|
|
|
|
|
- zoekt-indexserver-0
|
|
|
|
|
- zoekt-indexserver-1
|
|
|
|
|
- zoekt-webserver-0
|
|
|
|
|
- zoekt-webserver-1
|
|
|
|
|
- codeinsights-db
|
2021-09-08 08:41:06 +00:00
|
|
|
env:
|
|
|
|
|
DISABLE_CODE_INSIGHTS_HISTORICAL: false
|
|
|
|
|
DISABLE_CODE_INSIGHTS: false
|
2021-05-21 16:01:11 +00:00
|
|
|
|
2021-05-25 08:33:48 +00:00
|
|
|
api-only:
|
2021-09-29 14:22:16 +00:00
|
|
|
requiresDevPrivate: true
|
2021-07-21 15:37:24 +00:00
|
|
|
checks:
|
|
|
|
|
- docker
|
|
|
|
|
- redis
|
|
|
|
|
- postgres
|
|
|
|
|
commands:
|
|
|
|
|
- enterprise-frontend
|
|
|
|
|
- enterprise-worker
|
|
|
|
|
- enterprise-repo-updater
|
|
|
|
|
- gitserver
|
|
|
|
|
- searcher
|
|
|
|
|
- symbols
|
|
|
|
|
- github-proxy
|
|
|
|
|
- zoekt-indexserver-0
|
|
|
|
|
- zoekt-indexserver-1
|
|
|
|
|
- zoekt-webserver-0
|
|
|
|
|
- zoekt-webserver-1
|
2021-05-25 08:33:48 +00:00
|
|
|
|
2021-07-05 11:06:52 +00:00
|
|
|
batches:
|
2021-09-29 14:22:16 +00:00
|
|
|
requiresDevPrivate: true
|
2021-07-21 15:37:24 +00:00
|
|
|
checks:
|
|
|
|
|
- docker
|
|
|
|
|
- redis
|
|
|
|
|
- postgres
|
|
|
|
|
commands:
|
|
|
|
|
- enterprise-frontend
|
|
|
|
|
- enterprise-worker
|
|
|
|
|
- enterprise-repo-updater
|
|
|
|
|
- enterprise-web
|
|
|
|
|
- gitserver
|
|
|
|
|
- searcher
|
|
|
|
|
- symbols
|
|
|
|
|
- caddy
|
|
|
|
|
- docsite
|
2021-09-28 04:18:12 +00:00
|
|
|
- syntax-highlighter
|
2021-07-21 15:37:24 +00:00
|
|
|
- github-proxy
|
|
|
|
|
- zoekt-indexserver-0
|
|
|
|
|
- zoekt-indexserver-1
|
|
|
|
|
- zoekt-webserver-0
|
|
|
|
|
- zoekt-webserver-1
|
|
|
|
|
- batches-executor
|
2021-07-05 11:06:52 +00:00
|
|
|
|
2021-07-23 07:59:43 +00:00
|
|
|
core-app:
|
2021-09-29 14:22:16 +00:00
|
|
|
requiresDevPrivate: true
|
2021-07-23 07:59:43 +00:00
|
|
|
checks:
|
|
|
|
|
- docker
|
|
|
|
|
- redis
|
|
|
|
|
- postgres
|
|
|
|
|
commands:
|
|
|
|
|
- enterprise-frontend
|
|
|
|
|
- enterprise-repo-updater
|
|
|
|
|
- enterprise-web
|
|
|
|
|
- gitserver
|
|
|
|
|
- caddy
|
|
|
|
|
- github-proxy
|
|
|
|
|
|
2021-08-02 08:25:39 +00:00
|
|
|
monitoring:
|
2021-08-09 10:30:54 +00:00
|
|
|
checks:
|
|
|
|
|
- docker
|
2021-08-02 08:25:39 +00:00
|
|
|
commands:
|
|
|
|
|
- jaeger
|
|
|
|
|
- prometheus
|
|
|
|
|
- grafana
|
|
|
|
|
- postgres_exporter
|
2021-08-13 17:50:27 +00:00
|
|
|
- monitoring-generator
|
2021-08-02 08:25:39 +00:00
|
|
|
|
2021-08-09 10:30:54 +00:00
|
|
|
monitoring-alerts:
|
|
|
|
|
checks:
|
|
|
|
|
- docker
|
|
|
|
|
- redis
|
|
|
|
|
- postgres
|
|
|
|
|
commands:
|
|
|
|
|
- prometheus
|
|
|
|
|
- grafana
|
|
|
|
|
# For generated alerts docs
|
|
|
|
|
- docsite
|
|
|
|
|
# For the alerting integration with frontend
|
|
|
|
|
- enterprise-frontend
|
|
|
|
|
- enterprise-web
|
|
|
|
|
- caddy
|
|
|
|
|
|
2021-10-12 10:44:39 +00:00
|
|
|
web-standalone:
|
|
|
|
|
commands:
|
2021-10-22 10:30:29 +00:00
|
|
|
- web-standalone-http
|
2021-10-12 10:44:39 +00:00
|
|
|
- caddy
|
|
|
|
|
env:
|
|
|
|
|
ENTERPRISE: 1
|
|
|
|
|
|
|
|
|
|
oss-web-standalone:
|
|
|
|
|
commands:
|
2021-10-22 10:30:29 +00:00
|
|
|
- web-standalone-http
|
2021-10-12 10:44:39 +00:00
|
|
|
- caddy
|
|
|
|
|
|
|
|
|
|
web-standalone-prod:
|
|
|
|
|
commands:
|
2021-10-22 10:30:29 +00:00
|
|
|
- web-standalone-http-prod
|
2021-10-12 10:44:39 +00:00
|
|
|
- caddy
|
|
|
|
|
env:
|
|
|
|
|
ENTERPRISE: 1
|
|
|
|
|
|
|
|
|
|
oss-web-standalone-prod:
|
|
|
|
|
commands:
|
2021-10-22 10:30:29 +00:00
|
|
|
- web-standalone-http-prod
|
2021-10-12 10:44:39 +00:00
|
|
|
- caddy
|
|
|
|
|
|
2021-03-29 08:14:53 +00:00
|
|
|
tests:
|
|
|
|
|
# These can be run with `sg test [name]`
|
|
|
|
|
backend:
|
2021-05-10 08:28:45 +00:00
|
|
|
cmd: go test
|
|
|
|
|
defaultArgs: ./...
|
|
|
|
|
|
2021-03-29 08:14:53 +00:00
|
|
|
backend-integration:
|
|
|
|
|
cmd: cd dev/gqltest && go test -long -base-url $BASE_URL -email $EMAIL -username $USERNAME -password $PASSWORD ./gqltest
|
|
|
|
|
env:
|
|
|
|
|
# These are defaults. They can be overwritten by setting the env vars when
|
|
|
|
|
# running the command.
|
2021-05-31 07:51:39 +00:00
|
|
|
BASE_URL: 'http://localhost:3080'
|
|
|
|
|
EMAIL: 'joe@sourcegraph.com'
|
|
|
|
|
PASSWORD: '12345'
|
2021-05-10 08:28:45 +00:00
|
|
|
|
2021-07-20 19:11:46 +00:00
|
|
|
web-integration:
|
|
|
|
|
cmd: yarn test-integration
|
|
|
|
|
install: ENTERPRISE=1 yarn build-web
|
|
|
|
|
|
2021-11-10 09:26:15 +00:00
|
|
|
bext:
|
|
|
|
|
cmd: yarn --cwd client/browser test
|
|
|
|
|
|
2021-11-25 12:46:36 +00:00
|
|
|
bext-build:
|
|
|
|
|
cmd: yarn run download-puppeteer-browser && EXTENSION_PERMISSIONS_ALL_URLS=true yarn --cwd client/browser build
|
|
|
|
|
|
2021-11-10 09:26:15 +00:00
|
|
|
bext-integration:
|
|
|
|
|
cmd: yarn --cwd client/browser test-integration
|
|
|
|
|
|
|
|
|
|
bext-e2e:
|
2021-11-25 12:46:36 +00:00
|
|
|
cmd: yarn --cwd client/browser mocha ./src/end-to-end/github.test.ts ./src/end-to-end/gitlab.test.ts
|
2021-11-10 09:26:15 +00:00
|
|
|
env:
|
|
|
|
|
SOURCEGRAPH_BASE_URL: https://sourcegraph.com
|
|
|
|
|
PERCY_BROWSER_EXECUTABLE: node_modules/puppeteer/.local-chromium/linux-901812/chrome-linux/chrome
|
|
|
|
|
|
2021-03-29 08:14:53 +00:00
|
|
|
frontend:
|
|
|
|
|
cmd: yarn run jest --testPathIgnorePatterns end-to-end regression integration storybook
|
2021-05-10 08:28:45 +00:00
|
|
|
|
2021-03-29 08:14:53 +00:00
|
|
|
frontend-e2e:
|
|
|
|
|
cmd: yarn run mocha ./client/web/src/end-to-end/end-to-end.test.ts
|
|
|
|
|
env:
|
|
|
|
|
TS_NODE_PROJECT: client/web/src/end-to-end/tsconfig.json
|
2021-08-05 08:19:45 +00:00
|
|
|
|
|
|
|
|
docsite:
|
|
|
|
|
cmd: .bin/docsite_${DOCSITE_VERSION} check ./doc
|
|
|
|
|
env:
|
2021-10-27 22:48:33 +00:00
|
|
|
DOCSITE_VERSION: v1.8.4 # make sure to update all DOCSITE_VERSION
|