diff --git a/changes/changelog.d/165.doc b/changes/changelog.d/165.doc new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/deploy/docker-compose.yml b/deploy/docker-compose.yml index cc4f357cad229768d1b98d8b104c7aa8f2c691d5..3bcd2f6d508a7b41747ba10ee85306adf9aa6619 100644 --- a/deploy/docker-compose.yml +++ b/deploy/docker-compose.yml @@ -20,6 +20,14 @@ services: restart: unless-stopped image: funkwhale/funkwhale:${FUNKWHALE_VERSION:-latest} env_file: .env + # Celery workers handle background tasks (such file imports or federation + # messaging). The more processes a worker gets, the more tasks + # can be processed in parallel. However, more processes also means + # a bigger memory footprint. + # By default, a worker will span a number of process equal to your number + # of CPUs. You can adjust this, by explicitly setting the --concurrency + # flag: + # celery -A funkwhale_api.taskapp worker -l INFO --concurrency=4 command: celery -A funkwhale_api.taskapp worker -l INFO links: - postgres diff --git a/deploy/funkwhale-worker.service b/deploy/funkwhale-worker.service index cb3c883070f13ec0052694a27d34719f908791e3..4df60b5e98ea5b997f882984624a3c79ebe6f01b 100644 --- a/deploy/funkwhale-worker.service +++ b/deploy/funkwhale-worker.service @@ -8,6 +8,14 @@ User=funkwhale # adapt this depending on the path of your funkwhale installation WorkingDirectory=/srv/funkwhale/api EnvironmentFile=/srv/funkwhale/config/.env +# Celery workers handle background tasks (such file imports or federation +# messaging). The more processes a worker gets, the more tasks +# can be processed in parallel. However, more processes also means +# a bigger memory footprint. +# By default, a worker will span a number of process equal to your number +# of CPUs. You can adjust this, by explicitly setting the --concurrency +# flag: +# celery -A funkwhale_api.taskapp worker -l INFO --concurrency=4 ExecStart=/srv/funkwhale/virtualenv/bin/celery -A funkwhale_api.taskapp worker -l INFO [Install] diff --git a/docs/installation/index.rst b/docs/installation/index.rst index 2e62c71ec5b547da9a9fcd4db7a4566ff9814b57..09f7a3e12b70b66e03b186c39563564f15fb835d 100644 --- a/docs/installation/index.rst +++ b/docs/installation/index.rst @@ -12,9 +12,48 @@ The project relies on the following components and services to work: - A celery worker to run asynchronouse tasks (such as music import) - A celery scheduler to run recurrent tasks + +Hardware requirements +--------------------- + +Funkwhale is not especially CPU hungry, unless you're relying heavily +on the transcoding feature (which is basic and unoptimized at the moment). + +On a dockerized instance with 2 CPUs and a few active users, the memory footprint is around ~500Mb:: + + CONTAINER MEM USAGE + funkwhale_api_1 202.1 MiB + funkwhale_celerybeat_1 96.52 MiB + funkwhale_celeryworker_1 168.7 MiB + funkwhale_postgres_1 22.73 MiB + funkwhale_redis_1 1.496 MiB + +Thus, Funkwhale should run fine on commodity hardware, small hosting boxes and +Raspberry Pi. We lack real-world exemples of such deployments, so don't hesitate +do give us your feedback (either positive or negative). + +Software requirements +--------------------- + +Software requirements will vary depending of your installation method. For +Docker-based installations, the only requirement will be an Nginx reverse-proxy +that will expose your instance to the outside world. + +If you plan to install your Funkwhale instance without Docker, most of the +dependencies should be available in your distribution's repositories. + +.. note:: + + Funkwhale works only with Pyhon >= 3.5, as we need support for async/await. + Older versions of Python are not supported. + + Available installation methods ------------------------------- +Docker is the recommended and easiest way to setup your Funkwhale instance. +We also maintain an installation guide for Debian 9. + .. toctree:: :maxdepth: 1