Skip to content

Commit 6ac522e

Browse files
authored
Merge pull request #24 from gitopia/improve-build-instructions
Improve build instructions
2 parents 65161bc + bc5a6a0 commit 6ac522e

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

config_local.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
web_server_port = 5001
1+
web_server_port = 5000
22
gitopia_grpc_url = "localhost:9090"
33
git_dir = "/var/repos"
44
attachment_dir = "/var/attachments"

readme.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ gitopia services for [gitopia](https://gitopia.org/)
66

77
### Build
88

9+
By default, git-server is built with local configurations. If you want to build with `PRODUCTION` or `DEVELOPMENT` configurations, pass a build arg `ENV` with respective value.
910
```
1011
docker build . --build-arg USER=<USER> \
1112
--build-arg PERSONAL_ACCESS_TOKEN=<PERSONAL_ACCESS_TOKEN> \
@@ -22,11 +23,14 @@ To start the server, execute the following command
2223
```sh
2324
docker run -it \
2425
--name git-server \
25-
--mount type=bind,source="$(pwd)/../tmp",target=/var/attachments \
26-
--mount type=bind,source="$(pwd)/../tmp",target=/var/repos -p 5000:5000 \
26+
--mount type=bind,source=/var/attachments,target=/var/attachments \
27+
--mount type=bind,source=/var/repos,target=/var/repos -p 5000:5000 \
2728
git-server
2829
```
2930

31+
> **Important**
32+
> Make sure that `source`, `target` in the docker run command and the `git_dir` in the configuration file have the same path. This is required because forked repositories link to parent repositories via the git alternates mechanism wherein the absolute path of the parent repository is stored in the forked repository's alternates file.
33+
3034
The server will be listening at port `5000`
3135

3236
### Available APIs

0 commit comments

Comments
 (0)