9 Commits

Author SHA1 Message Date
64a030b0db chore: publish 2.11.1+9.0.2 release
All checks were successful
continuous-integration/drone/tag Build is passing
2025-11-13 09:36:00 +01:00
bc5bf18b21 recipe patch version 2.11.1+9.0.2 2025-11-13 09:33:56 +01:00
6c8b7dd2a7 chore: publish 2.11.0+9.0.2 release
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
2025-07-03 13:39:25 +02:00
04caca0798 chore: publish 2.10.0+8.3.0 release
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
2025-02-11 18:05:58 +01:00
45d1f09317 Update .drone.yml
All checks were successful
continuous-integration/drone/push Build is passing
2025-01-08 10:09:13 -08:00
b571899521 fix drone runner
All checks were successful
continuous-integration/drone/push Build is passing
2024-11-26 22:20:26 +01:00
c1fa536df2 chore: publish 2.9.0+8.2.1 release
Some checks failed
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is failing
2024-11-26 22:01:18 +01:00
807b095441 update pg_backup.sh
Some checks failed
continuous-integration/drone/push Build is failing
2024-10-22 21:33:47 +02:00
5f3dcb4256 update backupbot labels
Some checks failed
continuous-integration/drone/push Build is failing
2024-10-22 20:17:48 +02:00
7 changed files with 62 additions and 7 deletions

View File

@ -19,6 +19,7 @@ steps:
LETS_ENCRYPT_ENV: production
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

View File

@ -2,6 +2,7 @@ TYPE=onlyoffice
TIMEOUT=300
ENABLE_AUTO_UPDATE=true
LETS_ENCRYPT_ENV=production
ENABLE_BACKUPS=true
DOMAIN=onlyoffice.example.com
SECRET_DB_PASSWORD_VERSION=v1

View File

@ -25,3 +25,8 @@
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`

View File

@ -1,4 +1,5 @@
export ENTRYPOINT_VERSION=v1
export PG_BACKUP_VERSION=v2
prepare_shutdown () {
documentserver-prepare4shutdown.sh

View File

@ -1,7 +1,7 @@
version: '3.8'
services:
app:
image: onlyoffice/documentserver:8.1.1
image: onlyoffice/documentserver:9.0.2
depends_on:
- db
- rabbitmq
@ -20,6 +20,8 @@ services:
AUTO_ASSEMBLY_ENABLED:
AUTO_ASSEMBLY_INTERVAL:
AUTO_ASSEMBLY_STEP:
volumes:
- fonts:/usr/share/fonts/truetype
secrets:
- db_password
healthcheck:
@ -47,10 +49,10 @@ services:
- "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.8.0+8.1.1"
- "coop-cloud.${STACK_NAME}.version=2.11.1+9.0.2"
rabbitmq:
image: rabbitmq:3.13.6
image: rabbitmq:4.1.1
networks:
- internal
healthcheck:
@ -64,9 +66,10 @@ services:
image: postgres:9.5
deploy:
labels:
backupbot.backup: "true"
backupbot.backup.pre-hook: "PGPASSWORD=$$(cat /run/secrets/db_password) pg_dump -U $${POSTGRES_USER} $${POSTGRES_DB} > /var/lib/postgresql/data/backup.sql"
backupbot.backup.post-hook: "rm -rf /var/lib/postgresql/data/backup.sql"
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
@ -83,9 +86,14 @@ services:
timeout: 10s
retries: 10
start_period: 1m
configs:
- source: pg_backup
target: /pg_backup.sh
mode: 0555
volumes:
db:
fonts:
networks:
@ -104,3 +112,6 @@ configs:
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

34
pg_backup.sh Normal file
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
}
$@

2
release/2.11.1+9.0.2 Normal file
View File

@ -0,0 +1,2 @@
This patch upgrade adds a fonts volume
Custom fonts can be copied there as described in the readme