Added some comments

This commit is contained in:
Shuai Lin 2018-08-14 11:26:07 +08:00
parent 48077d8fb2
commit 6a69b94a44
3 changed files with 6 additions and 2 deletions

View file

@ -13,6 +13,5 @@ ADD scripts/create_data_links.sh /etc/my_init.d/01_create_data_links.sh
COPY scripts /scripts
COPY templates /templates
COPY bootstrap.conf /opt/bootstrap.conf
CMD ["/sbin/my_init", "--", "/scripts/start.py"]

View file

@ -144,6 +144,10 @@ def init_seafile_server():
fp.write('UNIX_SOCKET = /opt/seafile/ccnet.sock\n')
fp.write('\n')
# After the setup script creates all the files inside the
# container, we need to move them to the shared volume
#
# e.g move "/opt/seafile/seafile-data" to "/shared/seafile/seafile-data"
files_to_copy = ['conf', 'ccnet', 'seafile-data', 'seahub-data', 'pro-data']
for fn in files_to_copy:
src = join(topdir, fn)

View file

@ -53,6 +53,7 @@ media_dirs=(
)
for d in ${media_dirs[*]}; do
source_media_dir=${current_version_dir}/seahub/media/$d
# move files in media/avatars, e.g. media/avatars/default.jpg to seahub-data/avatars
if [ -e ${source_media_dir} ] && [ ! -e ${seahub_data_dir}/$d ]; then
mv $source_media_dir ${seahub_data_dir}/$d
fi