11 Commits

Author SHA1 Message Date
f1c04acbf0 chore: publish 2.3.0+7.2.2 release
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-26 22:01:34 +01:00
89ca6f28d6 chore: publish 2.2.0+7.2.1 release
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-26 15:23:50 +01:00
a2da977365 chore: publish 2.1.0+7.2.0 release
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-26 14:53:21 +01:00
3wc
fc5a011cee Switch to self-hosted stack-ssh-deploy image [mass update]
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-21 11:49:56 -08:00
3wc
cab00b6823 Add drone configs / secrets [mass update]
All checks were successful
continuous-integration/drone/push Build is passing
2023-01-20 21:32:06 -08:00
3wc
40ebabd93e Fix CI by adding networks: [mass update]
Some checks failed
continuous-integration/drone/push Build is failing
2023-01-20 11:58:41 -08:00
3wc
dc6bb69b12 Automatically generate catalogue on release [mass update]
Some checks failed
continuous-integration/drone/push Build is failing
Re: coop-cloud/recipes-catalogue-json#4
2023-01-20 10:27:11 -08:00
3wc
5a3d27754b Update abra syntax in examples (finally) [mass update]
Some checks failed
continuous-integration/drone/push Build is failing
2023-01-19 16:02:28 -08:00
bc039e8bb2 fix release notes
Some checks failed
continuous-integration/drone/push Build is failing
2022-08-09 10:57:29 +02:00
655483d7f5 chore: publish 2.0.0+7.1.1 release
Some checks failed
continuous-integration/drone/push Build is failing
2022-08-09 10:49:45 +02:00
40438168ff align with the upstream docker-compose (#5)
Some checks failed
continuous-integration/drone/push Build is failing
This upgrades onlyoffice to v7, adds a seperate postgresdb + rabbitmq and adds env variables for the forcesave option.

Co-authored-by: Philipp Rothmann <philipprothmann@posteo.de>
Reviewed-on: #5
2022-08-09 08:46:01 +00:00
8 changed files with 201 additions and 13 deletions

View File

@ -3,10 +3,12 @@ kind: pipeline
name: deploy to swarm-test.autonomic.zone
steps:
- name: deployment
image: decentral1se/stack-ssh-deploy:latest
image: git.coopcloud.tech/coop-cloud/stack-ssh-deploy:latest
settings:
host: swarm-test.autonomic.zone
stack: onlyoffice
networks:
- proxy
generate_secrets: true
purge: true
deploy_key:
@ -15,16 +17,24 @@ steps:
DOMAIN: onlyoffice.swarm-test.autonomic.zone
STACK_NAME: onlyoffice
LETS_ENCRYPT_ENV: production
LOCAL_JSON_VERSION: v1
SECRET_DB_PASSWORD_VERSION: v1
trigger:
branch:
- main
---
kind: pipeline
name: recipe release
name: generate recipe catalogue
steps:
- name: release a new version
image: thecoopcloud/drone-abra:latest
image: plugins/downstream
settings:
command: recipe onlyoffice release
deploy_key:
from_secret: abra_bot_deploy_key
server: https://build.coopcloud.tech
token:
from_secret: drone_abra-bot_token
fork: true
repositories:
- coop-cloud/auto-recipes-catalogue-json
trigger:
event: tag

View File

@ -1,3 +1,13 @@
TYPE=onlyoffice
DOMAIN=onlyoffice.example.com
LETS_ENCRYPT_ENV=production
DOMAIN=onlyoffice.example.com
SECRET_DB_PASSWORD_VERSION=v1
AUTO_ASSEMBLY_ENABLED=false
AUTO_ASSEMBLY_INTERVAL=5min
AUTO_ASSEMBLY_STEP=1min
#
# Uncomment to enable JWT Secret
# COMPOSE_FILE=compose.yml:compose.jwt.yml
# SECRET_JWT_SECRET_VERSION=v1

View File

@ -18,6 +18,6 @@
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 YOURAPPDOMAIN config` - be sure to change `$DOMAIN` to something that resolves to
1. `abra app config YOURAPPDOMAIN` - be sure to change `$DOMAIN` to something that resolves to
your Docker swarm box
1. `abra app YOURAPPDOMAIN deploy`
1. `abra app deploy YOURAPPDOMAIN`

View File

@ -0,0 +1,5 @@
export LOCAL_JSON_VERSION=v1
prepare_shutdown () {
documentserver-prepare4shutdown.sh
}

14
compose.jwt.yml Normal file
View File

@ -0,0 +1,14 @@
version: '3.8'
services:
app:
environment:
- JWT_ENABLED=true
- JWT_HEADER=Authorization
- JWT_IN_BODY=true
secrets:
- jwt_secret
secrets:
jwt_secret:
external: true
name: ${STACK_NAME}_jwt_secret_${SECRET_JWT_SECRET_VERSION}

View File

@ -1,20 +1,96 @@
version: "3.8"
version: '3.8'
services:
app:
image: "onlyoffice/documentserver:6.3"
image: onlyoffice/documentserver:7.2.2
depends_on:
- db
- rabbitmq
stdin_open: true
networks:
- proxy
- internal
environment:
DB_TYPE: postgres
DB_HOST: db
DB_PORT: 5432
DB_NAME: onlyoffice
DB_USER: onlyoffice
AMQP_URI: amqp://guest:guest@rabbitmq
AUTO_ASSEMBLY_ENABLED:
AUTO_ASSEMBLY_INTERVAL:
AUTO_ASSEMBLY_STEP:
secrets:
- db_password
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/welcome"]
interval: 30s
timeout: 10s
retries: 10
start_period: 1m
configs:
- source: local_json
target: /etc/onlyoffice/documentserver/local.json
deploy:
update_config:
failure_action: rollback
order: start-first
labels:
- "traefik.enable=true"
- "traefik.docker.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.services.${STACK_NAME}.loadbalancer.server.port=80"
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
- coop-cloud.${STACK_NAME}.app.version=6.3-
- "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"
rabbitmq:
image: rabbitmq:3.11.7
networks:
- internal
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 30s
timeout: 10s
retries: 10
start_period: 1m
db:
image: postgres:9.5
environment:
POSTGRES_DB: onlyoffice
POSTGRES_USER: onlyoffice
POSTGRES_PASSWORD_FILE: /run/secrets/db_password
volumes:
- db:/var/lib/postgresql/data
secrets:
- db_password
networks:
- internal
healthcheck:
test: ["CMD", "pg_isready"]
interval: 30s
timeout: 10s
retries: 10
start_period: 1m
volumes:
db:
networks:
proxy:
external: true
internal:
secrets:
db_password:
external: true
name: ${STACK_NAME}_db_password_${SECRET_DB_PASSWORD_VERSION}
configs:
local_json:
name: ${STACK_NAME}_local_json_${LOCAL_JSON_VERSION}
file: local.json.tmpl
template_driver: golang

55
local.json.tmpl Normal file
View File

@ -0,0 +1,55 @@
{
"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"
}
}

18
release/2.0.0+7.1.1 Normal file
View File

@ -0,0 +1,18 @@
This release upgrades onlyoffice to v7, adds a seperate postgresdb + rabbitmq
and adds env variables for the forcesave option.
Please add this to your .env file:
```
SECRET_DB_PASSWORD_VERSION=v1
AUTO_ASSEMBLY_ENABLED=false
AUTO_ASSEMBLY_INTERVAL=5min
AUTO_ASSEMBLY_STEP=1min
```
If you like to use the forcesave option, set `AUTO_ASSEMBLY_ENABLED=true`.
Don't forget to generate or insert a new db secret: `abra app secret generate onlyoffice.example.org db_password v1`
@yksflip