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 6d9bb9d commit 53f868b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 17 deletions.
6 changes: 1 addition & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@ RUN apt update -y && \
apt clean

# 初始化
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
RUN seaf-cli init -d /app -c /app/ccnet

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

echo "20-config start"
chown -R abc:abc \
/app \
/config
chmod -R g+w \
/app \
/config
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 53f868b

Please sign in to comment.