here is an instruction on how to link only office - without taking it to the local network - but only in docker sits on the same network as seafile - and everything goes through nginx
my example is docker compose
version: '2.0'
services:
db:
image: mariadb:10.11
container_name: seafile-mysql
restart: unless-stopped
environment:
- MYSQL_ROOT_PASSWORD=db_dev # Requested, set the root's password of MySQL service.
- MYSQL_LOG_CONSOLE=true
volumes:
- /home/paha/seadoc/opt/seafile-mysql/db:/var/lib/mysql # Requested, specifies the path to MySQL data persistent store.
networks:
- seafile-net
memcached:
image: memcached:1.6.18
restart: unless-stopped
container_name: seafile-memcached
entrypoint: memcached -m 256
networks:
- seafile-net
seafile:
image: seafileltd/seafile-mc:latest
restart: unless-stopped
container_name: seafile
ports:
- "80:80"
# - "443:443" # If https is enabled, cancel the comment.
volumes:
- /home/paha/seadoc/opt/seafile-data:/shared # Requested, specifies the path to Seafile data persistent store.
environment:
- DB_HOST=db
- DB_ROOT_PASSWD=db_dev # Requested, the value should be root's password of MySQL service.
- TIME_ZONE=Asia/Yekaterinburg # Optional, default is UTC. Should be uncomment and set to your local time zone.
- SEAFILE_ADMIN_EMAIL=123@123.ru # Specifies Seafile admin user, default is 'me@example.com'.
- SEAFILE_ADMIN_PASSWORD=123 # Specifies Seafile admin password, default is 'asecret'.
- SEAFILE_SERVER_LETSENCRYPT=false # Whether to use https or not.
- SEAFILE_SERVER_HOSTNAME=docker.loc # Specifies your host name if https is enabled.
depends_on:
- db
- memcached
networks:
- seafile-net
oods:
image: onlyoffice/documentserver:latest
restart: unless-stopped
container_name: seafile-oods
# ports:
# - "88:80"
volumes:
- /home/paha/seadoc/opt/seafile-oods/DocumentServer/logs:/var/log/onlyoffice
- /home/paha/seadoc/opt/seafile-oods/DocumentServer/data:/var/www/onlyoffice/Data
- /home/paha/seadoc/opt/seafile-oods/DocumentServer/lib:/var/lib/onlyoffice
- /home/paha/seadoc/opt/seafile-oods/DocumentServer/local-production-linux.json:/etc/onlyoffice/documentserver/local-production-linux.json
networks:
- seafile-net
environment:
- JWT_ENABLED=true
- JWT_SECRET=your-secret-string
networks:
seafile-net:
Add this to seafile.nginx.conf
server {
listen 80;
server_name docker.loc;
# server_tokens off;
#server {
# listen 443 ssl;
# server_name docker.loc;
location /onlyofficeds/ {
proxy_pass http://oods/;
proxy_http_version 1.1;
client_max_body_size 100M;
proxy_read_timeout 3600s;
proxy_connect_timeout 3600s;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $proxy_connection;
proxy_set_header X-Forwarded-Host $the_host/onlyofficeds;
proxy_set_header X-Forwarded-Proto $the_scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
but the files for office in seafile do not open in only office - an empty page
yes, if I output the port, it will work
, but I don’t want to output onlyoffice to the local network
only seafile goes to the real network
and communicates with the oods(onlyoffice) service inside the seafile-net docker network: