7
7
- [ bblfsh] ( https://github.com/bblfsh/bblfshd ) >= 2.5.0 (only if you're planning to use the ` UAST ` functionality provided in gitbase)
8
8
- [ pilosa] ( https://github.com/pilosa/pilosa ) 0.9.0 (only if you're planning on using indexes)
9
9
10
- ## Download and use the binary
10
+ ## Installing gitbase
11
+
12
+ The easiest way to run the gitbase server is using Docker, however you have the options of using the binary or installing from source.
13
+
14
+ ### Running with Docker
15
+
16
+ You can use the official image from [ docker hub] ( https://hub.docker.com/r/srcd/gitbase/tags/ ) to quickly run gitbase:
17
+ ```
18
+ $ docker run --rm --name gitbase -p 3306:3306 -v /my/git/repos:/opt/repos srcd/gitbase:latest
19
+ ```
20
+
21
+ If you want to speedup gitbase using indexes you must run a pilosa container:
22
+ ```
23
+ $ docker run -it --rm --name pilosa -p 10101:10101 pilosa/pilosa:v0.9.0
24
+ ```
25
+
26
+ Then link the gitbase container to the pilosa one:
27
+ ```
28
+ $ docker run --rm --name gitbase -p 3306:3306 --link pilosa:pilosa -e PILOSA_ENDPOINT="http://pilosa:10101" -v /my/git/repos:/opt/repos srcd/gitbase:latest
29
+ ```
30
+
31
+ ### Download and use the binary
11
32
12
33
Check the [ Releases] ( https://github.com/src-d/gitbase/releases ) page to download the gitbase binary.
13
34
@@ -19,7 +40,7 @@ You can start a server by providing a path which contains multiple git repositor
19
40
$ gitbase server -v -d /path/to/repositories
20
41
```
21
42
22
- ## Installing from source
43
+ ### Installing from source
23
44
24
45
On Linux and macOS:
25
46
@@ -37,26 +58,9 @@ $ cd $GOPATH/src/github.com/src-d/gitbase
37
58
$ make dependencies
38
59
```
39
60
40
- ## Running with Docker
41
-
42
- You can use the official image from [ Docker Hub] ( https://hub.docker.com/r/srcd/gitbase/tags/ ) to quickly run gitbase:
43
- ```
44
- $ docker run --rm --name gitbase -p 3306:3306 -v /my/git/repos:/opt/repos srcd/gitbase:latest
45
- ```
46
-
47
- If you want to speedup gitbase using indexes you must run a pilosa container:
48
- ```
49
- $ docker run -it --rm --name pilosa -p 10101:10101 pilosa/pilosa:v0.9.0
50
- ```
51
-
52
- Then link the gitbase container to the pilosa one:
53
- ```
54
- $ docker run --rm --name gitbase -p 3306:3306 --link pilosa:pilosa -e PILOSA_ENDPOINT="http://pilosa:10101" -v /my/git/repos:/opt/repos srcd/gitbase:latest
55
- ```
56
-
57
61
## Connecting to the server
58
62
59
- When the server is started a MySQL client is needed to connect to the server. For example:
63
+ When the gitbase server is started a MySQL client is needed to connect to the server. For example:
60
64
61
65
``` bash
62
66
$ mysql -q -u root -h 127.0.0.1
0 commit comments