Skip to content

Commit

Permalink
Update to Seafile-CE 11.0.6 and Traefik v2
Browse files Browse the repository at this point in the history
  • Loading branch information
h44z committed Mar 29, 2024
1 parent e856632 commit 63055df
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 11 deletions.
9 changes: 4 additions & 5 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=11.0.5
SEAFILE_VERSION=11.0.6
SEAFILE_NAME=Seafile
SEAFILE_ADDRESS=seafile.localhost
[email protected]
Expand All @@ -21,12 +21,11 @@ SEAFILE_ADMIN_PW=asecret
ONLYOFFICE_JWT_SECRET=Supers3cr3t

# Optional Seafile Settings
SEAHUB_PORT=8000
SEAFILE_PORT=8082
SEAFDAV_PORT=8080

LDAP_IGNORE_CERT_CHECK=true

# Traefik (Reverse Proxy) Settings
DOMAINNAME=yourdomain.com

# All other settings can be edited in the conf dir (/seafile/conf) once the container started up!

# runmode, default = run
Expand Down
32 changes: 28 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@

## About

- This repository contains the sources that are used to build the `h44z/seafile-ce` docker image. Currently tested with Seafile CE 11.0.5.
- This repository contains the sources that are used to build the `h44z/seafile-ce` docker image. Currently tested with Seafile CE 11.0.6.

- 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.

- Automated features that come with this Docker image:
- newest seafile version at rebuild
- Newest Seafile version at rebuild
- Traefik v2 reverse proxy for HTTPS
- Automatically runs upgrade scripts (when pulling a newer image) provided by seafile
- Configurable to run with MySQL/MariaDB or SQLite
- Auto-setup at initial run
Expand All @@ -25,7 +26,7 @@
- It is largly based on this docker image: https://github.com/Gronis/docker-seafile.

## Building the docker image from scratch
To build the docker image, docker must be installed (at least version 18.02.0).
To build the docker image, docker must be installed (at least version 26.0.0).

After the dependcies have been set up, change to the image directory and build the images using make:

Expand All @@ -43,7 +44,7 @@ make server


## Running Seafile 11.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.
Make sure that you have installed Docker Compose with version 2.25.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:
```bash
Expand Down Expand Up @@ -79,6 +80,29 @@ mkdir -p data/onlyoffice
cp sample-configs/local.json data/onlyoffice/local.conf
```

Custom settings to Docker containers can be added using a `docker-compose.override.yml` file. For example:

```yaml
services:
db:
image: mariadb:10.11
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_USER_PASSWORD}
- MYSQL_LOG_CONSOLE=true
# - MARIADB_AUTO_UPGRADE=1
volumes:
- ./data/custom_db_backup:/tmp/dbbackup
reverse-proxy:
labels:
- traefik.http.middlewares.dashboard-auth.basicauth.users=admin:$$2y$$05$$HndX02RYOlvwmPCMAXOyVe7VVnICX7czh7heoOYkf3lS/lByMA2hC # overrides the default credentials for the traefik dashboard
```
## Upgrading from Seafile 11.0.5
Starting from 11.0.6, this repository uses Traefik v2 as reverse proxy for Seafile and OnlyOffice. Therefore, other reverse proxies like Nginx should be disabled to avoid port binding conflicts.
The `.env` configuration must also be updated to include a **DOMAINNAME** variable which contains the top-level domain name of your Seafile instance. The seafile server will be reachable on the subdomain **https://seafile.[DOMAINNAME]**.

## Upgrading from Seafile 10.x.x
Simply use the newer 11.x.x Docker image. If you used LDAP, please follow the [official upgrade instructions](https://manual.seafile.com/upgrade/upgrade_notes_for_11.0.x/) and update the settings accordingly.

Expand Down
5 changes: 4 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ services:
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_LOG_CONSOLE=true
# To upgrade mariadb from an older version, uncomment the line below
#- MARIADB_AUTO_UPGRADE=1
volumes:
- ${SEAFILE_DB_DATA:-./data/db}:/var/lib/mysql
networks:
Expand All @@ -28,11 +30,12 @@ services:
max-file: "3"

seafile:
image: h44z/seafile-ce:${SEAFILE_VERSION:-11.0.5}
image: h44z/seafile-ce:${SEAFILE_VERSION:-11.0.6}
container_name: seafile
restart: unless-stopped
volumes:
- ${SEAFILE_SHARED_DATA:-./data/seafile}:/seafile
- ${SEAFILE_LOG_DIR:-./seafile-logs}:/opt/seafile/logs
env_file:
- .env
depends_on:
Expand Down
2 changes: 1 addition & 1 deletion image/seafile/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ RUN curl -L https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VE
WORKDIR /opt/seafile

# build-time arguments, use them in docker build with --build-arg switch to build different version
ARG SEAFILE_VERSION=11.0.5
ARG SEAFILE_VERSION=11.0.6

ENV SEAFILE_VERSION=${SEAFILE_VERSION}

Expand Down

0 comments on commit 63055df

Please sign in to comment.