Compare commits

...
Author SHA1 Message Date
carla 05ec400e34 adds maintenance and updates readme
continuous-integration/drone/pr Build is failing
2026-08-26 13:07:07 +02:00
carla c7218e7f51 chore: publish 2.13.0+9.4.0 release
continuous-integration/drone/push Build is failing
continuous-integration/drone/tag Build is passing
2026-06-29 12:33:02 +02:00
carla 046280291e chore: update image tags 2026-06-29 12:12:21 +02:00
carla 39bf619e0a chore: publish 2.12.0+9.3.1 release
continuous-integration/drone/push Build is failing
continuous-integration/drone/tag Build is passing
2026-03-24 15:16:59 +01:00
moritz 0f2fbad07e chore: replace depricated traefik.docker.* with traefik.swarm.*
continuous-integration/drone/push Build is failing
2026-03-17 17:16:27 +01:00
carla 2820843f6a Merge remote-tracking branch 'origin/main'
continuous-integration/drone/push Build is failing
2026-01-12 15:32:45 +01:00
iexos 59971c18be remove default TIMEOUT (abra #596)
continuous-integration/drone/push Build is failing
2025-12-30 14:00:50 +01:00
carla 5da7b78c14 recipe patch version 2.11.1+9.0.2 2025-11-13 09:31:20 +01:00
carla 6c8b7dd2a7 chore: publish 2.11.0+9.0.2 release
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
2025-07-03 13:39:25 +02:00
moritz 04caca0798 chore: publish 2.10.0+8.3.0 release
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
2025-02-11 18:05:58 +01:00
cas 45d1f09317 Update .drone.yml
continuous-integration/drone/push Build is passing
2025-01-08 10:09:13 -08:00
moritz b571899521 fix drone runner
continuous-integration/drone/push Build is passing
2024-11-26 22:20:26 +01:00
moritz c1fa536df2 chore: publish 2.9.0+8.2.1 release
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is failing
2024-11-26 22:01:18 +01:00
moritz 807b095441 update pg_backup.sh
continuous-integration/drone/push Build is failing
2024-10-22 21:33:47 +02:00
moritz 5f3dcb4256 update backupbot labels
continuous-integration/drone/push Build is failing
2024-10-22 20:17:48 +02:00
moritz 3022729f66 chore: publish 2.8.0+8.1.1 release
continuous-integration/drone/push Build is passing
2024-08-07 13:44:04 +02:00
moritz 450c1cdca0 add alakazam integration file alaconnect.yml
continuous-integration/drone/push Build is passing
2024-05-13 17:33:01 +02:00
simon bb99499b91 chore: publish 2.7.0+8.0.1 release
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
2024-04-09 14:37:10 +02:00
moritz b681d6ef44 chore: publish 2.6.2+7.4.0 release
continuous-integration/drone/push Build is passing
2023-10-19 23:48:09 +02:00
moritz 928469f6eb add backup label 2023-10-19 23:47:50 +02:00
philippr 3072d4c33c chore: publish 2.6.1+7.4.0 release
continuous-integration/drone/push Build is passing
2023-07-25 12:11:40 +02:00
philippr c9ed2edd8f chore: publish 2.6.0+7.4.0 release 2023-07-25 12:10:03 +02:00
philippr 012b672e7a fix: postgres healthcheck, autoformat
continuous-integration/drone/push Build is passing
2023-06-12 14:26:23 +02:00
moritz f1a5a09dc7 chore: publish 2.5.1+7.3.3 release
continuous-integration/drone/push Build is passing
2023-04-18 18:39:50 +02:00
moritz 4b9c7a8c1a add auto update and timeout env
continuous-integration/drone/push Build is failing
2023-04-18 18:22:29 +02:00
moritz 29488fd16d add timeout label
continuous-integration/drone/push Build is passing
2023-04-18 13:00:05 +02:00
moritz ee332f5edd chore: publish 2.5.0+7.3.3 release
continuous-integration/drone/push Build is passing
2023-04-05 17:48:38 +02:00
moritz fce4120f09 update drone
continuous-integration/drone/push Build was killed
2023-03-13 18:35:54 +01:00
moritz cb08027aed chore: publish 2.4.1+7.3.0 release
continuous-integration/drone/push Build was killed
2023-03-13 18:02:29 +01:00
moritz 364d87db5f update README 2023-03-13 17:57:39 +01:00
moritz 1ed3618203 fix: append to local.json instead of overwriting it
local.json is automatically generated and can change due to updates,
to prevent breaking changes, only append the necssary config
using a custom entrypoint.
2023-03-13 17:28:57 +01:00
moritz 0ee47375be chore: publish 2.4.0+7.3.0 release
continuous-integration/drone/push Build is passing
2023-02-01 17:11:32 +01:00
11 changed files with 172 additions and 84 deletions
+3 -2
View File
@@ -17,8 +17,9 @@ steps:
DOMAIN: onlyoffice.swarm-test.autonomic.zone
STACK_NAME: onlyoffice
LETS_ENCRYPT_ENV: production
LOCAL_JSON_VERSION: v1
ENTRYPOINT_VERSION: v1
SECRET_DB_PASSWORD_VERSION: v1
PG_BACKUP_VERSION: v2
trigger:
branch:
- main
@@ -34,7 +35,7 @@ steps:
from_secret: drone_abra-bot_token
fork: true
repositories:
- coop-cloud/auto-recipes-catalogue-json
- toolshed/auto-recipes-catalogue-json
trigger:
event: tag
+3
View File
@@ -1,5 +1,8 @@
TYPE=onlyoffice
#TIMEOUT=300
ENABLE_AUTO_UPDATE=true
LETS_ENCRYPT_ENV=production
ENABLE_BACKUPS=true
DOMAIN=onlyoffice.example.com
SECRET_DB_PASSWORD_VERSION=v1
+32
View File
@@ -0,0 +1,32 @@
# OnlyOffice Recipe Maintenance
All contributions should be made via a pull request. This is to ensure a
certain quality and consistency, that others can rely on.
## Maintainer Responsibilities
A recipe maintainer has the following responsibilities:
- Respond to pull requests / issues within two weeks
- Make image security updates within a week
- Make image major updates every three months
In order to fullfill these responsibilities a recipe maintainer:
- Has to watch the repository (to get notifications)
- Needs to make sure renovate is configured properly
## Pull Requests
A pull request can be merged if it is approved by at least one maintainer. For
pull requests opened by a maintainer they need to be approved by another
maintainer. Even though it is okay to merge a pull request with one approval, it
is always better if all maintainers looked at the pull request and approved it.
## Become a maintainer
Everyone can apply to be a recipe maintainer:
1. Watch the repository to always get updates
2. Simply add your self to the list in the [README.md](./README.md) and open a new pull request with the change.
3. Once the pull request gets merged you will be added to the [onlyoffice maintainers team](https://git.coopcloud.tech/org/coop-cloud/teams/onlyoffice-maintainers).
4. Join the room [#cc-|-onlyoffice-maintenance:matrix.org](#cc-|-onlyoffice-maintenance:matrix.org) and chat to other maintainers.
+17 -8
View File
@@ -3,21 +3,30 @@
[![Build Status](https://drone.autonomic.zone/api/badges/coop-cloud/onlyoffice/status.svg?ref=refs/heads/main)](https://drone.autonomic.zone/coop-cloud/onlyoffice)
<!-- metadata -->
* **Maintainer**: Local-IT: [@moritz](https://git.coopcloud.tech/moritz), [@msimon](https://git.coopcloud.tech/simon), [@carla](https://git.coopcloud.tech/carla)
* **Category**: Apps
* **Status**: 3, stable
* **Image**: [`onlyoffice`](https://hub.docker.com/r/onlyoffice/documentserver/), 4, upstream
* **Healthcheck**: No
* **Healthcheck**: Yes
* **Backups**: No
* **Email**: 3
* **Email**: N/A
* **Tests**: 2
* **SSO**: No
<!-- endmetadata -->
## Basic usage
1. Set up Docker Swarm and [`abra`](https://git.autonomic.zone/coop-cloud/abra)
1. Deploy [`coop-cloud/traefik`](https://git.autonomic.zone/coop-cloud/traefik)
1. `abra app config YOURAPPDOMAIN` - be sure to change `$DOMAIN` to something that resolves to
your Docker swarm box
1. `abra app deploy YOURAPPDOMAIN`
* `abra app new onlyoffice`
* `abra app config <app-name>`
- uncomment `COMPOSE_FILE` and `SECRET_JWT_SECRET_VERSION` to enable JWT Secret
* `abra app secret generate -a <app-name>`
* `abra app deploy <app-name>`
For more, see [`docs.coopcloud.tech`](https://docs.coopcloud.tech) and [`ONLYOFFICE/Docker-DocumentServer`](https://github.com/ONLYOFFICE/Docker-DocumentServer).
[Official Onlyoffice docker compose](https://github.com/ONLYOFFICE/Docker-DocumentServer/blob/master/docker-compose.yml)
## Add custom fonts
Per default the config parameter for **GENERATE_FONT** is set to *true*, so fonts list and the fonts thumbnails are regenerated at each start. To add additional fonts you can copy them via abra to the volume `/usr/share/fonts/truetype` and restart the service:
* `abra app cp 123.net calibri-regular.ttf app:/usr/share/fonts/truetype`
* `abra app restart office.tmp.dev.local-it.cloud service app`
+2 -1
View File
@@ -1,4 +1,5 @@
export LOCAL_JSON_VERSION=v1
export ENTRYPOINT_VERSION=v1
export PG_BACKUP_VERSION=v2
prepare_shutdown () {
documentserver-prepare4shutdown.sh
+6
View File
@@ -0,0 +1,6 @@
nextcloud:
uncomment:
- compose.jwt.yml
- SECRET_JWT_SECRET_VERSION
shared_secrets:
onlyoffice_jwt: jwt_secret
+1
View File
@@ -5,6 +5,7 @@ services:
- JWT_ENABLED=true
- JWT_HEADER=Authorization
- JWT_IN_BODY=true
- JWT_SECRET_FILE=/run/secrets/jwt_secret
secrets:
- jwt_secret
+37 -18
View File
@@ -1,24 +1,27 @@
version: '3.8'
version: "3.8"
services:
app:
image: onlyoffice/documentserver:7.2.2
image: onlyoffice/documentserver:9.4.0
depends_on:
- db
- rabbitmq
stdin_open: true
networks:
- proxy
- internal
- internal
environment:
DB_TYPE: postgres
DB_HOST: db
DB_PORT: 5432
DB_NAME: onlyoffice
DB_USER: onlyoffice
DB_PWD_FILE: /run/secrets/db_password
AMQP_URI: amqp://guest:guest@rabbitmq
AUTO_ASSEMBLY_ENABLED:
AUTO_ASSEMBLY_INTERVAL:
AUTO_ASSEMBLY_STEP:
AUTO_ASSEMBLY_ENABLED:
AUTO_ASSEMBLY_INTERVAL:
AUTO_ASSEMBLY_STEP:
volumes:
- fonts:/usr/share/fonts/truetype
secrets:
- db_password
healthcheck:
@@ -28,25 +31,28 @@ services:
retries: 10
start_period: 1m
configs:
- source: local_json
target: /etc/onlyoffice/documentserver/local.json
- source: entrypoint
target: /custom-entrypoint.sh
mode: 555
entrypoint: /custom-entrypoint.sh
deploy:
update_config:
failure_action: rollback
order: start-first
labels:
- "coop-cloud.${STACK_NAME}.timeout=${TIMEOUT}"
- "traefik.enable=true"
- "traefik.docker.network=proxy"
- "traefik.swarm.network=proxy"
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=80"
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`)"
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-fwdproto"
- "traefik.http.middlewares.${STACK_NAME}-fwdproto.headers.customRequestHeaders.X-Forwarded-Proto=https"
- "coop-cloud.${STACK_NAME}.version=2.3.0+7.2.2"
- "coop-cloud.${STACK_NAME}.version=2.13.0+9.4.0"
rabbitmq:
image: rabbitmq:3.11.7
image: rabbitmq:4.3.2
networks:
- internal
healthcheck:
@@ -55,9 +61,15 @@ services:
timeout: 10s
retries: 10
start_period: 1m
db:
image: postgres:9.5
deploy:
labels:
backupbot.backup: "${ENABLE_BACKUPS:-true}"
backupbot.backup.pre-hook: "/pg_backup.sh backup"
backupbot.backup.volumes.db.path: "backup.sql"
backupbot.restore.post-hook: "/pg_backup.sh restore"
environment:
POSTGRES_DB: onlyoffice
POSTGRES_USER: onlyoffice
@@ -69,14 +81,19 @@ services:
networks:
- internal
healthcheck:
test: ["CMD", "pg_isready"]
test: ["CMD", "pg_isready", "-U", "onlyoffice"]
interval: 30s
timeout: 10s
retries: 10
start_period: 1m
configs:
- source: pg_backup
target: /pg_backup.sh
mode: 0555
volumes:
db:
fonts:
networks:
proxy:
@@ -89,8 +106,10 @@ secrets:
name: ${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION}
configs:
local_json:
name: ${STACK_NAME}_local_json_${LOCAL_JSON_VERSION}
file: local.json.tmpl
entrypoint:
name: ${STACK_NAME}_entrypoint_${ENTRYPOINT_VERSION}
file: entrypoint.sh.tmpl
template_driver: golang
pg_backup:
name: ${STACK_NAME}_pg_backup_${PG_BACKUP_VERSION}
file: pg_backup.sh
+37
View File
@@ -0,0 +1,37 @@
#!/bin/bash
set -eu
file_env() {
local var="$1"
local fileVar="${var}_FILE"
local def="${2:-}"
if [ "${!var:-}" ] && [ "${!fileVar:-}" ]; then
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
exit 1
fi
local val="$def"
if [ "${!var:-}" ]; then
val="${!var}"
elif [ "${!fileVar:-}" ]; then
val="$(< "${!fileVar}")"
fi
export "$var"="$val"
unset "$fileVar"
}
file_env "DB_PWD"
file_env "JWT_SECRET"
CONFIG=/etc/onlyoffice/documentserver/local.json
JSON_BIN=/var/www/onlyoffice/documentserver/npm/json
JSON="${JSON_BIN} -q -f ${CONFIG}"
${JSON} -I -e "if(this.services.CoAuthoring.autoAssembly===undefined)this.services.CoAuthoring.autoAssembly={};"
${JSON} -I -e "this.services.CoAuthoring.autoAssembly.enable = ${AUTO_ASSEMBLY_ENABLED}"
${JSON} -I -e "this.services.CoAuthoring.autoAssembly.interval = '${AUTO_ASSEMBLY_INTERVAL}'"
${JSON} -I -e "this.services.CoAuthoring.autoAssembly.step = '${AUTO_ASSEMBLY_STEP}'"
/app/ds/run-document-server.sh
-55
View File
@@ -1,55 +0,0 @@
{
"services": {
"CoAuthoring": {
"sql": {
"type": "{{ env "DB_TYPE" }}",
"dbHost": "{{ env "DB_HOST" }}",
"dbPort": "{{ env "DB_PORT" }}",
"dbName": "{{ env "DB_NAME" }}",
"dbUser": "{{ env "DB_USER" }}",
"dbPass": "{{ secret "db_password" }}"
},
{{ if eq (env "JWT_ENABLED") "true" }}
"token": {
"enable": {
"request": {
"inbox": true,
"outbox": true
},
"browser": true
},
"inbox": {
"header": "Authorization",
"inBody": true
},
"outbox": {
"header": "Authorization",
"inBody": true
}
},
"secret": {
"inbox": {
"string": "{{ secret "jwt_secret" }}"
},
"outbox": {
"string": "{{ secret "jwt_secret" }}"
},
"session": {
"string": "{{ secret "jwt_secret" }}"
}
},
{{ end }}
"autoAssembly" : {
"enable": {{ env "AUTO_ASSEMBLY_ENABLED" }},
"interval": "{{ env "AUTO_ASSEMBLY_INTERVAL" }}",
"step": "{{ env "AUTO_ASSEMBLY_STEP" }}"
}
}
},
"rabbitmq": {
"url": "amqp://guest:guest@rabbitmq"
},
"queue": {
"type": "rabbitmq"
}
}
+34
View File
@@ -0,0 +1,34 @@
#!/bin/bash
set -e
BACKUP_FILE='/var/lib/postgresql/data/backup.sql'
function backup {
export PGPASSWORD=$(cat /run/secrets/db_password)
pg_dump -U ${POSTGRES_USER} ${POSTGRES_DB} > $BACKUP_FILE
}
function restore {
cd /var/lib/postgresql/data/
restore_config(){
# Restore allowed connections
cat pg_hba.conf.bak > pg_hba.conf
su postgres -c 'pg_ctl reload'
}
# Don't allow any other connections than local
cp pg_hba.conf pg_hba.conf.bak
echo "local all all trust" > pg_hba.conf
su postgres -c 'pg_ctl reload'
trap restore_config EXIT INT TERM
# Recreate Database
psql -U ${POSTGRES_USER} -d postgres -c "DROP DATABASE ${POSTGRES_DB} WITH (FORCE);"
createdb -U ${POSTGRES_USER} ${POSTGRES_DB}
psql -U ${POSTGRES_USER} -d ${POSTGRES_DB} -1 -f $BACKUP_FILE
trap - EXIT INT TERM
restore_config
}
$@