This repository has been archived by the owner on Feb 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
/
config.py
111 lines (102 loc) · 3.13 KB
/
config.py
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
import os
import sys
import copy
from repoxplorer.controllers.renderers import CSVRenderer
runtimedir = os.path.join(os.path.expanduser('~'), '.local', 'repoxplorer')
# RepoXplorer configuration file
base_logging = {
'version': 1,
'root': {'level': 'DEBUG', 'handlers': ['normal']},
'loggers': {
'indexerDaemon': {
'level': 'DEBUG',
'handlers': ['normal', 'console'],
'propagate': False,
},
'repoxplorer': {
'level': 'DEBUG',
'handlers': ['normal', 'console'],
'propagate': False,
},
'elasticsearch': {
'level': 'WARN',
'handlers': ['normal', 'console'],
'propagate': False,
},
},
'handlers': {
'console': {
'level': 'INFO',
'class': 'logging.StreamHandler',
'formatter': 'console'
},
'normal': {
'class': 'logging.handlers.TimedRotatingFileHandler',
'level': 'DEBUG',
'formatter': 'normal',
'filename': '',
'when': 'D',
'interval': 1,
'backupCount': 30,
},
},
'formatters': {
'console': {'format': ('%(levelname)-5.5s [%(name)s] %(message)s')},
'normal': {'format': ('%(asctime)s %(levelname)-5.5s [%(name)s]'
' %(message)s')},
}
}
# Internal dev pecan server
server = {
'port': '51000',
'host': '0.0.0.0'
}
# Pecan REST and rendering configuration
app = {
'root': 'repoxplorer.controllers.root.RootController',
'modules': ['repoxplorer'],
'custom_renderers': {'csv': CSVRenderer},
'static_root': '%s/public' % runtimedir,
'debug': False,
'errors': {
404: '/error/e404',
'__force_dict__': True
}
}
# Additional RepoXplorer configurations
db_default_file = None
db_path = runtimedir
db_cache_path = db_path
git_store = '%s/git_store' % runtimedir
xorkey = None
elasticsearch_host = 'localhost'
elasticsearch_port = 9200
elasticsearch_index = 'repoxplorer'
elasticsearch_user = None
elasticsearch_password = None
indexer_loop_delay = 60
indexer_skip_projects = []
index_custom_html = ""
users_endpoint = False
admin_token = 'admin_token'
# Absolute path to a helper. If not set or None use the default provided helper
git_credential_helper_path = None
# Logging configuration for the wsgi app
logging = copy.deepcopy(base_logging)
logging['handlers']['normal']['filename'] = (
'%s/repoxplorer-api.log' % runtimedir)
# Logging configuration for the indexer
indexer_logging = copy.deepcopy(base_logging)
indexer_logging['handlers']['normal']['filename'] = (
'%s/repoxplorer-indexer.log' % runtimedir)
# Add this to activate OpenID Connect as your authentication method.
oidc = {
# issuer_url: used to fetch the issuer's configuration by appending
# .well-known/openid-configuration to it
'issuer_url': 'https://path/to/idp',
# Defaults to True, set to False for development
'verify_ssl': True,
# This must be equal to the "aud" claim in the tokens sent back by your
# OpenID Connect provider.
'audience': 'repoxplorer',
}