From a3813d64dc2e77632ae7229ecd0f6c1cf41cfc4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20=C5=A0tefka?= Date: Mon, 4 Apr 2022 18:32:43 +0200 Subject: [PATCH 1/8] Update README.md --- README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 565fcc9..1734802 100644 --- a/README.md +++ b/README.md @@ -8,15 +8,18 @@ ### To see how I did it, look [at this comment](https://github.com/ONLYOFFICE/DocumentServer/issues/152#issuecomment-1061902836) - I used this method and put it in `Dockerfile` so you don't have to mess aroud with your system in any weird ways (like in the mentioned comment) ## Installation -#### 1. Clone the repository (for example to your home directory `cd /home/$USER/`) +#### 1. Install `qemu`, `qemu-user`, `qemu-user-static` and `binfmt-support` (RPiOS packages) + `sudo apt install qemu-user qemu-user-static qemu binfmt-support` + +#### 2. Clone the repository (for example to your home directory `cd /home/$USER/`) `git clone https://github.com/jiriks74/Docker-DocumentServer-Arm64.git && cd Docker-DocumentServer-Arm64` -#### 2. Build the docker image +#### 3. Build the docker image `docker-compose build` - This will take a long time. The things that takte the longes are `dpkg-deb: building package 'onlyoffice-documentserver' in 'onlyoffice-documentserver-modified.deb'` and `Generating presentation themes...` - Both of them take like 20 minutes, it's not stuck, it's just slow (SSD will probably help, I'm running only on HDD) -#### 3. Create and start the container +#### 4. 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 From a4176e1dd6f04b6d9b7ed88929f2d2c4926921fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20=C5=A0tefka?= Date: Mon, 4 Apr 2022 18:38:04 +0200 Subject: [PATCH 2/8] Update README.md --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1734802..83bb2b8 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,10 @@ ### To see how I did it, look [at this comment](https://github.com/ONLYOFFICE/DocumentServer/issues/152#issuecomment-1061902836) - I used this method and put it in `Dockerfile` so you don't have to mess aroud with your system in any weird ways (like in the mentioned comment) ## Installation -#### 1. Install `qemu`, `qemu-user`, `qemu-user-static` and `binfmt-support` (RPiOS packages) - `sudo apt install qemu-user qemu-user-static qemu binfmt-support` + +#### 1. Install `qemu-user`, `qemu-user-static`, `qemu` and `binfmt-support` + + `sudo apt update && sudo apt install qemu-user qemu-user-static qemu binfmt-support` #### 2. Clone the repository (for example to your home directory `cd /home/$USER/`) From 101ac458f52f87b6bfe5b223f2d18ea769ca7ec9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20=C5=A0tefka?= Date: Mon, 4 Apr 2022 23:13:52 +0200 Subject: [PATCH 3/8] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 83bb2b8..b8e8ba9 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ #### 4. Rebuild the image without cache - `docker-compose build --no-cache` + `docker-compose build` #### 3. Create and start the new container From 037eaea85b63da083aef50dd474cf9f67f367e00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20=C5=A0tefka?= Date: Mon, 4 Apr 2022 23:56:47 +0200 Subject: [PATCH 4/8] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index b8e8ba9..b0bd984 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,8 @@ ## Installation +### I recommend using prebuilt image that is available on [Docker Hub](https://hub.docker.com/r/jiriks74/onlyoffice-documentserver-arm64) as building it yourself does take really long time (more than half an hour). The instrucions on how to set it up using the prebuilt image are available there. If you still want to build the image yourself, the instructions are below. + #### 1. Install `qemu-user`, `qemu-user-static`, `qemu` and `binfmt-support` `sudo apt update && sudo apt install qemu-user qemu-user-static qemu binfmt-support` From 10f303bc638a7db09f901b90285aaf0e104e1afd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20=C5=A0tefka?= Date: Tue, 5 Apr 2022 09:10:04 +0200 Subject: [PATCH 5/8] Add pretty things --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index b0bd984..d54d407 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,12 @@ ## Onlyoffice-Documentserver with `arm64` support +[![Docker Pulls](https://img.shields.io/docker/pulls/jiriks74/onlyoffice-documentserver-arm64.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=pulls&logo=docker)](https://hub.docker.com/r/jiriks74/onlyoffice-documentserver-arm64) +[![Docker Stars](https://img.shields.io/docker/stars/jiriks74/onlyoffice-documentserver-arm64.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=stars&logo=docker)](https://hub.docker.com/r/jiriks74/onlyoffice-documentserver-arm64) + +[![GitHub Stars](https://img.shields.io/github/stars/jiriks74/Docker-DocumentServer-Arm64.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=github)](https://github.com/jiriks74/Docker-DocumentServer-Arm64) + + ### This runs a modified version of the official deb package with the help of `qemu` and `binfmt` ### It's also based on the official `Dockerfile` and `docker-compose.yml` files with all the needed files as well From bc9d3c9575e8017775d84c089b098664198b8e9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20=C5=A0tefka?= Date: Tue, 5 Apr 2022 09:21:32 +0200 Subject: [PATCH 6/8] Update README.md --- README.md | 113 +++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 90 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index d54d407..7ee5c12 100644 --- a/README.md +++ b/README.md @@ -8,14 +8,97 @@ [![GitHub Stars](https://img.shields.io/github/stars/jiriks74/Docker-DocumentServer-Arm64.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=github)](https://github.com/jiriks74/Docker-DocumentServer-Arm64) -### This runs a modified version of the official deb package with the help of `qemu` and `binfmt` -### It's also based on the official `Dockerfile` and `docker-compose.yml` files with all the needed files as well +#### This runs a modified version of the official deb package with the help of `qemu` and `binfmt` +#### It's also based on the official `Dockerfile` and `docker-compose.yml` files with all the needed files as well -### To see how I did it, look [at this comment](https://github.com/ONLYOFFICE/DocumentServer/issues/152#issuecomment-1061902836) - I used this method and put it in `Dockerfile` so you don't have to mess aroud with your system in any weird ways (like in the mentioned comment) +#### To see how I did it, look [at this comment](https://github.com/ONLYOFFICE/DocumentServer/issues/152#issuecomment-1061902836) - I used this method and put it in `Dockerfile` so you don't have to mess aroud with your system in any weird ways (like in the mentioned comment) -## Installation +## Requirements +- You have to have `qemu`, `qemu-user`, `qemu-user-static` and `binftm-support` installed on your `arm64` host. + - On Raspberry Pi OS you can do `sudo apt install qemu qemu-user qemu-user-static binfmt-support` -### I recommend using prebuilt image that is available on [Docker Hub](https://hub.docker.com/r/jiriks74/onlyoffice-documentserver-arm64) as building it yourself does take really long time (more than half an hour). The instrucions on how to set it up using the prebuilt image are available there. If you still want to build the image yourself, the instructions are below. +## Usage +### docker-compose with prebuilt image (recommended) +```docker-compose +version: '2' +services: + onlyoffice-documentserver: + image: jiriks74/onlyoffice-documentserver-arm64: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=your_secret_key + #- JWT_HEADER=AuthorizationJwt + #- JWT_IN_BODY=true + ports: + - '88:80' + - '443:443' + stdin_open: true + restart: always + stop_grace_period: 120s + volumes: + - /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 key`with 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) +```php + 'onlyoffice' => + array ( + "jwt_secret" => "yourSecret", + "jwt_header" => "AuthorizationJwt" + ) +``` +5. Go to your Nextcloud settings, navigate to Onlyoffice settings +6. Add your server Address and Secret key +7. Save + +#### Version tags +- `latest` - the latest version of the Documentserver +- 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 + +## Building the image yourself +- [Checkout README.md on my GitHub repository](https://github.com/jiriks74/Docker-DocumentServer-Arm64) #### 1. Install `qemu-user`, `qemu-user-static`, `qemu` and `binfmt-support` @@ -33,7 +116,7 @@ `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 +## Updating the image yourself #### 1. Stop and delete the old container `docker-compose down` @@ -51,25 +134,9 @@ `docker-compose up -d` -## Setup `Secret key`with 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) -```php - 'onlyoffice' => - array ( - "jwt_secret" => "yourSecret", - "jwt_header" => "AuthorizationJwt" - ) -``` -5. Go to your Nextcloud settings, navigate to Onlyoffice settings -6. Add your server Address and Secret key -7. Save - --- -## The rest of this file is the official `README.md`. I will not change anything in it, it may not work. If you care about something, make a pull request and we'll figure it out. +## The rest of this file is the official [`README.md` from OnlyOffice-Documentserver repository](https://github.com/ONLYOFFICE/Docker-DocumentServer). I will not change anything in it, it may not work, but considering the changes I made, it should be fully compatible (beware that you must change the `docker-compose.yml` from building the image locally to using this repository). If you want to change something, make a issue on my repository and we'll figure it out.
From f1849ef17feff9b690a46d4808174f999cf27c47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20=C5=A0tefka?= Date: Tue, 5 Apr 2022 09:32:49 +0200 Subject: [PATCH 7/8] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7ee5c12..873fb0e 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,10 @@ [![Docker Pulls](https://img.shields.io/docker/pulls/jiriks74/onlyoffice-documentserver-arm64.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=pulls&logo=docker)](https://hub.docker.com/r/jiriks74/onlyoffice-documentserver-arm64) [![Docker Stars](https://img.shields.io/docker/stars/jiriks74/onlyoffice-documentserver-arm64.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=stars&logo=docker)](https://hub.docker.com/r/jiriks74/onlyoffice-documentserver-arm64) +[![Docker Size](https://img.shields.io/docker/image-size/jiriks74/onlyoffice-documentserver-arm64/latest.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=Size&logo=docker)](https://hub.docker.com/r/jiriks74/onlyoffice-documentserver-arm64) [![GitHub Stars](https://img.shields.io/github/stars/jiriks74/Docker-DocumentServer-Arm64.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=github)](https://github.com/jiriks74/Docker-DocumentServer-Arm64) - +[![GitHub Forks](https://img.shields.io/github/forks/jiriks74/Docker-DocumentServer-Arm64?color=94398d&label=Forks&logo=github&logoColor=ffffff&style=for-the-badge)](https://github.com/jiriks74/Docker-DocumentServer-Arm64) #### This runs a modified version of the official deb package with the help of `qemu` and `binfmt` #### It's also based on the official `Dockerfile` and `docker-compose.yml` files with all the needed files as well @@ -97,8 +98,7 @@ volumes: - `latest` - the latest version of the Documentserver - 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 -## Building the image yourself -- [Checkout README.md on my GitHub repository](https://github.com/jiriks74/Docker-DocumentServer-Arm64) +## Building the image yourself (not recommended - takes a lot of time) #### 1. Install `qemu-user`, `qemu-user-static`, `qemu` and `binfmt-support` From 16d5eecd74b20f3c6508a92b0db5d531341a311a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20=C5=A0tefka?= Date: Tue, 5 Apr 2022 13:53:54 +0200 Subject: [PATCH 8/8] Add FAQ This means frequent problems really... --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 873fb0e..73b9862 100644 --- a/README.md +++ b/README.md @@ -133,6 +133,17 @@ volumes: #### 3. Create and start the new container `docker-compose up -d` + +## FAQ + +### The container is up, but OnlyOffice isn't reachable +- (Due to the slow storage of Raspberry Pi and simmilar devices - external SSD may help here) +- The container takes a bit longer to start up. Just wait, it can take up to 5 minutes for OnlyOffice DocumentServer to load. + +### `docker-copose up` results in http timeout +- (Due to the slow storage of the Raspberry Pi and simmilar external SSD may help here again) +- Run this to set larger timeout: + - `export COMPOSE_HTTP_TIMEOUT=360` ---