-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.example.js
173 lines (150 loc) · 4.32 KB
/
config.example.js
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
/**
* rin-pr project configuration
*/
var path = require('path');
//'..' for config folder, '.' for config.js file
var root_dir = path.resolve(__dirname, '.') + '/';
var public_dir = root_dir + 'public/';
var upload_dir = public_dir + 'data/';
var tmp_dir = public_dir + 'data/tmp/';
// dev_mode will disable all email verification
var dev_mode = true;
var base_url = 'http://rin.pr.com';
const config = {
web: {
/* web server configurations */
bindAddress: '127.0.0.1',
bindPort: '3006',
liteView: true,
enable_image_upload: false,
// enable http static file server
static_file_server: false,
web_domain_prefix: base_url //+ '/#!'
},
rss: {
default_items_limit: 50,
max_items_limit: 100
},
cache: {
enable: true,
service: 'redis',
host: process.env.REDIS_HOST || '127.0.0.1',
port: process.env.REDIS_PORT ? parseInt(process.env.REDIS_PORT) : 6379,
db: process.env.REDIS_DB,
ttl: 3 * 60 //3min
},
cdn: {
domain_url: 'https://cdn.domain.com' // leave empty for false
},
sso: {
service: 'disqus',
shortname: 'bangumi',
disqus: {
'secret_key': '',
'public_key': ''
},
notifier: {
imaphost: 'imap.mail.com',
user: 'notifications@',
password: '',
scan_time: 60 * 1000
}
},
tracker: {
/* tracker configurations */
/* tracker should use only https (for safety)? */
service: "opentracker",
options: {
command: "opentracker -f /etc/opentracker/opentracker.conf",
whitelist: "/etc/opentracker/whitelist",
reload_time: 0 //0 for instant reload
},
/*
service: "kana-api",
options: {
servers: [
// url not end with '/add'
{ name: 'kana-tracker-hk', url: 'http://localhost/kana1', key: 'KANA PASS KEY1' },
{ name: 'kana-tracker-eu', url: 'http://localhost/kana2', key: 'KANA PASS KEY2' }
],
whitelist: "/etc/opentracker/whitelist"
},
*/
},
torrent: {
contains: [
],
add: [
"http://tr.bangumi.moe:6969/announce", // announce
"http://t.nyaatracker.com/announce",
"http://open.acgtracker.com:1096/announce",
"http://open.nyaatorrents.info:6544/announce",
// "http://tracker.ktxp.com:6868/announce",
// "http://tracker.ktxp.com:7070/announce",
// "http://t2.popgo.org:7456/annonce",
"http://bt.sc-ol.com:2710/announce",
// "http://share.camoe.cn:8080/announce",
"http://t.acg.rip:6699/announce",
"http://opentracker.acgnx.se/announce",
"http://nyaa.tracker.wf:7777/announce",
],
remove: [
]
},
db: {
/* database configurations */
username: process.env.DB_USER || '',
password: process.env.DB_PASS || '',
host: process.env.MONGO_HOST || '127.0.0.1:27017',
name: process.env.DB_NAME || 'rin'
},
security: {
/* Security settings */
keyGrip: [
'phahMi0Pue3fohPae8Kohboo7phoAuy7ohnuqui9OhRoo3siLuEo1epi',
'reihet5Yhs3xaeDhee0ieken0HoxahV8zahthah0Wahhree3KauaPh2i'
],
teamAccountKey: process.env.KEY_TEAM_ACCOUNT || 'i9j6wCgMqNGw',
// one week
maxAge: 7 * 24 * 60 * 60 * 1000
},
sys: {
public_dir: public_dir,
upload_dir: upload_dir,
root_dir: root_dir,
tmp_dir: tmp_dir
},
app: {
dev_mode: dev_mode,
base_url: base_url,
api_domain_prefix: base_url,
override_lang: false,
def_lang: 'zh_tw',
langs: ['en', 'zh_tw', 'zh_cn']
},
mail: {
service: 'Gmail',
user: 'test@gmail.com',
password: 'test',
sender: '番組、萌え <test@test.moe>',
admin: 'prpr@gmail.com'
},
ocr: {
//engine: 'ruokuai',
//username: '',
//password: ''
engine: 'tesseract',
command: 'tesseract'
},
teamsync: {
bt_sites: {
nyaa: {
}
}
},
acgdb: {
pathname: 'http://acgdb.com'
}
};
//config.teamsync.bt_sites.nyaa.announce_list = config.torrent.add;
module.exports = config;