Skip to content

Commit

Permalink
完善启动速度慢的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
darlexlin committed May 13, 2021
1 parent 7b87461 commit 6d9bb9d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ RUN apt update -y && \
apt clean

# 初始化
RUN seaf-cli init -d /app -c /app/ccnet
RUN seaf-cli init -d /app -c /app/ccnet && \
chown abc:abc -R /app && \
ln -s /app/ccnet /config/.ccnet && \
chown abc:abc -R /config && \
ln -s /app/ccnet /root/.ccnet

# 数据目录
WORKDIR /sf
Expand Down
14 changes: 8 additions & 6 deletions root/etc/cont-init.d/20-config
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
# 配置权限,sf为数据目录,app为配置目录
# 此配置全部注释掉,开启此配置会在容器生成后或重启后,均会全部遍历一遍更改文件权限,导致启动或重启很慢
# 遍历过一次权限后,后续生成的文件不存在权限问题,所以考虑关掉此配置
chown -R abc:abc \
/app/ccnet \
/config
chmod -R g+w \
/app/ccnet \
/config
#chown -R abc:abc \
# /app/ccnet \
# /config
#chmod -R g+w \
# /app/ccnet \
# /config

echo "20-config start"
8 changes: 4 additions & 4 deletions root/etc/cont-init.d/90-seafile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

# 映射配置目录
# 第一条用于容器启动时直接读取ccnet配置
[[ $(find /config/.ccnet/ -type f | wc -l) -eq 0 ]] && \
ln -s /app/ccnet /config/.ccnet
#[[ $(find /config/.ccnet/ -type f | wc -l) -eq 0 ]] && \
# ln -s /app/ccnet /config/.ccnet
# 第二条用于后台使用时直接查看状态
[[ $(find /root/.ccnet/ -type f | wc -l) -eq 0 ]] && \
ln -s /app/ccnet /root/.ccnet
#[[ $(find /root/.ccnet/ -type f | wc -l) -eq 0 ]] && \
# ln -s /app/ccnet /root/.ccnet

# 输出当前时间
echo "-------------------------------------"
Expand Down

0 comments on commit 6d9bb9d

Please sign in to comment.