forked from maroux/docker-pypicloud
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.ini.tmpl
112 lines (88 loc) · 2.72 KB
/
config.ini.tmpl
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
[app:main]
use = egg:pypicloud
pyramid.reload_templates = false
pyramid.debug_authorization = false
pyramid.debug_notfound = false
pyramid.debug_routematch = false
pyramid.default_locale_name = en
pypi.default_read = {{ getv "/pypi/default/read" "authenticated" }}
pypi.default_write = authenticated
pypi.cache_update = {{ getv "/pypi/cache/update" "authenticated" }}
# Storage Type
{{if eq (getv "/pypi/storage" "file") "s3" }}
pypi.storage = s3
storage.bucket = {{ getv "/pypi/storage/bucket" }}
storage.aws_access_key_id = {{ getv "/aws/access/key/id" }}
storage.aws_secret_access_key = {{ getv "/aws/secret/access/key" }}
storage.calling_format = OrdinaryCallingFormat
{{else}}
pypi.storage = {{ getv "/pypi/storage/" "file" }}
storage.dir = {{ getv "/pypi/storage/dir" "/etc/pypicloud/packages" }}
{{end}}
pypi.db = {{ getv "/pypi/db" "sql" }}
db.url = {{ getv "/pypi/db/url" "sqlite:///etc/pypicloud/db.sqlite" }}
pypi.fallback = {{ getv "/pypi/fallback" "redirect" }}
pypi.fallback_url = {{ getv "/pypi/fallback/url" "https://pypi.python.org/simple" }}
pypi.always_show_upstream = {{ getv "/pypi/always/show/upstream" "False" }}
{{if exists "/pypi/admins"}}
{{ $admins := split (getv "/pypi/admins") "," }}
auth.admins =
admin
{{ range $admins }}{{ . }}
{{ end }}
{{end}}
user.admin = {{ getv "/pypi/admin/password" "" }}
{{range gets "/pypi/auth/user/*"}}{{ $user := split (.Key) "/" }}
user.{{ index $user 4 }} = {{ .Value }}
{{end}}
# For beaker
session.encrypt_key = {{ getv "/pypi/session/encrypt/key" "39jH7SSo4ZqxZyBQj+iKNxa1RJEyTg5PePUpUhlW6pU=" }}
session.validate_key = {{ getv "/pypi/session/validate/key" "j728l5M5LmkyAB+f1Tp77rEoisDHUWJS9pJUVDh0S5U=" }}
session.secure = {{ getv "/pypi/session/secure" "false" }}
session.invalidate_corrupt = true
###
# wsgi server configuration
###
[uwsgi]
paste = config:%p
paste-logger = %p
master = true
processes = {{ getv "/pypi/processes" "20" }}
reload-mercy = 15
worker-reload-mercy = 15
max-requests = 1000
enable-threads = true
{{if exists "/pypi/ssl/key"}}
https = {{ getv "/pypi/http" "0.0.0.0:8080" }},{{ getv "/pypi/ssl/crt" }},{{ getv "/pypi/ssl/key" }}
{{else}}
http = {{ getv "/pypi/http" "0.0.0.0:8080" }}
{{end}}
virtualenv = /env
###
# logging configuration
# http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/logging.html
###
[loggers]
keys = root, botocore, pypicloud
[handlers]
keys = console
[formatters]
keys = generic
[logger_root]
level = INFO
handlers = console
[logger_pypicloud]
level = DEBUG
qualname = pypicloud
handlers =
[logger_botocore]
level = WARN
qualname = botocore
handlers =
[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic
[formatter_generic]
format = %(levelname)s %(asctime)s [%(name)s] %(message)s