From 6a477d7686865c7abfcda0e4dbf075d835d3718d Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Mon, 19 Jun 2023 20:38:20 +0200 Subject: [PATCH] Update to Seafile-CE 10.0.1 --- .env.dist | 4 +--- README.md | 10 +++++++--- docker-compose.yml | 4 ++-- image/seafile/Dockerfile | 9 +++++---- image/seafile/scripts/seafile-entrypoint.sh | 7 +------ sample-configs/seafile-nginx.conf | 14 ++++++++++++++ 6 files changed, 30 insertions(+), 18 deletions(-) diff --git a/.env.dist b/.env.dist index 3013114..c26c5da 100644 --- a/.env.dist +++ b/.env.dist @@ -11,7 +11,7 @@ MYSQL_USER_PASSWORD=seafilesecret MYSQL_PORT=3306 # General Seafile Settings -SEAFILE_VERSION=9.0.10 +SEAFILE_VERSION=10.0.1 SEAFILE_NAME=Seafile SEAFILE_ADDRESS=seafile.localhost SEAFILE_ADMIN=admin@seafile.local @@ -22,8 +22,6 @@ SEAHUB_PORT=8000 SEAFILE_PORT=8082 SEAFDAV_PORT=8080 -# Sprinternet specific customizations (SSO). -SPRINTERNET_CUSTOMIZATIONS=false LDAP_IGNORE_CERT_CHECK=true # All other settings can be edited in the conf dir (/seafile/conf) once the container started up! diff --git a/README.md b/README.md index 698fb7d..0d80f2d 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ ## About -- This repository contains the sources that are used to build the `h44z/seafile-ce` docker image. Currently tested with Seafile CE 9.0.10. +- This repository contains the sources that are used to build the `h44z/seafile-ce` docker image. Currently tested with Seafile CE 10.0.1. - The main goal of this image is to provide a really simple and clean docker image for Seafile Community Edition. The official docker image is quite complex and hard to extend or modify. This image instead provides a simple way to deploy a standardized Seafile instance with Docker. @@ -42,7 +42,7 @@ make server ``` -## Running Seafile 9.x.x with docker-compose +## Running Seafile 10.x.x with docker-compose Make sure that you have installed Docker Compose with version 1.21.0 or higher. Setting up Seafile is really easy and can be (or should be) done via Docker Compose. All important data is stored under `/seafile` so you should be mounting a volume there (recommended), as shown in the example configurations, or at the respective subdirectories. The first step is to create a `.env` file by copying the provided .env.dist file: @@ -79,6 +79,10 @@ mkdir -p data/onlyoffice cp sample-configs/local.json data/onlyoffice/local.conf ``` +## Upgrading from Seafile 9.x.x +Simply use the newer 10.x.x Docker image and enable the notification server in your seafile.conf. +To enable the notification server, follow the [official documentation](https://manual.seafile.com/config/seafile-conf/#notification-server-configuration). + ## Upgrading from Seafile 8.x.x Simply use the newer 9.x.x Docker image. @@ -103,7 +107,7 @@ Take a look at .env.dist for all available environment variables. Copy `.env.dis ### Manual configuration of Seafile After the Seafile container has been started at least once, the mounted volume for the `/seafile` directory should contain a folder `conf`. Take a look at the official manual to check out which settings can be changed. -HINT: After the initial setup (first run), changing the environment variables in .env does not reflect to the configuration files! +**HINT**: After the initial setup (first run), changing the environment variables in .env does not reflect to the configuration files! ### Troubleshooting diff --git a/docker-compose.yml b/docker-compose.yml index 02b6185..8229e4e 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ version: '3.6' services: db: - image: mariadb:10.5 + image: mariadb:10.11 container_name: seafile-mysql restart: unless-stopped environment: @@ -30,7 +30,7 @@ services: max-file: "3" seafile: - image: h44z/seafile-ce:${SEAFILE_VERSION:-9.0.10} + image: h44z/seafile-ce:${SEAFILE_VERSION:-10.0.1} container_name: seafile restart: unless-stopped ports: diff --git a/image/seafile/Dockerfile b/image/seafile/Dockerfile index 5b37131..2d182f2 100644 --- a/image/seafile/Dockerfile +++ b/image/seafile/Dockerfile @@ -8,20 +8,21 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y \ procps default-libmysqlclient-dev libjpeg-dev zlib1g-dev python3 python3-setuptools python3-pip \ ldap-utils curl sqlite3 tzdata locales memcached libmemcached-dev libffi-dev && \ pip3 install --timeout=3600 \ - django==3.2.* future mysqlclient pymysql Pillow pylibmc pyjwt==1.7.1 captcha jinja2 sqlalchemy==1.4.3 \ - django-pylibmc django-simple-captcha python3-ldap pycryptodome==3.12.0 cffi==1.14.0 && \ + django==3.2.* future==0.18.* mysqlclient==2.1.* \ + pymysql pillow==9.3.* pylibmc captcha==0.4 markupsafe==2.0.1 jinja2 sqlalchemy==1.4.3 \ + psd-tools django-pylibmc django_simple_captcha==0.5.* djangosaml2==1.5.* pysaml2==7.2.* pycryptodome==3.16.* cffi==1.15.1 lxml && \ sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen && \ ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \ apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* -ENV DOCKERIZE_VERSION v0.6.1 +ENV DOCKERIZE_VERSION v0.7.0 RUN curl -L https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz | tar -xz -C /usr/local/bin WORKDIR /opt/seafile # build-time arguments, use them in docker build with --build-arg switch to build different version -ARG SEAFILE_VERSION=9.0.10 +ARG SEAFILE_VERSION=10.0.1 ENV SEAFILE_VERSION=${SEAFILE_VERSION} diff --git a/image/seafile/scripts/seafile-entrypoint.sh b/image/seafile/scripts/seafile-entrypoint.sh index affd954..d213ba1 100755 --- a/image/seafile/scripts/seafile-entrypoint.sh +++ b/image/seafile/scripts/seafile-entrypoint.sh @@ -151,12 +151,6 @@ setup_sqlite() { } special_customizations() { - if [ "${SPRINTERNET_CUSTOMIZATIONS:-false}" = "true" ]; then - echo Patching files... - sed -i "/{% block main_content %}/a " ${INSTALLPATH}/seahub/seahub/templates/registration/login.html - sed -i '/<\/div>/a ' ${INSTALLPATH}/seahub/seahub/templates/registration/logout.html - echo Patching completed... - fi if [ "${LDAP_IGNORE_CERT_CHECK:-false}" = "true" ]; then echo TLS_REQCERT allow >> /etc/ldap/ldap.conf; fi @@ -357,6 +351,7 @@ full_update(){ update $i || exit echo "Finished update $i" fi + echo "Major upgrade finished, make sure to update configurations according to the upgrade manual: https://manual.seafile.com/upgrade/upgrade/" done # When all the major upgrades are done, perform a minor upgrade. # After performing a major upgrade, no minor update is needed. diff --git a/sample-configs/seafile-nginx.conf b/sample-configs/seafile-nginx.conf index 3356d64..04f6e6f 100644 --- a/sample-configs/seafile-nginx.conf +++ b/sample-configs/seafile-nginx.conf @@ -104,6 +104,20 @@ server { error_log /var/log/nginx/onlyoffice.error.log; } + location /notification/ping { + proxy_pass http://127.0.0.1:8083/ping; + access_log /var/log/nginx/notification.access.log seafileformat; + error_log /var/log/nginx/notification.error.log; + } + location /notification { + proxy_pass http://127.0.0.1:8083/; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + access_log /var/log/nginx/notification.access.log seafileformat; + error_log /var/log/nginx/notification.error.log; + } + location ~ /\.git { deny all; }