1
- # crates- mirror
1
+ # Crates.io caching mirror
2
2
[ ![ Build Status] ( https://travis-ci.org/weiznich/crates-mirror.svg?branch=master )] ( https://travis-ci.org/weiznich/crates-mirror )
3
3
4
4
@@ -17,24 +17,36 @@ Stores the index localy on the filesystem.
17
17
base_path = " /path/to/store/crates"
18
18
listen_on = " localhost:3000"
19
19
remote_api = " https://crates.io"
20
- poll_intervall = 60 # seconds
21
- registry_config = {upstream_url = " https://github.com/rust-lang/crates.io-index" }
20
+ poll_intervall = 300 # seconds
21
+
22
+ [registry_config ]
23
+ upstream_url = " https://github.com/rust-lang/crates.io-index"
22
24
```
23
25
### Remote Index
24
26
Stores the index in a remote git repositority.
25
27
``` toml
26
- base_path = " /path/to/store/crates "
28
+ base_path = " /tmp/crates_mirror "
27
29
listen_on = " localhost:3000"
28
30
remote_api = " https://crates.io"
29
- poll_intervall = 60 # seconds
30
- registry_config = {
upstream_url =
" https://github.com/rust-lang/crates.io-index" ,
origin_url =
" [email protected] /whatever" }
31
+ poll_intervall = 300 # seconds
32
+
33
+ [registry_config ]
34
+ upstream_url = " https://github.com/rust-lang/crates.io-index"
35
+
36
+ [registry_config .origin ]
37
+ url =
" [email protected] /whatever"
38
+ username = " weiznich" # optional, could also use ssh-key
39
+ password = " xxxxx" # optional, could also use ssh-key
31
40
```
32
41
42
+ ## Reading Material
43
+ * [ Dissecting Crates.io: Bare Minimum Mirror] ( https://gmjosack.github.io/posts/dissecting-cratesio-minimum-mirror/ )
44
+
33
45
## License
34
46
35
47
Licensed under either of
36
48
37
49
* Apache License, Version 2.0 ([ LICENSE-APACHE] ( LICENSE-APACHE ) or http://www.apache.org/licenses/LICENSE-2.0 )
38
50
* MIT license ([ LICENSE-MIT] ( LICENSE-MIT ) or http://opensource.org/licenses/MIT )
39
51
40
- at your option.
52
+ at your option.
0 commit comments