1 Commits

Author SHA1 Message Date
2891d7c898 chore: publish 2.6.0+7.4.0 release 2023-07-25 12:08:03 +02:00
8 changed files with 12 additions and 79 deletions

View File

@ -19,7 +19,6 @@ steps:
LETS_ENCRYPT_ENV: production
ENTRYPOINT_VERSION: v1
SECRET_DB_PASSWORD_VERSION: v1
PG_BACKUP_VERSION: v2
trigger:
branch:
- main
@ -35,7 +34,7 @@ steps:
from_secret: drone_abra-bot_token
fork: true
repositories:
- toolshed/auto-recipes-catalogue-json
- coop-cloud/auto-recipes-catalogue-json
trigger:
event: tag

View File

@ -2,7 +2,6 @@ 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,8 +25,3 @@
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,5 +1,4 @@
export ENTRYPOINT_VERSION=v1
export PG_BACKUP_VERSION=v2
prepare_shutdown () {
documentserver-prepare4shutdown.sh

View File

@ -1,6 +0,0 @@
nextcloud:
uncomment:
- compose.jwt.yml
- SECRET_JWT_SECRET_VERSION
shared_secrets:
onlyoffice_jwt: jwt_secret

View File

@ -1,14 +1,14 @@
version: '3.8'
services:
app:
image: onlyoffice/documentserver:9.0.2
image: onlyoffice/documentserver:7.4.0
depends_on:
- db
- rabbitmq
stdin_open: true
networks:
- proxy
- internal
- internal
environment:
DB_TYPE: postgres
DB_HOST: db
@ -17,15 +17,13 @@ services:
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:
volumes:
- fonts:/usr/share/fonts/truetype
AUTO_ASSEMBLY_ENABLED:
AUTO_ASSEMBLY_INTERVAL:
AUTO_ASSEMBLY_STEP:
secrets:
- db_password
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost/welcome" ]
test: ["CMD", "curl", "-f", "http://localhost/welcome"]
interval: 30s
timeout: 10s
retries: 10
@ -49,10 +47,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.11.1+9.0.2"
- "coop-cloud.${STACK_NAME}.version=2.6.0+7.4.0"
rabbitmq:
image: rabbitmq:4.1.1
image: rabbitmq:3.12.2
networks:
- internal
healthcheck:
@ -61,15 +59,9 @@ 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
@ -81,27 +73,20 @@ services:
networks:
- internal
healthcheck:
test: [ "CMD", "pg_isready", "-U", "onlyoffice" ]
test: ["CMD", "pg_isready"]
interval: 30s
timeout: 10s
retries: 10
start_period: 1m
configs:
- source: pg_backup
target: /pg_backup.sh
mode: 0555
volumes:
db:
fonts:
networks:
proxy:
external: true
internal:
secrets:
db_password:
external: true
@ -112,6 +97,4 @@ 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

View File

@ -1,34 +0,0 @@
#!/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
}
$@

View File

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