summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO45
-rw-r--r--PKGBUILD52
-rw-r--r--apache-funkwhale.conf24
-rw-r--r--env-template4
-rw-r--r--funkwhale-beat.service13
-rw-r--r--funkwhale-server.service14
-rw-r--r--funkwhale-worker.service21
-rw-r--r--funkwhale.install10
-rw-r--r--funkwhale.service1
9 files changed, 118 insertions, 66 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ecfe86dcb7fc..a6ccfc2eac51 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,9 @@
pkgbase = funkwhale
pkgdesc = A self-hosted, modern free and open-source music server, heavily inspired by Grooveshark.
- pkgver = 0.17
- pkgrel = 2
+ pkgver = 0.18
+ pkgrel = 1
url = https://funkwhale.audio/
+ install = funkwhale.install
arch = any
license = GPL3
makedepends = git
@@ -10,12 +11,10 @@ pkgbase = funkwhale
depends = libjpeg
depends = postgresql
depends = python
- depends = youtube-dl
depends = ipython
depends = mod_xsendfile
depends = python-django>=2
depends = python-django-environ
- depends = python-whitenoise
depends = python-pillow
depends = python-django-allauth
depends = python-psycopg2
@@ -25,10 +24,8 @@ pkgbase = funkwhale
depends = python-celery
depends = python-django-cors-headers
depends = python-musicbrainzngs
- depends = python-django-rest-framework
+ depends = python-django-rest-framework>=3.9
depends = python-django-rest-framework-jwt
- depends = python-oauth2client
- depends = python-google-api-python-client
depends = python-pendulum
depends = python-persisting-theory
depends = python-django-versatile-imagefield
@@ -40,7 +37,6 @@ pkgbase = funkwhale
depends = python-django-taggit
depends = python-pymemoize
depends = python-django-dynamic-preferences
- depends = python-pyacoustid
depends = python-raven
depends = python-magic-git
depends = python-ffmpeg
@@ -53,29 +49,30 @@ pkgbase = funkwhale
depends = python-ldap
depends = python-django-auth-ldap
depends = python-service-identity
+ depends = python-pydub
optdepends = apache: to use the Apache web server
optdepends = certbot-apache: for the server to be accessible from outside
optdepends = nginx: to use nginx web server
- source = funkwhale-0.17-api.zip::https://code.eliotberriot.com/funkwhale/funkwhale/builds/artifacts/0.17/download?job=build_api
- source = funkwhale-0.17-front.zip::https://code.eliotberriot.com/funkwhale/funkwhale/builds/artifacts/0.17/download?job=build_front
- source = https://code.eliotberriot.com/funkwhale/funkwhale/raw/0.17/deploy/funkwhale_proxy.conf
- source = https://code.eliotberriot.com/funkwhale/funkwhale/raw/0.17/deploy/nginx.template
- source = https://code.eliotberriot.com/funkwhale/funkwhale/raw/0.17/deploy/funkwhale-beat.service
- source = https://code.eliotberriot.com/funkwhale/funkwhale/raw/0.17/deploy/funkwhale-worker.service
- source = https://code.eliotberriot.com/funkwhale/funkwhale/raw/0.17/deploy/funkwhale-server.service
+ source = funkwhale-0.18-api.zip::https://code.eliotberriot.com/funkwhale/funkwhale/builds/artifacts/0.18/download?job=build_api
+ source = funkwhale-0.18-front.zip::https://code.eliotberriot.com/funkwhale/funkwhale/builds/artifacts/0.18/download?job=build_front
+ source = https://code.eliotberriot.com/funkwhale/funkwhale/raw/0.18/deploy/funkwhale_proxy.conf
+ source = https://code.eliotberriot.com/funkwhale/funkwhale/raw/0.18/deploy/nginx.template
+ source = funkwhale-beat.service
+ source = funkwhale-worker.service
+ source = funkwhale-server.service
source = apache-funkwhale.conf
source = env-template
source = funkwhale.service
- sha256sums = 8211b9ff86cde6557ff8b3904ffeb7380e18e47b7b4b76c91f30986d284911a3
- sha256sums = 3578e1c60da578681c4e60a94dde1e18511f2455814c980b24748c87ffb8b4a2
+ sha256sums = bd39230b27e22d1a41cd058979f67cc1727b5ea845ce32b29e8de99bf6d364f3
+ sha256sums = 20faddbf6a74722826eb889df4ebd4fc18810ff80d3741608b1d86d17e4f408a
sha256sums = 2906a075b41dcd2375c601482cb5a00e42cb87c613012b176c570d77918afbf2
- sha256sums = 0d022981f24c9ed8306751d905e85a2fa086c124d7284cc765a3a83814e6efd8
- sha256sums = b30fd8f119a53a424c9372a3fdcaad3175f33f242b498b0348c697942573588d
- sha256sums = 976ddd2f409efa367e8f53d96092007d0886a473507294a3092a96e885b5e59a
- sha256sums = b2ff1a2911883416b3a8c35a3e579d493c0bcf4039604020a206c6e8b5fc0ba7
- sha256sums = 26f91e1b22d7c46a6e26c25889babb8d5e77f7a4aec06bd61833cf953fd48f4a
- sha256sums = 90c9a2b1ef1ac58589eda10c09a9af8141813aa6b661251eb571a1f757bea8c5
- sha256sums = 2aa5991083ef375b3440e0e0cff6e7de622137bcac1fb852d62f481aa8a5700d
+ sha256sums = ee571b8a30b968849fcf5c7b2588f298a3046609fe9792dd0b59024899dfea3a
+ sha256sums = a964a7802252d20a3319e2131c27ec307ad4f454921c2db31971c080150d7c9b
+ sha256sums = 0e6d7c96b7c1ec63794214decb1f2e7dd112a22b02e55555cf98c2a573014af6
+ sha256sums = 4a28ddf6a6ba8ec28c10a164f82e3d5e5904d6dfe68ae8852428a589cee210c5
+ sha256sums = dcc7a76ff136db29a830f9228a88b2ab64639d44ef2d8db363315fe5828efec9
+ sha256sums = c2ee8160e2f4f87a2d4fe46136ffb8ea14422dc599db3eca4341e48db26d72ad
+ sha256sums = 01104122e3df765735b1062aa15e7a73c7949f2d9b7332c0e02e02db66345349
pkgname = funkwhale
diff --git a/PKGBUILD b/PKGBUILD
index 7dba1881a44f..c05631b85b96 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,8 +1,8 @@
# Maintainer: getzze <getzze at gmail dot com>
pkgname=funkwhale
-pkgver=0.17
-pkgrel=2
+pkgver=0.18
+pkgrel=1
pkgdesc="A self-hosted, modern free and open-source music server, heavily inspired by Grooveshark."
arch=(any)
url="https://funkwhale.audio/"
@@ -10,12 +10,11 @@ license=(GPL3)
optdepends=('apache: to use the Apache web server'
'certbot-apache: for the server to be accessible from outside'
'nginx: to use nginx web server')
-depends=('ffmpeg' 'libjpeg' 'postgresql' 'python' 'youtube-dl'
+depends=('ffmpeg' 'libjpeg' 'postgresql' 'python'
'ipython'
'mod_xsendfile'
'python-django>=2'
'python-django-environ'
- 'python-whitenoise'
'python-pillow'
'python-django-allauth'
'python-psycopg2'
@@ -25,10 +24,8 @@ depends=('ffmpeg' 'libjpeg' 'postgresql' 'python' 'youtube-dl'
'python-celery'
'python-django-cors-headers'
'python-musicbrainzngs'
- 'python-django-rest-framework'
+ 'python-django-rest-framework>=3.9'
'python-django-rest-framework-jwt'
- 'python-oauth2client'
- 'python-google-api-python-client'
'python-pendulum'
'python-persisting-theory'
'python-django-versatile-imagefield'
@@ -40,7 +37,6 @@ depends=('ffmpeg' 'libjpeg' 'postgresql' 'python' 'youtube-dl'
'python-django-taggit'
'python-pymemoize'
'python-django-dynamic-preferences'
- 'python-pyacoustid'
'python-raven'
'python-magic-git'
'python-ffmpeg'
@@ -53,6 +49,7 @@ depends=('ffmpeg' 'libjpeg' 'postgresql' 'python' 'youtube-dl'
'python-ldap'
'python-django-auth-ldap'
'python-service-identity'
+ 'python-pydub'
)
makedepends=(git)
_source_api="https://code.eliotberriot.com/funkwhale/funkwhale/builds/artifacts/${pkgver}/download?job="
@@ -61,32 +58,25 @@ source=("${pkgname}-${pkgver}-api.zip::${_source_api}build_api"
"${pkgname}-${pkgver}-front.zip::${_source_api}build_front"
"${_source_env}funkwhale_proxy.conf"
"${_source_env}nginx.template"
- "${_source_env}funkwhale-beat.service"
- "${_source_env}funkwhale-worker.service"
- "${_source_env}funkwhale-server.service"
+ "funkwhale-beat.service"
+ "funkwhale-worker.service"
+ "funkwhale-server.service"
"apache-funkwhale.conf"
"env-template"
"funkwhale.service"
)
-sha256sums=('8211b9ff86cde6557ff8b3904ffeb7380e18e47b7b4b76c91f30986d284911a3'
- '3578e1c60da578681c4e60a94dde1e18511f2455814c980b24748c87ffb8b4a2'
+sha256sums=('bd39230b27e22d1a41cd058979f67cc1727b5ea845ce32b29e8de99bf6d364f3'
+ '20faddbf6a74722826eb889df4ebd4fc18810ff80d3741608b1d86d17e4f408a'
'2906a075b41dcd2375c601482cb5a00e42cb87c613012b176c570d77918afbf2'
- '0d022981f24c9ed8306751d905e85a2fa086c124d7284cc765a3a83814e6efd8'
- 'b30fd8f119a53a424c9372a3fdcaad3175f33f242b498b0348c697942573588d'
- '976ddd2f409efa367e8f53d96092007d0886a473507294a3092a96e885b5e59a'
- 'b2ff1a2911883416b3a8c35a3e579d493c0bcf4039604020a206c6e8b5fc0ba7'
- '26f91e1b22d7c46a6e26c25889babb8d5e77f7a4aec06bd61833cf953fd48f4a'
- '90c9a2b1ef1ac58589eda10c09a9af8141813aa6b661251eb571a1f757bea8c5'
- '2aa5991083ef375b3440e0e0cff6e7de622137bcac1fb852d62f481aa8a5700d')
+ 'ee571b8a30b968849fcf5c7b2588f298a3046609fe9792dd0b59024899dfea3a'
+ 'a964a7802252d20a3319e2131c27ec307ad4f454921c2db31971c080150d7c9b'
+ '0e6d7c96b7c1ec63794214decb1f2e7dd112a22b02e55555cf98c2a573014af6'
+ '4a28ddf6a6ba8ec28c10a164f82e3d5e5904d6dfe68ae8852428a589cee210c5'
+ 'dcc7a76ff136db29a830f9228a88b2ab64639d44ef2d8db363315fe5828efec9'
+ 'c2ee8160e2f4f87a2d4fe46136ffb8ea14422dc599db3eca4341e48db26d72ad'
+ '01104122e3df765735b1062aa15e7a73c7949f2d9b7332c0e02e02db66345349')
+install=${pkgname}.install
-prepare() {
- cd "$srcdir"
-
- sed -i 's#WorkingDirectory=/srv/funkwhale/api#WorkingDirectory=/usr/share/webapps/funkwhale/api#' funkwhale-*.service
- sed -i 's#EnvironmentFile=/srv/funkwhale/config/.env#EnvironmentFile=/etc/webapps/funkwhale/config/.env#' funkwhale-*.service
- sed -i 's#ExecStart=/srv/funkwhale/virtualenv/bin/#ExecStart=/usr/bin/#' funkwhale-*.service
- sed -i 's#PartOf=funkwhale.target#PartOf=funkwhale.service#' funkwhale-*.service
-}
build() {
cd "$srcdir"
@@ -97,10 +87,10 @@ package() {
cd "$srcdir"
# install project
- install -d "$pkgdir"/usr/share/webapps/${pkgname}
+ install -dm0755 -o root "$pkgdir"/usr/share/webapps/${pkgname}
cp -R api "$pkgdir"/usr/share/webapps/${pkgname}/.
cp -R front "$pkgdir"/usr/share/webapps/${pkgname}/.
- chown -R funkwhale:funkwhale "$pkgdir"/usr/share/webapps/${pkgname}
+ chmod 755 -R "$pkgdir"/usr/share/webapps/${pkgname}/api/
install -d "$pkgdir"/etc/webapps/${pkgname}/config
install -Dm644 funkwhale_proxy.conf "$pkgdir"/etc/webapps/${pkgname}/.
@@ -113,7 +103,7 @@ package() {
install -Dm644 funkwhale-worker.service "$pkgdir/usr/lib/systemd/system/funkwhale-worker.service"
install -Dm644 funkwhale-server.service "$pkgdir/usr/lib/systemd/system/funkwhale-server.service"
- echo 'u funkwhale - "Funkwhale music server" /srv/funkwhale' |
+ echo -e 'u funkwhale - "Funkwhale music server" /srv/funkwhale\nm funkwhale http' |
install -Dm644 /dev/stdin "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
echo 'd /srv/funkwhale 0775 funkwhale funkwhale' |
install -Dm644 /dev/stdin "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
diff --git a/apache-funkwhale.conf b/apache-funkwhale.conf
index 18a1cdf831fc..a0af46d970f2 100644
--- a/apache-funkwhale.conf
+++ b/apache-funkwhale.conf
@@ -5,11 +5,16 @@ Define funkwhale-sn funkwhale.local
# use different configuration than what is described in our installation guide.
Define funkwhale-api http://localhost:5000
Define funkwhale-api-ws ws://localhost:5000
-Define FRONTEND_PATH /usr/share/webapps/funkwhale/front/dist
+Define FUNKWHALE_FRONTEND_PATH /usr/share/webapps/funkwhale/front/dist
Define MUSIC_DIRECTORY_PATH /srv/funkwhale/data/music
+<IfModule mod_alias.c>
+ Alias /funkwhale ${FUNKWHALE_FRONTEND_PATH}
+</IfModule>
+
+
# HTTP requests redirected to HTTPS
-<VirtualHost 127.0.0.2:80>
+<VirtualHost *:80>
ServerName ${funkwhale-sn}
# Default is to force https
@@ -25,8 +30,8 @@ Define MUSIC_DIRECTORY_PATH /srv/funkwhale/data/music
<IfModule mod_ssl.c>
-<VirtualHost 127.0.0.2:443>
- # Protocols h2 http/1.1
+<VirtualHost *:443>
+# Protocols h2 http/1.1
ServerName ${funkwhale-sn}
# Path to ErrorLog and access log
@@ -50,7 +55,7 @@ Define MUSIC_DIRECTORY_PATH /srv/funkwhale/data/music
# Tell the api that the client is using https
RequestHeader set X-Forwarded-Proto "https"
- DocumentRoot ${FRONTEND_PATH}
+ DocumentRoot ${FUNKWHALE_FRONTEND_PATH}
FallbackResource /index.html
@@ -73,11 +78,11 @@ Define MUSIC_DIRECTORY_PATH /srv/funkwhale/data/music
</Proxy>
# Activating WebSockets
- ProxyPass "/api/v1/instance/activity" ${funkwhale-api-ws}/api/v1/instance/activity
+ ProxyPass "/api/v1/activity" ${funkwhale-api-ws}/api/v1/activity
<Location "/api">
- # similar to nginx 'client_max_body_size 30M;'
- LimitRequestBody 31457280
+ # similar to nginx 'client_max_body_size 100M;'
+ LimitRequestBody 104857600
ProxyPass ${funkwhale-api}/api
ProxyPassReverse ${funkwhale-api}/api
@@ -99,6 +104,7 @@ Define MUSIC_DIRECTORY_PATH /srv/funkwhale/data/music
</Location>
Alias /media /srv/funkwhale/data/media
+ Alias /front ${FUNKWHALE_FRONTEND_PATH}
Alias /staticfiles /srv/funkwhale/data/static
@@ -109,7 +115,7 @@ Define MUSIC_DIRECTORY_PATH /srv/funkwhale/data/music
Require all granted
</Directory>
- <Directory ${FRONTEND_PATH}>
+ <Directory ${FUNKWHALE_FRONTEND_PATH}>
Options FollowSymLinks
AllowOverride None
Require all granted
diff --git a/env-template b/env-template
index 595ed943a985..37e0cbf153d5 100644
--- a/env-template
+++ b/env-template
@@ -88,7 +88,7 @@ STATIC_ROOT=/srv/funkwhale/data/static
# Update it to match the domain that will be used to reach your funkwhale
# instance
# Example: DJANGO_ALLOWED_HOSTS=funkwhale.yourdomain.com
-DJANGO_ALLOWED_HOSTS=127.0.0.2,funkwhale.local
+DJANGO_ALLOWED_HOSTS=127.0.0.1,funkwhale.local
# which settings module should django use?
# You don't have to touch this unless you really know what you're doing
@@ -138,4 +138,4 @@ MUSIC_DIRECTORY_SERVE_PATH=/srv/funkwhale/data/music
FUNKWHALE_FRONTEND_PATH=/usr/share/webapps/funkwhale/front/dist
# Nginx related configuration
-NGINX_MAX_BODY_SIZE=30M
+NGINX_MAX_BODY_SIZE=100M
diff --git a/funkwhale-beat.service b/funkwhale-beat.service
new file mode 100644
index 000000000000..d9b36b9c3584
--- /dev/null
+++ b/funkwhale-beat.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Funkwhale celery beat process
+After=redis.service postgresql.service
+PartOf=funkwhale.service
+
+[Service]
+User=funkwhale
+# adapt this depending on the path of your funkwhale installation
+EnvironmentFile=/srv/funkwhale/config/env
+ExecStart=/usr/bin/celery -A funkwhale_api.taskapp beat -l INFO --workdir=/usr/share/webapps/funkwhale/api --schedule=/srv/funkwhale/api/celerybeat-schedule --pidfile=/srv/funkwhale/api/celerybeat.pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/funkwhale-server.service b/funkwhale-server.service
new file mode 100644
index 000000000000..30dcc38b4eb0
--- /dev/null
+++ b/funkwhale-server.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Funkwhale application server
+After=redis.service postgresql.service
+PartOf=funkwhale.service
+
+[Service]
+User=funkwhale
+# adapt this depending on the path of your funkwhale installation
+WorkingDirectory=/usr/share/webapps/funkwhale/api
+EnvironmentFile=/srv/funkwhale/config/env
+ExecStart=/usr/bin/daphne -b ${FUNKWHALE_API_IP} -p ${FUNKWHALE_API_PORT} config.asgi:application --proxy-headers
+
+[Install]
+WantedBy=multi-user.target
diff --git a/funkwhale-worker.service b/funkwhale-worker.service
new file mode 100644
index 000000000000..494b52a02b52
--- /dev/null
+++ b/funkwhale-worker.service
@@ -0,0 +1,21 @@
+[Unit]
+Description=Funkwhale celery worker
+After=redis.service postgresql.service
+PartOf=funkwhale.service
+
+[Service]
+User=funkwhale
+# adapt this depending on the path of your funkwhale installation
+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=/usr/bin/celery -A funkwhale_api.taskapp worker -l INFO --workdir=/usr/share/webapps/funkwhale/api
+
+[Install]
+WantedBy=multi-user.target
diff --git a/funkwhale.install b/funkwhale.install
new file mode 100644
index 000000000000..09e22f94898f
--- /dev/null
+++ b/funkwhale.install
@@ -0,0 +1,10 @@
+post_install() {
+ echo "Follow instructions on the upstream page or on the Arch Wiki for setting up the Funkwhale server:"
+ echo "https://wiki.archlinux.org/index.php/Funkwhale"
+}
+
+post_upgrade() {
+ echo "Follow instructions on the upstream page or on the Arch Wiki for updating"
+ echo "If updating from v0.17, the default ip has been changed to 127.0.0.1 and the env file has been moved to /srv/funkwhale/config/env"
+}
+
diff --git a/funkwhale.service b/funkwhale.service
index 22b98a8076db..2abe88c8fcbc 100644
--- a/funkwhale.service
+++ b/funkwhale.service
@@ -10,3 +10,4 @@ RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
+