A docker-compose based deployment intended to bring Seafile on any ARMv7/ARM64 board with little effort. A database server and a reverse-proxy with automated SSL/TLS certificates renewal are included.
This environment has been set up using the following images and packages (which you should glance at for further documentation):
- Base Docker image
- linuxserver/mariadb as database server
- linuxserver/swag as reverse-proxy with cerbot support for Let's Encrypt.
No guarantees of any kind are provided by using this environment.
A functional docker-compose environment, a domain name associated with your server and the TCP ports 80 and 443 correctly forwarded.
Clone this repository somewhere on your server:
$ git clone https://github.com/ChatDeBlofeld/seafile-arm-docker
$ cd seafile-arm-docker
The topology provided should easily fulfill basic use cases. For a finer configuration, see the docs mentioned above.
Some points need attention though when editing the compose file.
- Your domain has to be set in the
seafile
andreverse-proxy
services - All variables mentioning credentials (email, password) must be updated for obvious security reasons. Keep in mind that the MySQL root passwords in the
seafile
anddb
services have to match.
By default, all data are stored in the compose file directory. Feel free to remap the volumes wherever you need, for example on an external drive. Just be careful that the seahub-data
volume is also used in the reverse-proxy
service.
First generate the certificates by running the service once:
$ docker-compose up reverse-proxy
If everything went right, stop the container and copy the file nginx/seafile.conf
to /path/to/reverse-proxy/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:
- https://manual.seafile.com/deploy/deploy_with_nginx/
- https://manual.seafile.com/deploy/https_with_nginx
Simply run:
$ docker-compose up -d
You should now be able to access https://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 compose file.
Currently there's no breaking changes between the images, so the update is straightforward:
$ docker-compose down
$ docker-compose pull seafile
$ docker-compose up -d
Note: rollback will likely fail for major updates
Like the seafile
service, a pull of the new image should do the job.
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.
Set daemon
to False
in gunicorn.conf.py
and restart the Seafile service to grab more information about a failed start.
If you can't run the swag container yet (no port forwarding, no domain or whatever), you may want to use the testing web server. It's a simple Nginx configuration without SSL/TLS, just change the mentioned field in nginx/seafile.testing.conf
and the seafile configuration files for using the hostname of your server (probably 127.0.0.1
). The variable ENABLE_TLS
in the compose file has to be set to 0
as well.
Then run:
$ docker-compose -f docker-compose.yml -f docker-compose.testing.yml up -d