Code AI platform with Code Search & Cody
Go to file
Stephen Gutekanst f6eb23799c
Configuration refactoring + management console (#966)
* use .Critical accessors; use conf.Unified type

* pkg/conf: add unified configuration types

* {pkg/conf,cmd/...}: rewrite conf package to be database-backed

* pkg/legacyconf: import from sourcegraph@v2.13.6 pkg/conf/ (and reduce)

* legacyschema: import from sourcegraph@v2.13.6 schema/ (and reduce)

* add dev config override support

* cmd/management-console/assets: add assets package for packing web app code

* cmd/management-console/web: initial webapp implementation

* schema: split site.schema.json into site and critical configuration portions

* schema: critical: add gitlab as valid auth.providers key (broken in master)

* web: update to reflect site config changes

* cmd/management-console: initial backend implementation

* cmd/management-console: add Go backend

* cmd/management-console: add TS frontend

* web: site-admin: add management console password alert

* cmd/management-console/internal/tlscertgen: package for TLS certificate generation

* schema: update docs

* upgrade deasync

* pkg/conf: add proper config defaults for each deployment type

* vfsgendev installation fix

* mgmt console web package-lock.json change

* assets doc.go + gitignore change

* gofmt assets

* dev/check: use dev build tag

Some things such as assets are only defined behind a dev build tag OR
after generating something via `go generate`. Since go generate has not
run yet, I am opting to use the `dev` build tag here.

* cmd/management-console/auth_test.go: simplify test

* fix go assets

* pkg/conf/confdefaults

* pkg/conf: validation test fix

* web: update to reflect site configuration changes

* expose management console port in docker run commands

* management-console: go: return concrete type to /update requests, not type that can arbitrarily change in future

* management-console: web: fix saving ID bug + properly display errors

* pkg/db/confdb: return an error if the creator is not up to date

* web mgmt console error handling

* mgmt console go backend ErrNewerEdit

* pkg/conf: fix zero configuration check (marshaled JSON is "{}")

* add linter for accidental transitive imports of pkg/conf in mgmt console

* enterprise/dev/ci: fix building of non-enterprise docker-images branches

* NOCHANGELOG
2018-12-12 14:59:15 -08:00
.github Update CODEOWNERS 2018-12-08 16:18:46 -08:00
.vscode Configuration refactoring + management console (#966) 2018-12-12 14:59:15 -08:00
client send extension version to sentry 2018-12-12 10:09:34 -08:00
cmd Configuration refactoring + management console (#966) 2018-12-12 14:59:15 -08:00
dev Configuration refactoring + management console (#966) 2018-12-12 14:59:15 -08:00
doc Configuration refactoring + management console (#966) 2018-12-12 14:59:15 -08:00
docs sentence case for "Sourcegraph extensions", no capital E 2018-10-24 16:34:46 -07:00
enterprise Configuration refactoring + management console (#966) 2018-12-12 14:59:15 -08:00
legacyschema Configuration refactoring + management console (#966) 2018-12-12 14:59:15 -08:00
migrations pkg/db/globalstatedb: add management console password state / generation (#1289) 2018-12-07 15:08:44 -08:00
packages Extension API types 1.0.2 2018-12-12 13:43:31 +01:00
pkg Configuration refactoring + management console (#966) 2018-12-12 14:59:15 -08:00
schema Configuration refactoring + management console (#966) 2018-12-12 14:59:15 -08:00
shared Configuration refactoring + management console (#966) 2018-12-12 14:59:15 -08:00
ui/assets Combine marketing and product homepage (#156) 2018-10-04 17:31:30 -07:00
web Configuration refactoring + management console (#966) 2018-12-12 14:59:15 -08:00
.editorconfig Publish Sourcegraph as open source 🚀 2018-09-30 23:13:36 -07:00
.gitattributes graphqlbackend: Set generated gitattr for schema.go 2018-12-03 20:35:11 +02:00
.gitignore Configuration refactoring + management console (#966) 2018-12-12 14:59:15 -08:00
.gitmodules Publish Sourcegraph as open source 🚀 2018-09-30 23:13:36 -07:00
.mailmap Publish Sourcegraph as open source 🚀 2018-09-30 23:13:36 -07:00
.prettierignore don't reformat JSON Schema files (it makes them invalid JSON) (#1205) 2018-12-03 03:26:27 -08:00
.stylelintrc.json Publish Sourcegraph as open source 🚀 2018-09-30 23:13:36 -07:00
.yarnrc Use npmjs.org instead of yarnpkg.com (#926) 2018-11-10 12:14:21 -08:00
CHANGELOG.md Enable external services by default and update documentation (#1342) 2018-12-12 14:35:03 -08:00
CONTRIBUTING.md fix: broken link to code of conduct in CONTRIBUTING.md (#1230) 2018-12-04 14:14:41 -08:00
doc.go Publish Sourcegraph as open source 🚀 2018-09-30 23:13:36 -07:00
go.mod Configuration refactoring + management console (#966) 2018-12-12 14:59:15 -08:00
go.sum Configuration refactoring + management console (#966) 2018-12-12 14:59:15 -08:00
graphql-schema-linter.config.js Publish Sourcegraph as open source 🚀 2018-09-30 23:13:36 -07:00
gulpfile.ts use single root package.json, do not build intermediate shared code (#936) 2018-11-12 01:05:35 -08:00
LICENSE enterprise license 2018-10-26 19:13:36 -07:00
LICENSE.apache enterprise license 2018-10-26 19:13:36 -07:00
package.json Remove deprecated dependencies 2018-12-12 23:21:59 +01:00
prettier.config.js Publish Sourcegraph as open source 🚀 2018-09-30 23:13:36 -07:00
README.md fix license info 2018-11-19 15:39:48 -08:00
renovate.json Remove Renovate includePaths: enterprise 2018-11-06 16:12:08 +01:00
tsconfig.json use single root package.json, do not build intermediate shared code (#936) 2018-11-12 01:05:35 -08:00
tslint.json More extension-related code cleanup (#1119) 2018-11-26 05:45:17 -06:00
yarn.lock Remove deprecated dependencies 2018-12-12 23:21:59 +01:00

Sourcegraph

build apache license

Sourcegraph is a fast, open-source, fully-featured code search and navigation engine.

Screenshot

Features

Try it yourself

Development

Prerequisites

  • Git
  • Go (1.11 or later)
  • Docker
  • PostgreSQL (version 9)
  • Node.js (version 8 or 10)
  • Redis
  • Yarn

For a detailed guide to installing prerequisites, see these instructions.

Installation

  1. Ensure Docker is running

  2. Initialize the PostgreSQL database

  3. Start the development server

    ./dev/launch.sh
    

Sourcegraph should now be running at http://localhost:3080.

For detailed instructions and troubleshooting, see the local development documentation.

Documentation

The docs folder has additional documentation for developing and understanding Sourcegraph:

License

Sourcegraph OSS is available freely under the Apache 2 license. Sourcegraph OSS comprises all files in this repository except those in the enterprise/ and src/enterprise directories.

All files in the enterprise/ and src/enterprise/ directories are subject to the Sourcegraph Enterprise license.