@@ -16,20 +16,21 @@ The GIT-HttpServer only support basic authentication on repositories by protocol
1616## Configuration
1717
1818### Environment Variables
19- | Name | Description | Default | Mandatory |
20- | --------------------| ----------------------------------------------------------| ---------------------------------------------------| -----------|
21- | PATH_CLONE | Set clone path | _ clone | Yes |
22- | PATH_PULL | Set pull path | _ pull | Yes |
23- | PATH_VERSION | Set get git commit version path | _ version | Yes |
24- | PATH_WEBHOOK | Set webhook path | _ hook | Yes |
25- | PATH_HEALTH | Set health check path | _ health | Yes |
26- | REPO_BRANCH | Set default branch to clone content | main | Yes |
27- | REPO_TARGET_FOLDER | Set folder to clone source | target-git | Yes |
28- | REPO_URL | Set url as a source origin | https://github.com/jarpsimoes/git-http-server.git | Yes |
29- | REPO_USERNAME | Set username or token identifier to basic authentication | N/D | No |
30- | REPO_PASSWORD | Set password or token to basic authentication | N/D | No |
31- | HTTP_PORT | Set port to expose content | 8081 | Yes |
32-
19+ | Name | Description | Default | Mandatory |
20+ | ---------------------------| ----------------------------------------------------------| ---------------------------------------------------| -----------|
21+ | PATH_CLONE | Set clone path | _ clone | Yes |
22+ | PATH_PULL | Set pull path | _ pull | Yes |
23+ | PATH_VERSION | Set get git commit version path | _ version | Yes |
24+ | PATH_WEBHOOK | Set webhook path | _ hook | Yes |
25+ | PATH_HEALTH | Set health check path | _ health | Yes |
26+ | REPO_BRANCH | Set default branch to clone content | main | Yes |
27+ | REPO_TARGET_FOLDER | Set folder to clone source | target-git | Yes |
28+ | REPO_URL | Set url as a source origin | https://github.com/jarpsimoes/git-http-server.git | Yes |
29+ | REPO_USERNAME | Set username or token identifier to basic authentication | N/D | No |
30+ | REPO_PASSWORD | Set password or token to basic authentication | N/D | No |
31+ | HTTP_PORT | Set port to expose content | 8081 | Yes |
32+ | GHS_CUSTOM_PATH_ <path > | Custom path to work as a proxy server | N/D | No |
33+ | GHS_CUSTOM_REWRITE_ <path > | Set to remove from proxy request base path | N/D | No |
3334
3435## Implementation
3536
@@ -68,6 +69,26 @@ $ docker run \
6869 jarpsimoes/git_http_server
6970```
7071
72+ ### Implementation with Proxy redirect
73+
74+ Git Http Server support routes to redirect for another URL. Should be defined path to redirect and target.
75+ The environment variables must be defined as bellow:
76+
77+ - GHS_CUSTOM_PATH_example/path/redirect: "https://example.org "
78+ - GHS_CUSTOM_REWRITE_example/path/redirect: true # If you need remove the "example/path/redirect" from the proxy request must be defined:
79+
80+ ``` shell
81+ $ docker run \
82+ -p 8081:8081 \
83+ -e REPO_URL=[URL REPOSITORY] \
84+ -e REPO_BRANCH=[DEFAULT BRANCH] \
85+ -e REPO_USERNAME=[Token Identifier or Username] \
86+ -e REPO_PASSWORD=[Password or Token] \
87+ -e GHS_CUSTOM_PATH_google/redirect=https://www.google.pt
88+ -e GHS_CUSTOM_REWRITE_google/redirect=true
89+ jarpsimoes/git_http_server
90+ ```
91+
7192Test content
7293``` shell
7394$ curl http://localhost:8080
0 commit comments