Skip to content

Commit

Permalink
Update to Seafile-CE 10.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
h44z committed Jun 19, 2023
1 parent 9970be3 commit 6a477d7
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 18 deletions.
4 changes: 1 addition & 3 deletions .env.dist
Original file line number Diff line number Diff line change
Expand Up @@ -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
[email protected]
Expand All @@ -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!
Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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.
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
9 changes: 5 additions & 4 deletions image/seafile/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand Down
7 changes: 1 addition & 6 deletions image/seafile/scripts/seafile-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,6 @@ setup_sqlite() {
}

special_customizations() {
if [ "${SPRINTERNET_CUSTOMIZATIONS:-false}" = "true" ]; then
echo Patching files...
sed -i "/{% block main_content %}/a <script type=\"text/javascript\">window.location.replace(\"{% url 'oauth_login' %}\");</script>" ${INSTALLPATH}/seahub/seahub/templates/registration/login.html
sed -i '/<\/div>/a <script type="text/javascript">window.location.replace("https://account.sprinternet.at/ssologout?src=seafile");</script>' ${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
Expand Down Expand Up @@ -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.
Expand Down
14 changes: 14 additions & 0 deletions sample-configs/seafile-nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 6a477d7

Please sign in to comment.