|
| 1 | +# quaive.app.libreoffice docker-compose file |
| 2 | +# ========================================== |
| 3 | + |
| 4 | +# Have Docker installed: |
| 5 | +# https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository |
| 6 | +# |
| 7 | +# https://stackoverflow.com/questions/48957195/how-to-fix-docker-got-permission-denied-issue |
| 8 | +# $ sudo groupadd docker |
| 9 | +# $ sudo usermod -aG docker $USER |
| 10 | + |
| 11 | +# Run: |
| 12 | +# docker compose up |
| 13 | +# or: |
| 14 | +# docker compose start |
| 15 | + |
| 16 | +# Using a .env file |
| 17 | +# ----------------- |
| 18 | +# |
| 19 | +# NOTE: Never check a `.env` file in into a repository! |
| 20 | +# |
| 21 | +# Use a .env file to set some parameters for production use. |
| 22 | +# The available environment variables are: |
| 23 | +# SERVER_PORT: The port you want to expose the LibreOffice / Collabora |
| 24 | +# server to the Docker host. |
| 25 | +# Default: `9980`. |
| 26 | +# ADMIN_USER: The username for the LibreOffice / Collabora admin interface. |
| 27 | +# Default: `admin` |
| 28 | +# ADMIN_PASS: The password for the LibreOffice / Collabora admin interface. |
| 29 | +# Default: `admin` |
| 30 | +# SSL_TERMINATION: Enable SSL termination by the LibreOffice / Collabora server |
| 31 | +# when proxied by another SSL proxy, like nginx. Should be set |
| 32 | +# to `true` in production environments. |
| 33 | +# Default: `false`. |
| 34 | +# |
| 35 | +# This is an example `.env` file: |
| 36 | +# ``` |
| 37 | +# ADMIN_USER=admin |
| 38 | +# ADMIN_PASS=supersecret |
| 39 | +# SSL_TERMINATION=true |
| 40 | +# SERVER_PORT=9980 |
| 41 | +# ``` |
| 42 | + |
| 43 | +# Service URLs |
| 44 | +# ------------ |
| 45 | +# |
| 46 | +# https://host.docker.internal:9980/hosting/discovery |
| 47 | +# https://host.docker.internal:9980/hosting/capabilities |
| 48 | +# https://host.docker.internal:9980/browser/dist/admin/admin.html |
| 49 | + |
| 50 | +# References |
| 51 | +# ---------- |
| 52 | +# |
| 53 | +# - https://hub.docker.com/r/collabora/code/tags |
| 54 | +# - https://sdk.collaboraonline.com/docs/installation/CODE_Docker_image.html |
| 55 | +# - https://sdk.collaboraonline.com/docs/installation/Configuration.html |
| 56 | + |
| 57 | +services: |
| 58 | + |
| 59 | + collabora: |
| 60 | + image: collabora/code:latest |
| 61 | + restart: no |
| 62 | + container_name: collabora-server |
| 63 | + volumes: |
| 64 | + - ./coolwsd.xml/:/etc/coolwsd/coolwsd.xml:ro |
| 65 | + expose: |
| 66 | + - 9980 |
| 67 | + ports: |
| 68 | + - "${SERVER_PORT:-9980}:9980" |
| 69 | + extra_hosts: |
| 70 | + # For DEVELOPMENT |
| 71 | + # host.docker.internal points to the IP of the host and can be used by |
| 72 | + # other docker containers, to reach collabora via the host. This is |
| 73 | + # necessary for Collabora to be able to make calls to Plone. |
| 74 | + - "host.docker.internal:host-gateway" |
| 75 | + environment: |
| 76 | + - username=${ADMIN_USER:-admin} |
| 77 | + - password=${ADMIN_PASS:-admin} |
| 78 | + - extra_params=--o:ssl.enable=false --o:ssl.termination=${SSL_TERMINATION:-false} |
| 79 | + |
| 80 | + # This demo nginx is configured to listen on host.docker.internal:80 |
| 81 | + # and to proxy /collabora/* to the collabora server. |
| 82 | + # This enables accessing collabora on the same hostname and port as Plone, |
| 83 | + # which means the browser will not activate CORS protections. |
| 84 | + nginx: |
| 85 | + image: nginx:1.21 |
| 86 | + restart: no |
| 87 | + container_name: collabora-nginx |
| 88 | + volumes: |
| 89 | + - ./nginx/:/etc/nginx/:ro |
| 90 | + ports: |
| 91 | + - 80:80 |
0 commit comments