Add configuration snippet to showcase env vars
[m6w6/gh-mirror] / README.md
1 # gh-mirror
2
3 Simple PHP webhook to mirror github repositories.
4
5 ## Requirements
6
7 * [pecl/http](https://github.com/m6w6/ext-http)
8
9 ## Configuration
10
11 ```php
12 $mirror = getenv("mirror") ?: "/var/github/mirror";
13 $secret = getenv("secret") ?: trim(file_get_contents("$mirror/.secret"));
14 $owners = explode(",", getenv("owners") ?: trim(file_get_contents("$mirror/.owners")));
15 ```
16
17 ## License
18
19 gh-mirror is licensed under the 2-Clause-BSD license, which can be found in
20 the accompanying [LICENSE](./LICENSE) file.
21
22 ## Contributing
23
24 All forms of contribution are welcome! Please see the bundled
25 [CONTRIBUTING](./CONTRIBUTING.md) note for the general principles followed.
26
27 The list of past and current contributors is maintained in [THANKS](./THANKS).