Files
YYeTsBot/yyetsweb
2022-12-31 16:41:13 +01:00
..
2022-03-26 11:22:49 +08:00
2022-02-06 18:51:41 +08:00
2021-08-15 12:29:49 +08:00
2022-04-10 13:59:00 +08:00
2022-10-09 10:11:50 +08:00
2022-10-09 10:11:50 +08:00
2022-09-10 07:55:48 +08:00
2022-09-17 17:58:16 +08:00
2022-03-04 20:03:11 +08:00
2022-10-09 10:11:50 +08:00
2022-12-31 14:33:20 +01:00
2021-07-24 19:02:44 +08:00
2022-09-10 07:55:48 +08:00

web端

注意源代码中包含Google Analytics分析代码index.html, search.htmlresource.html。如果自己使用,要记得去除哦

requirements

  • tornado
  • mongodb
  • pymongo

导入数据

这里 下载mongodb数据然后导入

mongorestore --gzip --archive=yyets_mongo.gz --nsFrom "share.*" --nsTo "zimuzu.*"

运行

python server.py

Docker

参考这里

MongoDB index

use zimuzu;

db.getCollection('yyets').createIndex({"data.info.id": 1});
db.getCollection('yyets').createIndex({"data.info.views" : -1});
db.getCollection('yyets').createIndex({"data.info.area" : 1});
db.getCollection('yyets').getIndexes();

db.getCollection('douban').createIndex({"resourceId" : 1});
db.getCollection('douban').getIndexes();

db.getCollection('users').createIndex({"username" : 1}, { unique: true });
db.getCollection('users').getIndexes();

db.getCollection('comment').createIndex({"resource_id" : 1});
db.getCollection('comment').getIndexes();

db.getCollection('reactions').createIndex({"comment_id" : 1});
db.getCollection('reactions').getIndexes();

db.getCollection('metrics').createIndex({"date" : 1});
db.getCollection('metrics').getIndexes();

db.getCollection('notification').createIndex({"username" : 1});
db.getCollection('notification').getIndexes();