美文网首页NAS群晖Synology/群晖
如何在群晖上快速建立蚂蚁笔记

如何在群晖上快速建立蚂蚁笔记

作者: max技术栈 | 来源:发表于2018-07-31 21:22 被阅读6次

本文转发,需标注清楚引用的标题和地址.

https://www.jianshu.com/p/fb9000a87a18

1.基础材料:

硬件:DS716+II
软件:群晖需要先安装Docker,MongoDBGUI软件Robo 3T[windows软件];

2.基本步骤:

  • 1.Docker注册表搜索并下载mongo:lasest<-leanote依赖的数据库.
  • 2.Docker注册表搜索并下载jim3ma/leanote:latest.
    注:leanote/leanote下载失败,显示"查询注册表失败".知道如何修正的麻烦留言告知.
  • 3.在群晖的FileStation里面新建一个用于leanote的文件夹.目录结构如下,app.conf的内容见附录.
Leanote[dir]
    config[dir]
        app.conf[file]
    data[dir]
  • 4.在docker中运行MongoDB容器,参数按照默认便可.
  • 5.打开RoBo 3T连接MongoDB.地址为群晖的地址,端口为docker中映射的端口,如果没有更改,应该为27017.新建名为leanote的数据库.
  • 6.回到Docker中,新建leanote的容器,把上面新建的Leanote/data映射为/leanote-data,把Leanote/config/app.conf映射为/leanote/conf/app.conf,如果默认端口9000冲突,应该修改成别的端口,这里按照默认.启动leanote容器.
  • 7.导入mongoDB的数据库leanote的初始数据.在docker中的容器选项中打开[双击]leanote容器->终端机->新增,选中新bash,在命令行中输入:mongorestore -h mongo -d leanote --dir /leanote/mongodb_backup/leanote_install_data/对刚才新建立的mongoDB中的数据库leanote进行初始化,重启leanote容器.
  • 8.在浏览器中打开群晖IP地址:leanote容器设置的端口.
    初始的账号有两个:
username: admin password: abc123
username: demo@leanote.com password:abc123

3.附录

app.conf文件内容如下:db.host=localhost,localhost改为群晖的局域网ip地址,更改该文件中说的需要修改的地方.

#------------------------
# leanote config
#------------------------

http.port=9000

site.url=http://localhost:9000 # or http://x.com:8080, http://www.xx.com:9000

# admin username
adminUsername=admin

# mongdb
db.host=localhost
db.port=27017
db.dbname=leanote # required
db.username= # if not exists, please leave it blank
db.password= # if not exists, please leave it blank
# or you can set the mongodb url for more complex needs the format is:
# mongodb://myuser:mypass@localhost:40001,otherhost:40001/mydb
# db.url=mongodb://root:root123@localhost:27017/leanote
# db.urlEnv=${MONGODB_URL} # set url from env. eg. mongodb://root:root123@localhost:27017/leanote

# You Must Change It !! About Security!!
app.secret=V85ZzBeTnzpsHyjQX4zuKbQ8qqtJu9y2aDM55VWxAH1Q0p19poekx3xkcDVvrD0y #

#--------------------------------
# revel config
# for dev
#--------------------------------
app.name=leanote
http.addr=0.0.0.0
http.ssl=false
cookie.httponly=false
cookie.prefix=LEANOTE
cookie.domain= # for share cookie with sub-domain
cookie.secure=false
format.date=2006-01-02
format.datetime=2006-01-02 15:04:05
results.chunked=false

log.trace.prefix = "TRACE "
log.info.prefix  = "INFO  "
log.warn.prefix  = "WARN  "
log.error.prefix = "ERROR "

# The default language of this application.
i18n.default_language=en-us

module.static=github.com/revel/modules/static

[dev]
mode.dev=true
results.pretty=true
watch=true

module.testrunner = # github.com/revel/modules/testrunner

log.trace.output = stderr
log.info.output  = stderr
log.warn.output  = stderr
log.error.output = stderr

[prod]
mode.dev=false
results.pretty=false
watch=false

module.testrunner =

log.trace.output = off
log.info.output  = off
log.warn.output  = %(app.name)s.log
log.error.output = %(app.name)s.log

参考资料:
Leanote Github网站
Leanote DockerHub
Leanote DockerHub2
简书:蚂蚁笔记快速部署指南
Docker部署蚂蚁笔记

本文转发,需标注清楚引用的标题和地址.

相关文章

网友评论

    本文标题:如何在群晖上快速建立蚂蚁笔记

    本文链接:https://www.haomeiwen.com/subject/srrkvftx.html