Skip to content

ChatDeBlofeld/seafile-arm-docker

Repository files navigation

Seafile on ARM in 5 minutes

A docker-compose based deployment intended to bring Seafile on any ARMv7/ARM64 board with little effort. MariaDB/SQLite and a reverse-proxy with automated TLS certificates renewal are included.

Don't want automated TLS certs? See the No SWAG section below.

This environment has been set up using the following images and packages (which you should glance at for further documentation):

Some other useful docs:

No guarantees of any kind are provided by using this environment.

Prerequisites

A working docker-compose environment, a domain name associated with your server and the TCP ports 80 and 443 correctly forwarded.

Initialization

Clone this repository somewhere on your server:

$ git clone https://github.com/ChatDeBlofeld/seafile-arm-docker
$ cd seafile-arm-docker

Compose topology

The topology provided should easily fulfill basic use cases. For a finer configuration, see the docs mentioned above.

Note: the compose.sh script is a shortcut to the docker-compose cmd, it assembles the right files for your configuration (mainly). You should it instead of docker-compose just to have things working.

Configuration

Copy the .env.example file:

$ cp .env.example .env

Then edit the dotenv with your favorite editor and take care at least of the following topics:

  • Set DBMS to 0 (SQLite), 1 (MariaDB) or 2 (MySQL) to select your DBMS.
  • Set your domain at the HOST variable.
  • All variables mentioning credentials (email, passwords) must be updated for obvious security reasons.
  • All volumes are mapped to the current directory by default, feel free to remap them to the most appropriate place for you, for example an external drive.

(Optional) Compose V2

If compose V2 is installed, you can take advantage of the new config command to generate a compose file which can be used with the more traditional docker compose command instead of the launch script.

$ ./compose.sh config > docker-compose.yml

Reverse-proxy

SWAG

First generate the certificates by running the service once:

$ ./compose.sh up reverse-proxy

If everything went right, stop the container and copy the file nginx/seafile.conf to /path/to/swag/volume/nginx/site-confs and set your domain at the mentioned sections.

You may want to see the following resources for more information about this configuration:

(Optional) No SWAG

Alternatively, you may want not to use the SWAG container for testing and whatever reasons. Then:

  1. Set NOSWAG=1 in your dotenv.
  2. Edit the file seafile.noswag.conf and set your local ip at the mentioned section.

Then depending on your use case configuration may differ.

Local network access only

In addition to the former, set USE_HTTPS=false in your dotenv. The application will be listening on port 80, if you want to initialize with another port, both NOSWAG_PORT and PORT variables have to be edited and match.

Run

Simply run:

$ ./compose.sh up -d

You should now be able to access http(s)://your.domain and log in with your admin account.

Note: after the first run, all the credentials related environment variables can be removed from the dotenv file.

Updating

Seafile service

Currently there's no breaking changes between the images, so the update is straightforward:

$ ./compose.sh pull seafile
$ ./compose.sh up -d

Note: rollback will likely fail for major updates

Thirdpart images

Like the seafile service, a pull of the new image should do the job.

Reverse-proxy configuration

The Nginx configuration may be updated sometimes, then it has to be downloaded from this repository and copied to the right folder again.

For all default files provided by the swag container, see this updating procedure.

Troubleshooting

Seahub failed to start

Set daemon to False in gunicorn.conf.py and restart the Seafile service to grab more information about a failed start.

Releases

No releases published

Packages

No packages published

Languages