diff --git a/.gitignore b/.gitignore index ba7756a..8c15c15 100644 --- a/.gitignore +++ b/.gitignore @@ -4,5 +4,5 @@ .DS_Store *.pyc -containers/ +bootstrap/ shared/ diff --git a/.travis.yml b/.travis.yml index 0471aa5..bfea7bb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,3 +10,6 @@ install: script: - cd image && make base && make + - cd .. + - cp samples/server-sqlite3.conf bootstrap/bootstrap.conf + - ./launcher bootstrap diff --git a/containers/.gitkeep b/bootstrap/.gitkeep similarity index 100% rename from containers/.gitkeep rename to bootstrap/.gitkeep diff --git a/launcher b/launcher index ef60d10..7d10afc 100755 --- a/launcher +++ b/launcher @@ -36,7 +36,7 @@ set_volumes() { mounts=( $sharedir:/shared - $topdir/containers:/containers:ro + $topdir/bootstrap:/bootstrap:ro $topdir/scripts:/scripts:ro $bash_history:/root/.bash_history ) @@ -49,7 +49,7 @@ set_volumes() { bootstrap() { set_volumes - docker run --rm -it -v SEAFILE_BOOTSRAP=1 $volumes $image /scripts/bootstrap.py + docker run --rm -it -e SEAFILE_BOOTSRAP=1 $volumes $image /scripts/bootstrap.py } start() { diff --git a/samples/server-sqlite3.conf b/samples/server-sqlite3.conf new file mode 100644 index 0000000..bf66497 --- /dev/null +++ b/samples/server-sqlite3.conf @@ -0,0 +1,4 @@ +[server] +server.hostname = seafile.example.com +admin.email = me@example.com +admin.password = asecret \ No newline at end of file diff --git a/scripts/bootstrap.py b/scripts/bootstrap.py index 8f2faa2..02aa9c7 100755 --- a/scripts/bootstrap.py +++ b/scripts/bootstrap.py @@ -24,7 +24,7 @@ def get_conf(key): global _config if _config is None: _config = ConfigParser() - _config.read("/containers/bootstrap.conf") + _config.read("/bootstrap/bootstrap.conf") return _config.get("server", key) def main(): diff --git a/seafile-server-setup b/seafile-server-setup index dca8ce7..61381f6 100755 --- a/seafile-server-setup +++ b/seafile-server-setup @@ -97,7 +97,7 @@ get_server_name get_admin_email get_admin_passwd -cat >containers/bootstrap.conf<bootstrap/bootstrap.conf<