generated from coop-cloud/example
Compare commits
11 Commits
use-multi-
...
2.3.0+7.2.
Author | SHA1 | Date | |
---|---|---|---|
f1c04acbf0 | |||
89ca6f28d6 | |||
a2da977365 | |||
fc5a011cee | |||
cab00b6823 | |||
40ebabd93e | |||
dc6bb69b12 | |||
5a3d27754b | |||
bc039e8bb2 | |||
655483d7f5 | |||
40438168ff |
22
.drone.yml
22
.drone.yml
@ -3,10 +3,12 @@ kind: pipeline
|
|||||||
name: deploy to swarm-test.autonomic.zone
|
name: deploy to swarm-test.autonomic.zone
|
||||||
steps:
|
steps:
|
||||||
- name: deployment
|
- name: deployment
|
||||||
image: decentral1se/stack-ssh-deploy:latest
|
image: git.coopcloud.tech/coop-cloud/stack-ssh-deploy:latest
|
||||||
settings:
|
settings:
|
||||||
host: swarm-test.autonomic.zone
|
host: swarm-test.autonomic.zone
|
||||||
stack: onlyoffice
|
stack: onlyoffice
|
||||||
|
networks:
|
||||||
|
- proxy
|
||||||
generate_secrets: true
|
generate_secrets: true
|
||||||
purge: true
|
purge: true
|
||||||
deploy_key:
|
deploy_key:
|
||||||
@ -15,16 +17,24 @@ steps:
|
|||||||
DOMAIN: onlyoffice.swarm-test.autonomic.zone
|
DOMAIN: onlyoffice.swarm-test.autonomic.zone
|
||||||
STACK_NAME: onlyoffice
|
STACK_NAME: onlyoffice
|
||||||
LETS_ENCRYPT_ENV: production
|
LETS_ENCRYPT_ENV: production
|
||||||
|
LOCAL_JSON_VERSION: v1
|
||||||
|
SECRET_DB_PASSWORD_VERSION: v1
|
||||||
trigger:
|
trigger:
|
||||||
branch:
|
branch:
|
||||||
- main
|
- main
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
name: recipe release
|
name: generate recipe catalogue
|
||||||
steps:
|
steps:
|
||||||
- name: release a new version
|
- name: release a new version
|
||||||
image: thecoopcloud/drone-abra:latest
|
image: plugins/downstream
|
||||||
settings:
|
settings:
|
||||||
command: recipe onlyoffice release
|
server: https://build.coopcloud.tech
|
||||||
deploy_key:
|
token:
|
||||||
from_secret: abra_bot_deploy_key
|
from_secret: drone_abra-bot_token
|
||||||
|
fork: true
|
||||||
|
repositories:
|
||||||
|
- coop-cloud/auto-recipes-catalogue-json
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
event: tag
|
||||||
|
12
.env.sample
12
.env.sample
@ -1,3 +1,13 @@
|
|||||||
TYPE=onlyoffice
|
TYPE=onlyoffice
|
||||||
DOMAIN=onlyoffice.example.com
|
|
||||||
LETS_ENCRYPT_ENV=production
|
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
|
||||||
|
@ -18,6 +18,6 @@
|
|||||||
|
|
||||||
1. Set up Docker Swarm and [`abra`](https://git.autonomic.zone/coop-cloud/abra)
|
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. 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
|
your Docker swarm box
|
||||||
1. `abra app YOURAPPDOMAIN deploy`
|
1. `abra app deploy YOURAPPDOMAIN`
|
5
abra.sh
5
abra.sh
@ -0,0 +1,5 @@
|
|||||||
|
export LOCAL_JSON_VERSION=v1
|
||||||
|
|
||||||
|
prepare_shutdown () {
|
||||||
|
documentserver-prepare4shutdown.sh
|
||||||
|
}
|
||||||
|
14
compose.jwt.yml
Normal file
14
compose.jwt.yml
Normal 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}
|
84
compose.yml
84
compose.yml
@ -1,20 +1,96 @@
|
|||||||
version: "3.8"
|
version: '3.8'
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
image: "onlyoffice/documentserver:6.3"
|
image: onlyoffice/documentserver:7.2.2
|
||||||
|
depends_on:
|
||||||
|
- db
|
||||||
|
- rabbitmq
|
||||||
|
stdin_open: true
|
||||||
networks:
|
networks:
|
||||||
- proxy
|
- 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:
|
deploy:
|
||||||
update_config:
|
update_config:
|
||||||
failure_action: rollback
|
failure_action: rollback
|
||||||
order: start-first
|
order: start-first
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "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}.rule=Host(`${DOMAIN}`)"
|
||||||
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
|
- "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}"
|
- "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:
|
networks:
|
||||||
proxy:
|
proxy:
|
||||||
external: true
|
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
55
local.json.tmpl
Normal 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
18
release/2.0.0+7.1.1
Normal 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
|
Reference in New Issue
Block a user