mirror of
https://github.com/ggogel/seafile-containerized.git
synced 2024-11-16 17:05:32 +00:00
Run the Elasticsearch service in a container.
This commit is contained in:
parent
af3d55b06d
commit
f64a44dc2c
|
@ -9,10 +9,9 @@ RUN mkdir -p /usr/share/man/man1
|
|||
|
||||
RUN apt update
|
||||
|
||||
RUN apt-get install -y openjdk-8-jre libmemcached-dev zlib1g-dev pwgen curl openssl poppler-utils libpython2.7 libreoffice \
|
||||
libreoffice-script-provider-python ttf-wqy-microhei ttf-wqy-zenhei xfonts-wqy python-requests
|
||||
|
||||
RUN apt-get install -y tzdata python-pip python-setuptools python-urllib3 python-ldap python-ceph
|
||||
RUN apt-get install -y libmemcached-dev zlib1g-dev pwgen curl openssl poppler-utils libpython2.7 libreoffice \
|
||||
libreoffice-script-provider-python ttf-wqy-microhei ttf-wqy-zenhei xfonts-wqy python-requests tzdata \
|
||||
python-pip python-setuptools python-urllib3 python-ldap python-ceph
|
||||
|
||||
# The S3 storage, oss storage and psd online preview etc,
|
||||
# depends on the python-backages as follow:
|
||||
|
|
|
@ -169,6 +169,19 @@ COMPRESS_CACHE_BACKEND = 'locmem'""")
|
|||
fp.write('UNIX_SOCKET = /opt/seafile/ccnet.sock\n')
|
||||
fp.write('\n')
|
||||
|
||||
# Disabled the Elasticsearch process on Seafile-container
|
||||
# Connection to the Elasticsearch-container
|
||||
with open(join(topdir, 'conf', 'seafevents.conf'), 'r') as fp:
|
||||
fp_lines = fp.readlines()
|
||||
if '[INDEX FILES]\n' in fp_lines:
|
||||
insert_index = fp_lines.index('[INDEX FILES]\n') + 1
|
||||
insert_lines = ['es_port = 9200\n', 'es_host = elasticsearch\n', 'external_es_server = true\n']
|
||||
for line in insert_lines:
|
||||
fp_lines.insert(insert_index, line)
|
||||
|
||||
with open(join(topdir, 'conf', 'seafevents.conf'), 'w') as fp:
|
||||
fp.writelines(fp_lines)
|
||||
|
||||
# After the setup script creates all the files inside the
|
||||
# container, we need to move them to the shared volume
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue