選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
Robin Thoni d9645aa127 fixed volume for new nextcloud installations 4年前
collabora Added Collabora 4年前
nextcloud Ignored idea files 4年前
postgresql Moved to postgres 11 (official, no backup) 4年前
.gitignore Ignore override test file 4年前
README.md README 4年前
docker-compose.yml fixed volume for new nextcloud installations 4年前
env Added TZ env variable 4年前
env_collabora typo 4年前

README.md

Abstract

This docker-compose allows to easily run a Nextcloud instance with Collabora.

Prerequisites for production use

  • Domain records:
    • One record for Nextcloud (eg: nextcloud.example.com)
    • One record for Collabora (eg: collabora.example.com)
    • BOTH records must be (resolvable AND accessible) from (Nextcloud container AND Collabora container AND final users)
  • HTTPS for Nextcloud and Collabora (eg: Let’s Encrypt)
  • Reverse proxy for SSL termination

Installation

Tweak files

  • env

    • Set TZ
    • The timezone to be used in the container (See List_of_tz_database_time_zones)
    • Example: Europe/Paris
    • Generate secure password for POSTGRES_PASSWORD
    • Password to be set (and used) for the Nextcloud database user. It will only be set when postgres files (./data/postgres/data/...) are created. Any further change won’t update it.
    • Example: passwordsgenerator.net
    • Generate secure password for NEXTCLOUD_ADMIN_PASSWORD
    • Password to be set for Nextcloud root user. It will only be set when Nextcloud will install itself. Any further change won’t update it.
    • Example: passwordsgenerator.net
  • env_collabora

  • docker-compose.yml

    • Set restart policies
    • Uncomment restart lines to allow docker to automatically start the containers on reboot.

Reverse proxy

/etc/apache2/sites-available/nextcloud.example.com.conf:

<IfModule mod_ssl.c>
    <VirtualHost *:80>
        ServerName nextcloud.example.com
        Redirect permanent / https://nextcloud.example.com/
    </VirtualHost>
    <VirtualHost *:443>
        Include sites-available/nextcloud.example.com.include

        SSLEngine on
        SSLCertificateFile /etc/letsencrypt/live/example.com/cert.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem
        SSLCertificateChainFile /etc/letsencrypt/live/example.com/chain.pem
    </VirtualHost>
</IfModule>
<IfModule !mod_ssl.c>
    <VirtualHost *:80>
        Include sites-available/nextcloud.example.com.include
    </VirtualHost>
</IfModule>

/etc/apache2/sites-available/nextcloud.example.com.include:

ServerName nextcloud.example.com
ServerAlias nextcloud.example.com
ProxyPreserveHost On
ProxyRequests off
ProxyPass / http://127.0.0.1:35081/
ProxyPassReverse / http://127.0.0.1:35081/

/etc/apache2/sites-available/collabora.example.com.conf:

<IfModule mod_ssl.c>
    <VirtualHost *:80>
        ServerName collabora.example.com
        Redirect permanent / https://collabora.example.com/
    </VirtualHost>
    <VirtualHost *:443>
        Include sites-available/collabora.example.com.include

        SSLEngine on
        SSLCertificateFile /etc/letsencrypt/live/example.com/cert.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem
        SSLCertificateChainFile /etc/letsencrypt/live/example.com/chain.pem
    </VirtualHost>
</IfModule>
<IfModule !mod_ssl.c>
    <VirtualHost *:80>
        Include sites-available/collabora.example.com.include
    </VirtualHost>
</IfModule>

/etc/apache2/sites-available/collabora.example.com.include:

ServerName collabora.example.com
ServerAlias collabora.example.com
ProxyPreserveHost On
ProxyRequests off

AllowEncodedSlashes NoDecode

# Order of ProxyPass matters

ProxyPassMatch "/lool/(.*)/ws$" ws://127.0.0.1:35082/lool/$1/ws nocanon
ProxyPass   /lool/adminws ws://127.0.0.1:35082/lool/adminws

ProxyPass / http://127.0.0.1:35082/
ProxyPassReverse / http://127.0.0.1:35082/

Run

docker-compose up --build -d

Install Nextcloud integration app

  • Login on Nextcloud with root account
  • Go to Upper right account picture / Apps / Upper right search icon
  • Type Collabora Online
  • Click Download and enable
  • Wait for installation to finish
  • Go to Upper right account picture / Settings / Lower left Collabora Online
  • Set your Collabora URL (eg: https://collabora.example.com)
  • Click Apply
  • Go back to Files
  • Click +
  • Click New Document
  • Type a name
  • Validate
  • Click the newly created document
  • Enjoy