Commit graph

10 commits

Author SHA1 Message Date
libeanim 702f5da610 Add garbage collector command to launcher (#20)
* Add garbage collector command to launcher

The seafile garbage collector can be started via the 'gc' command option of the launcher.
This will stop the seafile-server inside the container, then run the 'seaf-gc.sh' script and redirect its output to '/var/log/gc.log'.
Afterwards the whole container will be restarted.

* Move garbage collector execution logic to scripts/gc.sh

The file gc.sh stops the seafile server, starts the garbage collector and restarts the seafile server when the cleanup is finished.
The output of the 'seaf-gc.sh' script is piped to the file '/var/log/gc.log' in append mode.

* Add 'scripts/gc.sh' to watch_controller function in 'scripts/start.py'

The 'start.py' script monitors the seafile-server in a 'watch_controller' function and terminates the container when the server crashed.
However, during a garbage collector cleanup the server needs to be shut down and therefore it is necessary that the 'watch_controller' function only terminates the container if the server is offline and no cleanup is in progress.

* Add the gc command info to README

* Preseve the exit code of seaf-gc.sh

* Fix the perm of scripts/gc.sh
2017-06-06 05:23:12 -05:00
Shuai Lin 01d1035433 Improve python scripts docstring. 2016-11-29 17:13:06 +08:00
Shuai Lin e6a0840cf0 Support manual major upgrade.
* By default all major upgrades would be fully automatic. But the
user can opt for manual upgrade by "./launcher rebuild --manual-upgrade"
2016-11-29 14:44:26 +08:00
Shuai Lin 71390ad11f Make sure nginx is ready when bootstrapping with letsencrypt. 2016-11-25 14:23:48 +08:00
Shuai Lin 1832ad5acb Re-organize the build/start phases.
- ./launcher bootstrap => init seafile server data & letsencrypt, then
build a local image based on seafileorg/server:<version>
- ./launcher start => start a container using the local image
2016-11-15 16:59:02 +08:00
Shuai Lin 2c5dace56e Support https with letsencrypt.
TODO: add a cron job to renew the certs
2016-11-15 12:11:58 +08:00
Shuai Lin 99d2c8456b Support mysql.
At this moment, we only support running mysql server inside the
container. Support for running mysql(and memcached) in a separate
container would be added later.
2016-11-14 14:47:40 +08:00
Shuai Lin 2dc6f8d5bc Make the start.py script run forever in foreground. 2016-11-14 08:31:39 +08:00
Shuai Lin c0cf376ba3 Create admin user without user interaction. 2016-11-12 11:28:49 +08:00
Shuai Lin 7814d43b12 Initial work on running seafile with docker. 2016-11-11 12:54:53 +08:00