OnlyOffice 在执行 docker-compose down 后不会打开以前保存的文档。我需要增加 nextcloud 实例(docker 容器)的内存,所以我继续停止所有容器,修改 docker-compose 并重新设置所有内容。
到目前为止,新文档没有问题,但编辑以前保存的文档 OnlyOffice 会打开一个空白文档,除了文件大小完好无损(控制台中没有错误),NextCloud 中仍显示 KB。
version: "2.3"
services:
nextcloud:
container_name: nextcloud
image: nextcloud:latest
hostname: MYDOMAIN
stdin_open: true
tty: true
restart: always
expose:
- "80"
networks:
- cloud_network
volumes:
- /mnt/apps/nextcloud/data:/var/www/html
environment:
- MYSQL_HOST=mariadb
- PHP_MEMORY_LIMIT=-1
env_file:
- db.env
mem_limit: 8g
depends_on:
- mariadb
mariadb:
container_name: mariadb
image: mariadb
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW --innodb-file-per-table=1 --skip-innodb-read-only-compressed
restart: always
networks:
- cloud_network
volumes:
- mariadb_volume:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=SOMEPASSWORD
env_file:
- db.env
onlyoffice:
container_name: onlyoffice
image: onlyoffice/documentserver:latest
stdin_open: true
tty: true
restart: always
networks:
- cloud_network
expose:
- "80"
volumes:
#- /mnt/apps/onlyoffice/data:/var/www/onlyoffice/Data
- office_data_volume:/var/www/onlyoffice/Data
#- onlyoffice_log_volume:/var/log/onlyoffice
- office_db_volume:/var/lib/postgresql
caddy:
container_name: caddy
image: abiosoft/caddy:no-stats
stdin_open: true
tty: true
restart: always
ports:
- 80:80
- 443:443
networks:
- cloud_network
environment:
- CADDYPATH=/certs
- ACME_AGREE=true
# CHANGE THESE OR THE CONTAINER WILL FAIL TO RUN
- CADDY_LETSENCRYPT_EMAIL=MYEMAIL
- CADDY_EXTERNAL_DOMAIN=MYDOMAIN
volumes:
- /mnt/apps/caddy/certs:/certs:rw
- /mnt/apps/caddy/Caddyfile:/etc/Caddyfile:ro
networks:
cloud_network:
driver: "bridge"
volumes:
office_data_volume:
office_db_volume:
mariadb_volume: