[GH-ISSUE #653] Callback url contains localhost in docker #294

Closed
opened 2026-02-26 10:31:39 +03:00 by kerem · 1 comment
Owner

Originally created by @pengpengno on GitHub (Aug 9, 2023).
Original GitHub issue: https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/653

Do you want to request a feature or report a bug?
Question
What is the current behavior?
i build the project with docker compose and define two service , one of them is a office storage server and the other one is only-office which is depoy in docker

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

Following is a track from only-server , the major question i wondering is that only-office make a callback with some args which contains url , but the url is start with localhost and as i previous said i deploy service in docker , so the other one service could not get the correct result via localhost

	"actions":[
 		{
 			"type":0,
 			"userid":"uid-1691401064460"
 		}
 	],
 	"changesurl":"http://localhost/cache/files/data/-990938696_2421/changes.zip/changes.zip?md5=goLFkETCdceHc8JwhmvH0g&expires=1691571578&filename=changes.zip",
 	"filetype":"docxf",
 	"history":{
 		"changes":[
 			{
 				"created":"2023-08-09 08:44:29",
 				"user":{
 					"id":"uid-1691401064460",
 					"name":"guest"
 				}
 			}
 		],
 		"serverVersion":"7.4.1"
 	},
 	"key":"-990938696",
 	"lastsave":"2023-08-09T08:44:29.000Z",
 	"notmodified":false,
 	"status":2,
 	"token":"******",
 	"url":"http://localhost/cache/files/data/-990938696_2421/output.docxf/output.docxf?md5=jk_JNmHHljw8Bz5W5lvm6Q&expires=1691571578&filename=output.docxf",
 	"users":[
 		"uid-1691401064460"
 	]
 } 

What is the expected behavior?

Did this work in previous versions of DocumentServer?

DocumentServer Docker tag:

following is mine docker compose yaml


version: '3'
services:
  elsbiz-office:

    depends_on:
      - only-office
    container_name: elsbiz-office
    build:
      context: ./elsbiz-office-service
      dockerfile: Dockerfile
      args:
        IMAGE_NAME: elsbiz-office
        TAG: 1.0.0

    image: ******
    volumes:
      - ./documents:/app/service/elsbiz-office-service/documents
    networks:
      - office-network
    ports:
      - 8090:8090

    environment:
      OFFICE_SERVER_HOST: http://only-office/   
      SERVER: http://elsbiz-office:8090
      PORT: 8090
      JWT_ENABLED: true
      JWT_SECRET: ELS_BIZ_ONLY_OFFICE_JWT_TOKEN

  only-office:
    container_name: onlyoffice
    image: onlyoffice/documentserver
    ports:
      - 80:80
      - 443:443
    environment:
      JWT_ENABLED: true
      JWT_SECRET: ELS_BIZ_ONLY_OFFICE_JWT_TOKEN
      JWT_HEADER: Authorization

    networks:
      - office-network
    volumes:
      -   ./logs:/var/log/onlyoffice
      -   ./data:/var/www/onlyoffice/Data
      -   ./lib:/var/lib/onlyoffice
      -   ./redis:/var/lib/redis
      -   ./rabbitmq:/var/lib/rabbitmq
      -   ./postgresql:/var/lib/postgresql
      -   ./logs:/var/lib/onlyoffice

networks:
  office-network:
    driver: bridge

Host Operating System:

windows

major question

Is there some config that used to define the callback url instead of localhost ,?

Originally created by @pengpengno on GitHub (Aug 9, 2023). Original GitHub issue: https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/653 **Do you want to request a *feature* or report a *bug*?** Question **What is the current behavior?** i build the project with docker compose and define two service , one of them is a office storage server and the other one is only-office which is depoy in docker **If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.** Following is a track from only-server , the major question i wondering is that only-office make a callback with some args which contains url , but the url is start with localhost and as i previous said i deploy service in docker , so the other one service could not get the correct result via localhost ``` "actions":[ { "type":0, "userid":"uid-1691401064460" } ], "changesurl":"http://localhost/cache/files/data/-990938696_2421/changes.zip/changes.zip?md5=goLFkETCdceHc8JwhmvH0g&expires=1691571578&filename=changes.zip", "filetype":"docxf", "history":{ "changes":[ { "created":"2023-08-09 08:44:29", "user":{ "id":"uid-1691401064460", "name":"guest" } } ], "serverVersion":"7.4.1" }, "key":"-990938696", "lastsave":"2023-08-09T08:44:29.000Z", "notmodified":false, "status":2, "token":"******", "url":"http://localhost/cache/files/data/-990938696_2421/output.docxf/output.docxf?md5=jk_JNmHHljw8Bz5W5lvm6Q&expires=1691571578&filename=output.docxf", "users":[ "uid-1691401064460" ] } ``` **What is the expected behavior?** **Did this work in previous versions of DocumentServer?** **DocumentServer Docker tag:** following is mine docker compose yaml ``` version: '3' services: elsbiz-office: depends_on: - only-office container_name: elsbiz-office build: context: ./elsbiz-office-service dockerfile: Dockerfile args: IMAGE_NAME: elsbiz-office TAG: 1.0.0 image: ****** volumes: - ./documents:/app/service/elsbiz-office-service/documents networks: - office-network ports: - 8090:8090 environment: OFFICE_SERVER_HOST: http://only-office/ SERVER: http://elsbiz-office:8090 PORT: 8090 JWT_ENABLED: true JWT_SECRET: ELS_BIZ_ONLY_OFFICE_JWT_TOKEN only-office: container_name: onlyoffice image: onlyoffice/documentserver ports: - 80:80 - 443:443 environment: JWT_ENABLED: true JWT_SECRET: ELS_BIZ_ONLY_OFFICE_JWT_TOKEN JWT_HEADER: Authorization networks: - office-network volumes: - ./logs:/var/log/onlyoffice - ./data:/var/www/onlyoffice/Data - ./lib:/var/lib/onlyoffice - ./redis:/var/lib/redis - ./rabbitmq:/var/lib/rabbitmq - ./postgresql:/var/lib/postgresql - ./logs:/var/lib/onlyoffice networks: office-network: driver: bridge ``` **Host Operating System:** windows #### major question Is there some config that used to define the callback url instead of localhost ,?
kerem closed this issue 2026-02-26 10:31:39 +03:00
Author
Owner

@pengpengno commented on GitHub (Aug 10, 2023):

well i replace only-office which is in docker host name with internal ip which is in deply host , it worked . close this issue

<!-- gh-comment-id:1672833827 --> @pengpengno commented on GitHub (Aug 10, 2023): well i replace only-office which is in docker host name with internal ip which is in deply host , it worked . close this issue
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Docker-DocumentServer-ONLYOFFICE#294
No description provided.