官网原文1:Docker部署Seafile专业版
官网原文2:将 OnlyOffice 加入到 docker-compose.yml
以下都是基于http的,最终用群晖的反代功能转https
version: '2.0'
services:
db:
image: mariadb:10.5
container_name: seafile-mysql
environment:
- MYSQL_ROOT_PASSWORD=sl2w71201 # Requested, set the root's password of MySQL service.
- MYSQL_LOG_CONSOLE=true
volumes:
- /volume2/docker/seafile/seafile-mysql/db:/var/lib/mysql # Requested, specifies the path to MySQL data persistent store.
networks:
- seafile-net
memcached:
image: memcached:1.6
container_name: seafile-memcached
entrypoint: memcached -m 256
networks:
- seafile-net
elasticsearch:
image: elasticsearch:7.16.2
container_name: seafile-elasticsearch
environment:
- discovery.type=single-node
- bootstrap.memory_lock=true
- xpack.security.enabled=false
- "ES_JAVA_OPTS=-Xms1g -Xmx1g"
先来说说为什么我想用onlyoffice来预览吧,因为seafile预览京东发票PDF时,只有表格和盖章,其它全是空白,现在我用onlyoffice却可以正常了,哈哈开心
感谢zyu318给出的解决方法,见https://bbs.seafile.com/t/topic/11289
vi seahub/seahub/utils/init.py
- 1、找到上图位置
- 2、注释掉PDF行,或修改PDF后缀
- 3、在DOCUMENT行最后添加PDF后缀
version: '2.0'
services:
db:
image: mariadb:10.1
container_name: seafile-mysql
environment:
- MYSQL_ROOT_PASSWORD=sl2w71201 # Requested, set the root's password of MySQL service.
- MYSQL_LOG_CONSOLE=true
volumes:
- /opt/seafile-mysql:/var/lib/mysql # Requested, specifies the path to MySQL data persistent store.
networks:
- seafile-net
memcached:
image: memcached:1.5.6
container_name: seafile-memcached
entrypoint: memcached -m 256
networks:
- seafile-net
elasticsearch:
image: seafileltd/elasticsearch-with-ik:5.6.16
container_name: seafile-elasticsearch
environment:
- discovery.type=single-node
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms1g -Xmx1g"
ulimits:
memlock:
soft: -1
hard: -1
mem_limit: 2g
volumes:
- /opt/seafile-elasticsearch:/usr/share/elasticsearch/data # Requested, specifies the p
docker pull onlyoffice/documentserver:latest
mkdir -pv /opt/onlyoffice/ssl/certs
[root@localhost opt]# ll /opt/onlyoffice/ssl/certs
总用量 8
-rwxr-xr-x. 1 110 114 1980 10月 3 17:30 onlyoffice.crt
-rwxr-xr-x. 1 110 114 1679 10月 3 17:30 onlyoffice.key
[root@localhost opt]#
docker run --net onlyoffice --privileged -i -t -d --restart=always --name onlyoffice \
-p 28443:443 \
-v /opt/onlyoffice/ssl:/var/www/onlyoffice/Data \
-e FORCE_SSL=true -e CERT_FOLDER=/certs/ \
onlyoffice/documentserver
# 在浏览器输入:
https://域名:28443/welcome