[GH-ISSUE #475] INFORMATION: docker-compose.yml #234

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

Originally created by @talesam on GitHub (Aug 12, 2022).
Original GitHub issue: https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/475

In this github there is a docker-compose.yml that I made some modifications on top. I would like to know what is the need for other containers like redis, postgres and rabbitmq, is the performance improvement very big?

version: '3.9'

services:
  onlyoffice-documentserver:
    container_name: onlyoffice-documentserver
    image: onlyoffice/documentserver:latest
    depends_on:
      - onlyoffice-postgresql
      - onlyoffice-redis
      - onlyoffice-rabbitmq
    environment:
      - DB_TYPE=postgres
      - DB_HOST=onlyoffice-postgresql
      - DB_PORT=5432
      - DB_NAME=onlyoffice
      - DB_USER=onlyoffice
      - DB_PASSWORD=xxxxx
      - AMQP_URI=amqp://guest:guest@onlyoffice-rabbitmq
      - REDIS_SERVER_HOST=onlyoffice-redis
      - REDIS_SERVER_PORT=6379
      # Uncomment strings below to enable the JSON Web Token validation.
      #- JWT_ENABLED=true
      #- JWT_SECRET=secret
      #- JWT_HEADER=Authorization
      #- JWT_IN_BODY=true
    expose:
      - '80'
      - '443'
    stdin_open: true
    restart: always
    stop_grace_period: 60s
    volumes:
      #- /home/tales/Docker/OnlyOffice/./run-document-server.sh:/app/ds/run-document-server.sh
      #- /home/tales/Docker/OnlyOffice/etc:/etc/onlyoffice
      - /home/tales/Docker/OnlyOffice/data:/var/www/onlyoffice/Data
      - /home/tales/Docker/OnlyOffice/logs:/var/log/onlyoffice
      - /var/lib/onlyoffice/documentserver/App_Data/cache/files
      - /var/www/onlyoffice/documentserver-example/public/files
      - /usr/share/fonts
    networks:
      t4l35-net:

  onlyoffice-redis:
    container_name: onlyoffice-redis
    image: redis
    restart: always
    expose:
      - '6379'
    networks:
      t4l35-net:
  
  onlyoffice-rabbitmq:
    container_name: onlyoffice-rabbitmq
    image: rabbitmq
    restart: always
    expose:
      - '5672'
    networks:
      t4l35-net:

  onlyoffice-postgresql:
    container_name: onlyoffice-postgresql
    image: postgres:9.5
    environment:
      - POSTGRES_DB=onlyoffice
      - POSTGRES_USER=onlyoffice
      - POSTGRES_PASSWORD=xxxxx
      #- POSTGRES_HOST_AUTH_METHOD=trust
    restart: always
    expose:
      - '5432'
    volumes:
      - /home/tales/Docker/OnlyOffice/postgresql_data:/var/lib/postgresql
    networks:
      t4l35-net:

networks:
  t4l35-net:
    name: t4l35-net
    ```
Originally created by @talesam on GitHub (Aug 12, 2022). Original GitHub issue: https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/475 In this github there is a docker-compose.yml that I made some modifications on top. I would like to know what is the need for other containers like redis, postgres and rabbitmq, is the performance improvement very big? ``` version: '3.9' services: onlyoffice-documentserver: container_name: onlyoffice-documentserver image: onlyoffice/documentserver:latest depends_on: - onlyoffice-postgresql - onlyoffice-redis - onlyoffice-rabbitmq environment: - DB_TYPE=postgres - DB_HOST=onlyoffice-postgresql - DB_PORT=5432 - DB_NAME=onlyoffice - DB_USER=onlyoffice - DB_PASSWORD=xxxxx - AMQP_URI=amqp://guest:guest@onlyoffice-rabbitmq - REDIS_SERVER_HOST=onlyoffice-redis - REDIS_SERVER_PORT=6379 # Uncomment strings below to enable the JSON Web Token validation. #- JWT_ENABLED=true #- JWT_SECRET=secret #- JWT_HEADER=Authorization #- JWT_IN_BODY=true expose: - '80' - '443' stdin_open: true restart: always stop_grace_period: 60s volumes: #- /home/tales/Docker/OnlyOffice/./run-document-server.sh:/app/ds/run-document-server.sh #- /home/tales/Docker/OnlyOffice/etc:/etc/onlyoffice - /home/tales/Docker/OnlyOffice/data:/var/www/onlyoffice/Data - /home/tales/Docker/OnlyOffice/logs:/var/log/onlyoffice - /var/lib/onlyoffice/documentserver/App_Data/cache/files - /var/www/onlyoffice/documentserver-example/public/files - /usr/share/fonts networks: t4l35-net: onlyoffice-redis: container_name: onlyoffice-redis image: redis restart: always expose: - '6379' networks: t4l35-net: onlyoffice-rabbitmq: container_name: onlyoffice-rabbitmq image: rabbitmq restart: always expose: - '5672' networks: t4l35-net: onlyoffice-postgresql: container_name: onlyoffice-postgresql image: postgres:9.5 environment: - POSTGRES_DB=onlyoffice - POSTGRES_USER=onlyoffice - POSTGRES_PASSWORD=xxxxx #- POSTGRES_HOST_AUTH_METHOD=trust restart: always expose: - '5432' volumes: - /home/tales/Docker/OnlyOffice/postgresql_data:/var/lib/postgresql networks: t4l35-net: networks: t4l35-net: name: t4l35-net ```
kerem closed this issue 2026-02-26 10:31:12 +03:00
Author
Owner

@ShockwaveNN commented on GitHub (Aug 13, 2022):

Hi, since you've used onlyoffice/documentserver:latest image, not -de or -ee version, you can remove Redis container altogether, opensource version does not use it at all

About PostgreSQL and RabbitMQ - those are required, but already included in our default container (I know this is not the proper docker way, but our customers like that for ease of setup), but I don't think that there is any major performance hit depending on if those services used in external containers or used from inside our container

I think extracting them to external services allows an easier way to update postgres\rabbit if you need some new version for some reason and allows re-usage of containers for another service

So short answer - no, we are not aware of any noticeable performance hit, especially on opensource version, which limited for 20 use connections

<!-- gh-comment-id:1213748428 --> @ShockwaveNN commented on GitHub (Aug 13, 2022): Hi, since you've used `onlyoffice/documentserver:latest` image, not `-de` or `-ee` version, you can remove Redis container altogether, opensource version does not use it at all About PostgreSQL and RabbitMQ - those are required, but already included in our default container (I know this is not the proper docker way, but our customers like that for ease of setup), but I don't think that there is any major performance hit depending on if those services used in external containers or used from inside our container I think extracting them to external services allows an easier way to update postgres\rabbit if you need some new version for some reason and allows re-usage of containers for another service So short answer - no, we are not aware of any noticeable performance hit, especially on opensource version, which limited for 20 use connections
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#234
No description provided.