https://github.com/TruthHun/BookStack
https://github.com/truthhun/BookChat
https://github.com/truthhun/BookChatApp
https://hub.docker.com/r/willdockerhub/bookstack
https://www.github.com/willzhang/docker-images
https://github.com/easy-docker/mindoc
https://hub.docker.com/r/ghostry/mindoc
bookstack:
FROM centos:7
ENV CALIBRE_URL=https://download.calibre-ebook.com/linux-installer.py \
BOOKSTACK_VER=v2.5 \
BOOKSTACK_PKG=BookStack.V2.5_Linux_amd64.zip
RUN yum install -y wget unzip git \
&& yum -y install --skip-broken epel-release axel yum-axelget vim net-tools bzip2 lrzsz unzip zip wget ftp gcc gcc-c++ make kernel-headers ntpdate lsof screen curl python psmisc telnet-server telnet.* vim-enhanced xz iftop sysstat dstat htop iotop lrzsz lftp bash-completion python-simplejson libselinux-python smartmontools automake autoconf libtool \
&& yum -y groupinstall "fonts" \
&& yum -y install kde-l10n-Chinese glibc-common \
&& localedef -c -f UTF-8 -i zh_CN zh_CN.UTF-8 && export LC_ALL=zh_CN.UTF-8 \
&& echo 'LANG="zh_CN.UTF-8"' > /etc/locale.conf \
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& curl https://setup.ius.io | sh \
&& yum remove -y git \
&& yum -y install git2u \
###install calibre
&& wget -nv -O- ${CALIBRE_URL} | python -c "import sys; main=lambda:sys.stderr.write('Download failed\n'); exec(sys.stdin.read()); main()" \
&& rm -rf /tmp/calibre-installer-cache \
###install chrome
&& wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm \
&& yum -y localinstall google-chrome-stable_current_x86_64.rpm \
&& rm -rf google-chrome-stable_current_x86_64.rpm \
###install bookstack
&& mkdir /opt/bookstack/ \
&& cd /opt/bookstack/ \
&& wget https://github.com/TruthHun/BookStack/releases/download/${BOOKSTACK_VER}/${BOOKSTACK_PKG} \
&& unzip ${BOOKSTACK_PKG} \
&& chmod -R 777 /opt/bookstack/ \
&& rm -rf ${BOOKSTACK_PKG} \
&& yum update -y \
&& yum clean all
COPY ./entrypoint.sh /
RUN chmod +x /entrypoint.sh
WORKDIR /opt/bookstack/
EXPOSE 8181
ENTRYPOINT [ "/entrypoint.sh" ]entrypoint.sh:
#!/bin/bash
if [ ! -f /opt/bookstack/dbupdated ]
then
/opt/bookstack/BookStack install 2>&1 | tee /opt/bookstack/dbupdated
else
echo "###db had updated,skip bookstack install,just start it!###"
fi
/opt/bookstack/BookStack
cd /data/docker/tools/Dockerfile/bookstack
docker build -t bookstack .
docker tag bookstack:latest hub.htmltoo.com:5000/http:bookstack-20200301
docker push hub.htmltoo.com:5000/http:bookstack-20200101
# 升级,安装calibre - 电子书制作及阅读软件:
https://abc.htmltoo.com/thread-45859.htm
# 安装基础应用
yum -y install --skip-broken epel-release axel yum-axelget vim net-tools bzip2 lrzsz unzip zip wget ftp gcc gcc-c++ make kernel-headers ntpdate lsof screen curl python psmisc telnet-server telnet.* vim-enhanced xz iftop sysstat dstat htop iotop lrzsz lftp bash-completion python-simplejson libselinux-python smartmontools automake autoconf libtool
# 安装中文
yum -y groupinstall "fonts"
yum -y install kde-l10n-Chinese glibc-common
localedef -c -f UTF-8 -i zh_CN zh_CN.UTF-8 && export LC_ALL=zh_CN.UTF-8
echo 'LANG="zh_CN.UTF-8"' > /etc/locale.conf
# 修改系统语言环境,修改时区
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
ntpdate time.windows.com && hwclock -w && hwclock --systohc
# 升级最新内核
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-4.el7.elrepo.noarch.rpm
yum -y --enablerepo=elrepo-kernel install kernel-ml
# 更新软件
yum check-update
yum update -y
yum clean all
# 升级BookStack
cd /data/file/soft/development
wget .....
cd BookStack.V2.6_Linux_amd64
cp -a dictionary /opt/bookstack
cp -a BookStack /opt/bookstack
cp -a cover.js /opt/bookstack
cp -a crawl.js /opt/bookstack
cd /opt/bookstack
./BookStack install # 升级数据库
# 修改模板
\views\widgets\footer.html
\views\errors\404.html
\views\ebook\statement.html # pdf的footer显示内容
\views\document\default_read.html # 默认左侧版本
# 提交容器仓库
docker commit -m="update" -a="domsn.com" afe0382feb6c38c2a1b0e89b6a765e64e147792da039c1362f80ce88657f21ca hub.htmltoo.com:5000/http:bookstack;
docker push hub.htmltoo.com:5000/http:bookstack;
# APP二次开发 https://gitee.com/truthhun/BookChatApp
1.安装部署BookStack
克隆下载BookChatApp源码
使用HBuilderX打开项目文件夹
将下载程序中的config.example.js文件重命名为config.js文件
根据自己的开发环境,设置host配置项
如果是在开发环境,请把debug设置为true,编译生成生产程序的时候,把debug设置为false
2.程序页面
目录页 /pages/menu/menu
书籍阅读页 /pages/read/read
用户中心页 /pages/ucenter/ucenter
首页 /pages/index/index
分类页 /pages/cate/cate
书架页 /pages/bookshelf/bookshelf
列表页 /pages/list/list
个人主页 /pages/me/me
书签页 /pages/bookmarks/bookmarks
搜索结果页 /pages/search/search
内容点评页 /pages/comment/comment
404页 /pages/notfound/notfound
登录页 /pages/login/login
注册页 /pages/register/register
书籍介绍页 /pages/intro/intro