https://github.com/humanbrainproject/seafile-compose
A Docker Compose setup for Seafile
https://github.com/humanbrainproject/seafile-compose
Last synced: 7 months ago
JSON representation
A Docker Compose setup for Seafile
- Host: GitHub
- URL: https://github.com/humanbrainproject/seafile-compose
- Owner: HumanBrainProject
- License: agpl-3.0
- Created: 2018-11-05T15:54:10.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-06-02T00:24:12.000Z (almost 5 years ago)
- Last Synced: 2025-01-23T09:16:29.547Z (about 1 year ago)
- Language: Dockerfile
- Homepage:
- Size: 19.5 KB
- Stars: 10
- Watchers: 13
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Seafile compose
The project is intended for a quick developer environment for Seahub, while
all necessary components live in their own containers.
There are separate containers for:
* Mysql DB
* CCNET-server
* Seafile-server
* Seahub
All containers except the DB are using the official Seafile release downloads,
where the version is specified in the Dockerfile.
## Run compose
```
docker-compose \
-f docker-compose.yaml \
up \
--force-recreate \
--renew-anon-volumes \
--build
```
### Create a superuser
In a new terminal, from the project root, run:
`docker-compose exec seahub python /opt/seafile/seafile-server-latest/seahub/manage.py createsuperuser`
### Access your Seafile instance
This will get you the upstream vanilla version of Seafile listening on
http://localhost:8000, with no customizations. You can login using the
superuser you just created.
### Changing the version
Edit the Dockerfile in `seafile_dev_docker/Dockerfile` and change
`SEAFILE_VERSION=X.Y.Z` to an [available version](https://www.seafile.com/en/home/).
## Run local copy of Seahub with ipdb
Clone the Seahub repository into the local folder `seahub`
([clone](https://github.com/haiwen/seahub.git) or symlink), it will be
mounted on the seahub container to override the version that ships
with the official release.
To run the local copy of Seahub with Docker Compose run
```
docker-compose \
-f docker-compose.yaml \
-f docker-compose.dev.yaml \
up \
--force-recreate \
--renew-anon-volumes \
--build
```
This will get you the a custom version of Seahub listening on
http://localhost:8000, using the upstream vanilla versions of
Seafile-server and CCNET-server. This container also includes
[ipdb](https://pypi.org/project/ipdb/) for debugging.
Then if you want to use `ipdb.set_trace()` to debug your version
you have to restart the Seahub container as follows:
```
docker-compose stop seahub
docker-compose run --service-ports seahub
```
That's it. The Seahub service will now run in the foreground and you
should get an interactive debugging shell when reaching a breakpoint.
Changing your Seahub code should trigger Django to reload so you don't
have to restart the container after every change.
## Useful for compose debugging
When `up` fails you can try to debug by
running bash on the image and attaching volumes and networks:
```
docker run \
--rm \
-it \
--entrypoint /bin/bash \
-v seafile-compose_sockets:/opt/seafile/sockets \
--network seafile-compose_default\
seafile:dev
```
Then try the compose service command that fails and see what's wrong.
## Acknowledgement
This open source software code was developed in part or in whole in the Human Brain Project, funded from the European Union’s Horizon 2020 Framework Programme for Research and Innovation under the Specific Grant Agreement No. 785907 (Human Brain Project SGA2).