-
Notifications
You must be signed in to change notification settings - Fork 2
/
config.yml
98 lines (89 loc) · 2.2 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
port: 9000
metrics_port: 9001
# log level: error / warn / info / debug / trace, default level is info
log_level: info
hot_reload: false
redis:
url: redis://localhost
sled:
metadata_path: cache/sled_metadata
rules:
# IPFS
- name: IPFS
path: "ipfs/"
size_limit: 1 GB
upstream: "https://ipfs.io/ipfs/"
policy: "policy_lru"
# PyPI index
- name: PyPI index
path: "pypi/simple"
upstream: "https://pypi.org/simple"
rewrite:
- from: "https://files.pythonhosted.org/"
to: "http://localhost:9000/pypi/"
policy: "policy_ttl_60"
options:
content_type: "text/html"
# PyPI packages
- name: PyPI packages
path: "pypi/packages/"
size_limit: 1 GB
upstream: "https://files.pythonhosted.org/packages/"
policy: "policy_lru"
# Anaconda index [main]
- path: "anaconda/pkgs/main/(.*repodata.json(.bz2)?)"
upstream: "https://repo.anaconda.com/pkgs/main/$1"
policy: "policy_ttl_60"
# Anaconda packages [main]
- path: "anaconda/pkgs/main"
upstream: "https://repo.anaconda.com/pkgs/main"
policy: "policy_lru"
# Anaconda cloud index
- path: "anaconda/cloud/(.*repodata.json(.bz2)?)"
upstream: "https://conda.anaconda.org/$1"
policy: "policy_ttl_60"
# Anaconda cloud packages
- path: "anaconda/cloud/"
upstream: "https://conda.anaconda.org/"
policy: "policy_lru"
# Ubuntu
- path: "ubuntu/indices/(.*)"
upstream: "http://archive.ubuntu.com/ubuntu/indices/$1"
policy: "policy_ubuntu"
# GitHub-Releases
- name: GitHub Home
path: "/github-releases/"
upstream: "https://github.com/"
policy: "policy_lru"
policies:
- name: policy_ttl_60
type: TTL
metadata_db: sled
storage: in-mem
timeout: 60
clean_interval: 10 # TTL cache cleanup interval, for sled only
- name: policy_lru
type: LRU
metadata_db: sled
storage: local-fs
size: 1 GB
- name: policy_ubuntu
type: LRU
metadata_db: sled
storage: local-fs
size: 128 MB
storages:
- name: local-fs
type: FS
config:
Fs:
path: "cache"
- name: in-mem
type: MEM
config: Mem
- name: S3
type: S3
config:
S3:
endpoint: "http://localhost:9123"
bucket: "cache"