Shortened variable prefix; Fixed Nextcloud integration
This commit is contained in:
parent
c4f78b015d
commit
79d28b6b53
5 changed files with 21 additions and 23 deletions
15
README.md
15
README.md
|
@ -26,14 +26,13 @@ Requirements
|
||||||
Role Variables
|
Role Variables
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
| Variable | Description | Default |
|
| Variable | Description | Default |
|
||||||
| --------------------------- | ------------------------------------------------------------------------------- | ------------------ |
|
| --------------------------- | ------------------------------------------------------------------------------- | ------------------ |
|
||||||
| docker_user | The user who is going to manage/run the Docker Compose services | deploy |
|
| docker_user | The user who is going to manage/run the Docker Compose services | deploy |
|
||||||
| onlyoffice_document_server_virtual_host | The host under which ONLYOFFICE is available from the outside (e.g. docsrv.example.org) | localhost |
|
| onlyoffice_virtual_host | The host under which ONLYOFFICE is available from the outside (e.g. docsrv.example.org) | localhost |
|
||||||
| onlyoffice_document_server_http_port | HTTP port | 80 |
|
| onlyoffice_allow_origin_list | Satisfy [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) [Access-Control-Allow-Origin](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin): <br>A comma-separated list of hosts incl. scheme, e.g. https://nextcloud.example.tld | localhost |
|
||||||
| onlyoffice_document_server_https_port | HTTPS port | 443 |
|
| onlyoffice_jwt_enabled | Whether JWT authentication should be used | "false" |
|
||||||
| onlyoffice_document_server_jwt_enabled | Whether JWT authentication should be used | "false" |
|
| onlyoffice_jwt_secret | A shared secret used by ONLYOFFICE and the integrator apps, e.g. Nextcloud | "secret" |
|
||||||
| onlyoffice_document_server_jwt_secret | A shared secret used by ONLYOFFICE and the integrator apps, e.g. Nextcloud | "secret" |
|
|
||||||
|
|
||||||
|
|
||||||
Dependencies
|
Dependencies
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
---
|
---
|
||||||
# defaults file for ONLYOFFICE Document Server
|
# defaults file for ONLYOFFICE Document Server
|
||||||
docker_user: deploy
|
docker_user: deploy
|
||||||
onlyoffice_document_server_http_port: 80
|
onlyoffice_virtual_host: localhost
|
||||||
onlyoffice_document_server_https_port: 443
|
|
||||||
onlyoffice_document_server_virtual_host: localhost
|
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
- name: "Test whether the service is healthy from the public internet"
|
- name: "Test whether the service is healthy from the public internet"
|
||||||
become: false
|
become: false
|
||||||
uri:
|
uri:
|
||||||
url: https://{{ onlyoffice_document_server_virtual_host }}
|
url: https://{{ onlyoffice_virtual_host }}
|
||||||
timeout: 300
|
timeout: 300
|
||||||
validate_certs: no
|
validate_certs: no
|
||||||
register: url_check
|
register: url_check
|
||||||
|
|
|
@ -5,9 +5,6 @@ services:
|
||||||
container_name: onlyoffice-document-server
|
container_name: onlyoffice-document-server
|
||||||
image: onlyoffice/documentserver
|
image: onlyoffice/documentserver
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
|
||||||
- "{{ onlyoffice_document_server_http_port }}:80"
|
|
||||||
- "{{ onlyoffice_document_server_https_port }}:443"
|
|
||||||
environment:
|
environment:
|
||||||
- JWT_ENABLED
|
- JWT_ENABLED
|
||||||
- JWT_SECRET
|
- JWT_SECRET
|
||||||
|
@ -17,11 +14,15 @@ services:
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.docker.network=traefik_public"
|
- "traefik.docker.network=traefik_public"
|
||||||
- "traefik.http.routers.onlyoffice-document-server.rule=Host(`{{ onlyoffice_document_server_virtual_host }}`)"
|
- "traefik.http.routers.onlyoffice.rule=Host(`{{ onlyoffice_virtual_host }}`)"
|
||||||
- "traefik.port=8282"
|
- "traefik.http.routers.onlyoffice.entrypoints=websecure"
|
||||||
- "traefik.http.routers.onlyoffice-document-server.entrypoints=websecure"
|
- "traefik.http.routers.onlyoffice.tls=true"
|
||||||
- "traefik.http.routers.onlyoffice-document-server.tls=true"
|
- "traefik.http.routers.onlyoffice.tls.certresolver=defaultresolver"
|
||||||
- "traefik.http.routers.onlyoffice-document-server.tls.certresolver=defaultresolver"
|
{% if onlyoffice_allow_origin_list %}
|
||||||
|
- "traefik.http.middlewares.onlyoffice-headers.headers.accesscontrolalloworiginlist={{ onlyoffice_allow_origin_list }}"
|
||||||
|
{% endif %}
|
||||||
|
- "traefik.http.middlewares.onlyoffice-headers.headers.customrequestheaders.X-Forwarded-Proto=https"
|
||||||
|
- "traefik.http.routers.onlyoffice.middlewares=onlyoffice-headers"
|
||||||
networks:
|
networks:
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
JWT_ENABLED={{ onlyoffice_document_server_jwt_enabled | default('false')}}
|
JWT_ENABLED={{ onlyoffice_jwt_enabled | default('false')}}
|
||||||
JWT_SECRET={{ onlyoffice_document_server_jwt_secret | default('secret') }}
|
JWT_SECRET={{ onlyoffice_jwt_secret | default('secret') }}
|
||||||
JWT_HEADER={{ onlyoffice_document_server_jwt_header | default('Authorization') }}
|
JWT_HEADER={{ onlyoffice_jwt_header | default('Authorization') }}
|
Loading…
Add table
Reference in a new issue