Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Verified Commit d2887b65 authored by Nicolas Gelot's avatar Nicolas Gelot
Browse files

feat: add collabora to read office document

parent b048d8b5
Loading
Loading
Loading
Loading
Loading
+47 −0
Original line number Diff line number Diff line
server {
    listen 9980;
    listen [::]:9980;
    server_name ${DOMAIN};

    # static files
    location ^~ /browser {
      proxy_pass http://${COLLABORA_ADDR};
      proxy_set_header Host $host;
    }
   
    # WOPI discovery URL
    location ^~ /hosting/discovery {
      proxy_pass http://${COLLABORA_ADDR};
      proxy_set_header Host $host;
    }
   
    # Capabilities
    location ^~ /hosting/capabilities {
      proxy_pass http://${COLLABORA_ADDR};
      proxy_set_header Host $host;
    }
   
    # main websocket
    location ~ ^/cool/(.*)/ws$ {
      proxy_pass http://${COLLABORA_ADDR};
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection "Upgrade";
      proxy_set_header Host $host;
      proxy_read_timeout 36000s;
    }
   
    # download, presentation and image upload
    location ~ ^/(c|l)ool {
      proxy_pass http://${COLLABORA_ADDR};
      proxy_set_header Host $host;
    }
   
    # Admin Console websocket
    location ^~ /cool/adminws {
      proxy_pass http://${COLLABORA_ADDR};
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection "Upgrade";
      proxy_set_header Host $host;
      proxy_read_timeout 36000s;
    }
}
+2 −0
Original line number Diff line number Diff line
@@ -50,6 +50,8 @@ services:
      target: nginx
    ports:
      - "8000:80"
      - "9980:9980"

    depends_on:
      - nextcloud

+16 −0
Original line number Diff line number Diff line
@@ -39,10 +39,26 @@ services:
        constraints:
          - node.role == worker

  collabora:
    image: collabora/code:25.04.6.1.1
    environment:
      aliasgroup1: "https://${DOMAIN}"
      extra_params: "--o:ssl.enable=false"
      DONT_GEN_SSL_CERT: "true"
    security_opt:
      - no-new-privileges:true
    user: "1001:1001"
    cap_drop:
      - ALL
    cap_add:
      - SYS_CHROOT
      - SYS_ADMIN

  nginx:
    image: ${NGINX_DOCKER_IMG}
    environment:
      NEXTCLOUD_ADDR: ${NEXTCLOUD_ADDR:-nextcloud:9000}
      COLLABORA_ADDR: ${COLLABORA_ADDR:-collabora:9980}
      DOMAIN: ${DOMAIN}
    volumes:
      - nextcloud-data:/var/www/html/data
+1 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ occ app:enable oidc_login
occ app:enable notes
occ app:enable tasks
occ app:enable sentry
occ app:enable richdocuments

occ app:disable firstrunwizard
occ app:disable logreader
Loading