Sign inSign up

jiriks74/onlyoffice-documentserver

By jiriks74

•Updated about 2 years ago

This is OnlyOffice Documentserver for both amd64 and arm64 devices

Image
7

9.0K

jiriks74/onlyoffice-documentserver repository overview

⁠NOW WORKING FOR amd64 and arm64 natively!

Docker Pulls Docker Stars Docker Size

Source repository Source repository⁠

⁠This repository is based on the official Dockerfile and docker-compose.yml files with all the needed files as well

⁠Usage

  • Docker will pull the correct architecture automatically
version: '2'
services:
  onlyoffice-documentserver:
    image: jiriks74/onlyoffice-documentserver:latest
    container_name: onlyoffice-documentserver
    depends_on:
      - onlyoffice-postgresql
      - onlyoffice-rabbitmq
    environment:
      - DB_TYPE=postgres
      - DB_HOST=onlyoffice-postgresql
      - DB_PORT=5432
      - DB_NAME=onlyoffice
      - DB_USER=onlyoffice
      - AMQP_URI=amqp://guest:guest@onlyoffice-rabbitmq
      # Uncomment strings below to enable the JSON Web Token validation.
      #- JWT_ENABLED=true
      #- JWT_SECRET=secret
      #- JWT_HEADER=AuthorizationJwt
      #- JWT_IN_BODY=true
      # Uncomment the line below to set larger file limits (about 1GB)
      #- LARGER_FILE_LIMITS=true
    ports:
      - '80:80'
      - '443:443'
    stdin_open: true
    restart: always
    stop_grace_period: 120s
    volumes:
       # Uncomment the line below to get access to the slide themes directory.
       # To use the themes, copy them to the slideThemes directory and run `docker exec -it <container-name> /usr/bin/documentserver-generate-allfonts.sh`
       #- ./slideThemes:/var/www/onlyoffice/documentserver/sdkjs/slide/themes/src
       - /var/www/onlyoffice/Data
       - /var/log/onlyoffice
       - /var/lib/onlyoffice/documentserver/App_Data/cache/files
       - /var/www/onlyoffice/documentserver-example/public/files
       - /usr/share/fonts
       
  onlyoffice-rabbitmq:
    container_name: onlyoffice-rabbitmq
    image: rabbitmq
    restart: always
    expose:
      - '5672'

  onlyoffice-postgresql:
    container_name: onlyoffice-postgresql
    image: postgres:9.5
    environment:
      - POSTGRES_DB=onlyoffice
      - POSTGRES_USER=onlyoffice
      - POSTGRES_HOST_AUTH_METHOD=trust
    restart: always
    expose:
      - '5432'
    volumes:
      - postgresql_data:/var/lib/postgresql

volumes:
  postgresql_data:
⁠Setup Secret keywith Nextcloud
  1. Uncomment four lines starting with JWT in docker-compose
  2. Set your secret on line JWT_SECRET=yourSecret
  3. Open Nexcloud's config.php (by defauld /var/www/nextcloud/config/config.php)
  4. Add this to the 2nd last line (before the line with );) and paste in your secret (3rd last line)
  'onlyoffice' =>
    array (
      "jwt_secret" => "yourSecret",
      "jwt_header" => "AuthorizationJwt"
  )
  1. Go to your Nextcloud settings, navigate to Onlyoffice settings
  2. Add your server Address and Secret key
  3. Save
⁠Setup lager file limits
  • Uncomment the - LARGER_FILE_LIMITS=true line in docker-compose.yml
⁠Generate custom themes
  1. Uncomment the - ./slideThemes:/var/www/onlyoffice/documentserver/sdkjs/slide/themes/src line
  2. Put your themes into the slideThemes directory
  3. Run docker exec -it <container-name> /usr/bin/documentserver-generate-allfonts.sh
    • (This will take some time. I have totally 35 themes and it took about 30 minutes to generate them on a Raspberry Pi 4 4GB)
  4. If you want to add more themes later, repeat step 2 and 3.
⁠Tags used on DockerHub
  • latest - the latest version of the Documentserver - amd64 version
  • Version tags (eg. 7.0.1-37) - these tags are equal to the Documentserver version of the onlyoffice-documentserver debian package used in the image
⁠1. Clone the repository (for example to your home directory cd /home/$USER/)

git clone https://github.com/jiriks74/Docker-DocumentServer.git && cd Docker-DocumentServer

⁠2. Build the docker image
⁠Building only for the architecture you are building the image on (when building on Raspberry Pi result will be arm64, when on pc result will be amd64)

docker-compose build

⁠Building for all supported architectures (you have to have your environment setup for emulation of arm64 with qemu) - you have to push to DockerHub

docker buildx build --push --platform linux/arm64,linux/amd64,linux/386 .

⁠3. Create and start the container

docker-compose up -d

  • This will start the server. It is set to be automatically started/restarted so as long you have docker running on startup this will start automatically

⁠Updating the image yourself

⁠1. Stop and delete the old container

docker-compose down

⁠2. (optional) Clear the docker cache
⁠- ! This will remove all unused cache images ! (good for saving space, bad if you develop with and need cache, but you understand it at that point)

docker rmi $(docker images -f "dangling=true" -q)

⁠4. Rebuild the image without cache
⁠Building only for the architecture you are building the image on (when building on Raspberry Pi result will be arm64, when on pc result will be amd64)

docker-compose build

⁠Building for all supported architectures (you have to have your environment setup for emulation of arm64 with qemu) - you have to push to DockerHub

docker buildx build --push --platform linux/arm64,linux/amd64,linux/386 .

⁠3. Create and start the new container

docker-compose up -d

⁠The rest of this README can be found at the Gitea repository⁠

Tag summary

Content type

Image

Digest

sha256:006a9baca…

Size

1.2 GB

Last updated

about 2 years ago

docker pull jiriks74/onlyoffice-documentserver