@@ -87,6 +87,7 @@ make dependencies
87
87
88
88
## Usage
89
89
90
+ ### Local
90
91
``` bash
91
92
Usage:
92
93
gitbase [OPTIONS] < server | version>
@@ -99,12 +100,30 @@ Available commands:
99
100
version Show the version information.
100
101
```
101
102
102
- You can start a server by providing a path which contains multiple git repositories ` /path/to/repositories ` with this command:
103
+ You can start a server providing a path which contains multiple git repositories ` /path/to/repositories ` with this command:
103
104
104
105
```
105
- $ gitbase server -v -g /path/to/repositories
106
+ $ gitbase server -v -g /path/to/repositories -u gitbase
106
107
```
107
108
109
+ ### Docker
110
+
111
+ You can use the official image from [ docker hub] ( https://hub.docker.com/r/srcd/gitbase/tags/ ) to quickly run gitbase:
112
+ ```
113
+ docker run --rm --name gitbase -p 3306:3306 -v /my/git/repos:/opt/repos srcd/gitbase:latest
114
+ ```
115
+
116
+ If you want to speedup gitbase using indexes, you must run a pilosa container:
117
+ ```
118
+ docker run -it --rm --name pilosa -p 10101:10101 pilosa/pilosa:v0.9.0
119
+ ```
120
+
121
+ Then link the gitbase container to the pilosa one:
122
+ ```
123
+ 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
124
+ ```
125
+
126
+ ### Client
108
127
A MySQL client is needed to connect to the server. For example:
109
128
110
129
``` bash
@@ -120,15 +139,22 @@ SELECT commit_hash, commit_author_email, commit_author_name FROM commits LIMIT 2
120
139
2 rows in set (0.01 sec)
121
140
```
122
141
142
+ If gitbase is running in a container from the official image, you must use ` gitbase ` as user:
143
+ ```
144
+ mysql -q -u gitbase -h 127.0.0.1
145
+ ```
146
+
123
147
### Environment variables
124
148
125
149
| Name | Description |
126
150
| :---------------------------------| :----------------------------------------------------|
127
151
| ` BBLFSH_ENDPOINT ` | bblfshd endpoint, default "127.0.0.1:9432" |
152
+ | ` PILOSA_ENDPOINT ` | pilosa endpoint, default "http://localhost:10101" |
128
153
| ` GITBASE_BLOBS_MAX_SIZE ` | maximum blob size to return in MiB, default 5 MiB |
129
154
| ` GITBASE_BLOBS_ALLOW_BINARY ` | enable retrieval of binary blobs, default ` false ` |
130
155
| ` GITBASE_UNSTABLE_SQUASH_ENABLE ` | ** UNSTABLE** check * Unstable features* |
131
156
| ` GITBASE_SKIP_GIT_ERRORS ` | do not stop queries on git errors, default disabled |
157
+ | ` GITBASE_INDEX_DIR ` | directory where indexes will be persisted |
132
158
133
159
## Tables
134
160
0 commit comments