From a85862381649c1ea203dded468831383a600dc95 Mon Sep 17 00:00:00 2001 From: Eliot Berriot Date: Sat, 20 Oct 2018 16:40:34 +0200 Subject: [PATCH 01/12] Fix # #562: Document how to find and use library id when importing files in CLI --- changes/changelog.d/562.doc | 1 + docs/importing-music.rst | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 changes/changelog.d/562.doc diff --git a/changes/changelog.d/562.doc b/changes/changelog.d/562.doc new file mode 100644 index 000000000..664a94f01 --- /dev/null +++ b/changes/changelog.d/562.doc @@ -0,0 +1 @@ +Document how to find and use library id when importing files in CLI (#562) diff --git a/docs/importing-music.rst b/docs/importing-music.rst index 4b4ea7c1d..965b2068c 100644 --- a/docs/importing-music.rst +++ b/docs/importing-music.rst @@ -14,14 +14,25 @@ You can import those tracks as follows, assuming they are located in .. code-block:: bash - python api/manage.py import_files "/srv/funkwhale/data/music/**/*.ogg" --recursive --noinput + export LIBRARY_ID="" + python api/manage.py import_files $LIBRARY_ID "/srv/funkwhale/data/music/**/*.ogg" --recursive --noinput When you use docker, the ``/srv/funkwhale/data/music`` is mounted from the host to the ``/music`` directory on the container: .. code-block:: bash - docker-compose run --rm api python manage.py import_files "/music/**/*.ogg" --recursive --noinput + export LIBRARY_ID="" + docker-compose run --rm api python manage.py import_files $LIBRARY_ID "/music/**/*.ogg" --recursive --noinput + +.. note:: + + Library IDs are available in library urls or sharing link. In this example: + https://funkwhale.instance/content/libraries/769a2ae3-eb3d-4aff-9f94-2c4d80d5c2d1, + the library ID is 769a2bc3-eb1d-4aff-9f84-2c4d80d5c2d1 + + You can use only the first characters of the ID when calling the command, like that: + ``export LIBRARY_ID="769a2bc3"`` The import command supports several options, and you can check the help to get details:: From b78f09cc924fd95fa38335a8d654d1f7568327aa Mon Sep 17 00:00:00 2001 From: Eliot Berriot Date: Sat, 24 Nov 2018 22:27:30 +0000 Subject: [PATCH 02/12] Added link to ArchLinux AUR and Wiki --- docs/installation/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/installation/index.rst b/docs/installation/index.rst index bba58315e..683c3bc02 100644 --- a/docs/installation/index.rst +++ b/docs/installation/index.rst @@ -75,7 +75,7 @@ We also maintain an installation guide for Debian 9 and Arch Linux. Funkwhale packages are available for the following platforms: - `YunoHost 3 `_: https://github.com/YunoHost-Apps/funkwhale_ynh (kindly maintained by `@Jibec `_) - +- ArchLinux (as an AUR package): if you'd rather use a package, check out this alternative installation method on ArchLinux: https://wiki.archlinux.org/index.php/Funkwhale (package and wiki kindly maintained by getzee) Running Funkwhale on the develop branch --------------------------------------- From 325e5aae06d0703e14693b7f1e55e337e190885c Mon Sep 17 00:00:00 2001 From: Eliot Berriot Date: Mon, 26 Nov 2018 18:15:48 +0100 Subject: [PATCH 03/12] Fix #575: Documented which Subsonic endpoints are implemented --- changes/changelog.d/575.enhancement | 1 + docs/developpers/index.rst | 15 +++++++ docs/developpers/subsonic.rst | 70 +++++++++++++++++++++++++++++ docs/index.rst | 3 +- 4 files changed, 87 insertions(+), 2 deletions(-) create mode 100644 changes/changelog.d/575.enhancement create mode 100644 docs/developpers/index.rst create mode 100644 docs/developpers/subsonic.rst diff --git a/changes/changelog.d/575.enhancement b/changes/changelog.d/575.enhancement new file mode 100644 index 000000000..eb1781def --- /dev/null +++ b/changes/changelog.d/575.enhancement @@ -0,0 +1 @@ +Documented which Subsonic endpoints are implemented (#575) diff --git a/docs/developpers/index.rst b/docs/developpers/index.rst new file mode 100644 index 000000000..6a56edbe1 --- /dev/null +++ b/docs/developpers/index.rst @@ -0,0 +1,15 @@ +Developpers documentation +========================= + +This documentation is targeted primarily at developpers who want to understand +how Funkwhale work and how to build apps that integrate with Funkwhale's ecosystem. + +Reference +--------- + +.. toctree:: + :maxdepth: 2 + + ../api + ../federation/index + subsonic diff --git a/docs/developpers/subsonic.rst b/docs/developpers/subsonic.rst new file mode 100644 index 000000000..df269e956 --- /dev/null +++ b/docs/developpers/subsonic.rst @@ -0,0 +1,70 @@ +Subsonic API +============ + +Funkwhale implements a subset of the `Subsonic API `_ that makes it compatible +with various apps in the Subsonic ecosystem (See :doc:`../users/apps`). + +Supported endpoints +------------------- + +We seek the best compatibility with existing apps and wil eventually implement +all endpoints that match Funkwhale's feature set. However, the current implementation +do not include folder-based endpoints, as it does not match our internal model at all +and will require substantial effort to emulate. + +We'll try to keep this list up-to-date, but you can also browse `the relevant code +`_ +if needed. + +As of today, the following endpoints are implemented: + +- createPlaylist +- deletePlaylist +- getAlbum +- getAlbumList2 +- getArtist +- getArtistInfo2 +- getArtists +- getAvatar +- getCoverArt +- getIndexes +- getLicense +- getMusicFolders +- getPlaylist +- getPlaylists +- getRandomSongs +- getSong +- getStarred +- getStarred2 +- getUser +- ping +- scrobble +- search3 +- star +- stream +- unstar +- updatePlaylist + +We support both XML and JSON formats for all those endpoints. + +Additional properties +--------------------- + +Regardless of the endpoints, we always return those additional properties +in our payload, which you can use to adapt your client behaviour if needed: + +.. code-block:: json + + { + "subsonic-response": { + ... + "type": "funkwhale", + "funkwhaleVersion": "0.17" + } + } + +Testing a Subsonic app +---------------------- + +We maintain a demo server at https://demo.funkwhale.audio/, which you can use for +your tests. Example with the ping endpoint: https://demo.funkwhale.audio/rest/ping.view?f=json diff --git a/docs/index.rst b/docs/index.rst index ef02db64b..5eb505c3f 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -19,8 +19,7 @@ Funkwhale is a self-hosted, modern free and open-source music server, heavily in configuration troubleshooting importing-music - federation/index - api + developpers/index third-party contributing translators From 1da58f7015e866b289190b00249f8075e6f0b068 Mon Sep 17 00:00:00 2001 From: Eliot Berriot Date: Wed, 28 Nov 2018 19:56:56 +0100 Subject: [PATCH 04/12] Fix #626: Load env file in config/.env automatically to avoid sourcing it by hand --- api/config/settings/common.py | 31 +++++++++++++++++++++++++---- changes/changelog.d/626.enhancement | 10 ++++++++++ docs/installation/debian.rst | 13 ++---------- docs/upgrading/index.rst | 2 -- 4 files changed, 39 insertions(+), 17 deletions(-) create mode 100644 changes/changelog.d/626.enhancement diff --git a/api/config/settings/common.py b/api/config/settings/common.py index 4759d7aab..eb102954e 100644 --- a/api/config/settings/common.py +++ b/api/config/settings/common.py @@ -11,6 +11,8 @@ https://docs.djangoproject.com/en/dev/ref/settings/ from __future__ import absolute_import, unicode_literals import datetime +import logging + from urllib.parse import urlparse, urlsplit import environ @@ -18,14 +20,35 @@ from celery.schedules import crontab from funkwhale_api import __version__ +logger = logging.getLogger(__name__) ROOT_DIR = environ.Path(__file__) - 3 # (/a/b/myfile.py - 3 = /) APPS_DIR = ROOT_DIR.path("funkwhale_api") env = environ.Env() -try: - env.read_env(ROOT_DIR.file(".env")) -except FileNotFoundError: - pass +env_file = env("ENV_FILE", default=None) +if env_file: + # we have an explicitely specified env file + # so we try to load and it fail loudly if it does not exist + print("ENV_FILE", env_file) + env.read_env(env_file) +else: + # we try to load from .env and config/.env + # but do not crash if those files don't exist + paths = [ + # /srv/funwhale/api/.env + ROOT_DIR, + # /srv/funwhale/config/.env + ((ROOT_DIR - 1) + "config"), + ] + for path in paths: + try: + env_path = path.file(".env") + except FileNotFoundError: + logger.debug("No env file found at %s/.env", path) + continue + env.read_env(env_path) + logger.info("Loaded env file at %s/.env", path) + break FUNKWHALE_HOSTNAME = None FUNKWHALE_HOSTNAME_SUFFIX = env("FUNKWHALE_HOSTNAME_SUFFIX", default=None) diff --git a/changes/changelog.d/626.enhancement b/changes/changelog.d/626.enhancement new file mode 100644 index 000000000..8f2f20100 --- /dev/null +++ b/changes/changelog.d/626.enhancement @@ -0,0 +1,10 @@ +Load env file in config/.env automatically to avoid sourcing it by hand (#626) + +Automatically load .env file +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +On non-docker deployments, earlier versions required you to source +the config/.env file before launching any Funkwhale command, with ``export $(cat config/.env | grep -v ^# | xargs)`` +This led to more complex and error prode deployment / setup. + +This is not the case anymore, and Funkwhale will automatically load this file if it's available. diff --git a/docs/installation/debian.rst b/docs/installation/debian.rst index 1ce9d4a9e..1cd8ffffd 100644 --- a/docs/installation/debian.rst +++ b/docs/installation/debian.rst @@ -113,7 +113,7 @@ Then we'll download the frontend files: cd /srv rm -r funkwhale - git clone https://code.eliotberriot.com/funkwhale/funkwhale funkwhale + git clone -b master https://code.eliotberriot.com/funkwhale/funkwhale funkwhale cd funkwhale By default, the repository will use the ``develop`` which may be unstable thus not recommended for production instances (unless you know what your doing). You should use the master branch instead: @@ -227,18 +227,9 @@ Especially, populate the ``DATABASE_URL`` and ``CACHE_URL`` values based on how you configured your PostgreSQL and Redis servers in :doc:`external dependencies <./external_dependencies>`. - -When you want to run command on the API server, such as to create the -database or compile static files, you have to ensure you source -the environment variables in that file. - -This can be done like this:: - - export $(cat config/.env | grep -v ^# | xargs) - .. note:: - Remember to reload these variables whenever you edit your .env file. + The environment file at config/.env is loaded automatically by Funkwhale processes. Database setup --------------- diff --git a/docs/upgrading/index.rst b/docs/upgrading/index.rst index 08c8a5689..339274f9b 100644 --- a/docs/upgrading/index.rst +++ b/docs/upgrading/index.rst @@ -105,8 +105,6 @@ match what is described in :doc:`/installation/debian`: # update os dependencies sudo api/install_os_dependencies.sh install - # update python dependencies - source /srv/funkwhale/load_env sudo -u funkwhale -E /srv/funkwhale/virtualenv/bin/pip install -r api/requirements.txt # collect static files From 99359094e0236bcb44492b36adf8a83df036d069 Mon Sep 17 00:00:00 2001 From: Eliot Berriot Date: Mon, 10 Dec 2018 16:00:33 +0100 Subject: [PATCH 05/12] Point to new gitlab URL --- .gitlab-ci.yml | 4 ++-- CHANGELOG | 10 +++++----- CONTRIBUTING.rst | 6 +++--- TRANSLATORS.rst | 4 ++-- .../music/management/commands/import_files.py | 2 +- demo/README.md | 2 +- demo/setup.sh | 10 +++++----- deploy/docker.funkwhale_proxy.conf | 2 +- docs/developpers/subsonic.rst | 2 +- docs/federation/index.rst | 6 +++--- docs/importing-music.rst | 4 ++-- docs/installation/debian.rst | 8 ++++---- docs/installation/docker.rst | 8 ++++---- docs/installation/index.rst | 16 ++++++++-------- docs/installation/systemd.rst | 8 ++++---- docs/troubleshooting.rst | 4 ++-- docs/upgrading/0.17.rst | 2 +- docs/upgrading/index.rst | 8 ++++---- front/scripts/i18n-weblate-to-origin.sh | 2 +- scripts/clean-unused-artifacts.py | 2 +- 20 files changed, 55 insertions(+), 55 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c7a43c940..213c63ce9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -27,7 +27,7 @@ review_front: - yarn install - yarn run i18n-compile # this is to ensure we don't have any errors in the output, - # cf https://code.eliotberriot.com/funkwhale/funkwhale/issues/169 + # cf https://dev.funkwhale.audio/funkwhale/funkwhale/issues/169 - VUE_APP_INSTANCE_URL=$REVIEW_INSTANCE_URL yarn run build | tee /dev/stderr | (! grep -i 'ERROR in') - mkdir -p /static/front/$CI_PROJECT_PATH_SLUG-$CI_BUILD_REF_SLUG - cp -r dist/* /static/front/$CI_PROJECT_PATH_SLUG-$CI_BUILD_REF_SLUG @@ -191,7 +191,7 @@ build_front: - yarn install - yarn run i18n-compile # this is to ensure we don't have any errors in the output, - # cf https://code.eliotberriot.com/funkwhale/funkwhale/issues/169 + # cf https://dev.funkwhale.audio/funkwhale/funkwhale/issues/169 - yarn build | tee /dev/stderr | (! grep -i 'ERROR in') - chmod -R 755 dist cache: diff --git a/CHANGELOG b/CHANGELOG index bff6dff2d..caef7fc67 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,7 +4,7 @@ Changelog You can subscribe to release announcements by: - Following `funkwhale@mastodon.eliotberriot.com `_ on Mastodon -- Subscribing to the following Atom feed: https://code.eliotberriot.com/funkwhale/funkwhale/commits/develop?format=atom&search=Merge+tag +- Subscribing to the following Atom feed: https://dev.funkwhale.audio/funkwhale/funkwhale/commits/develop?format=atom&search=Merge+tag This changelog is viewable on the web at https://docs.funkwhale.audio/changelog.html. @@ -149,8 +149,8 @@ Download the required configuration files for the nginx container: cd /srv/funkwhale mkdir nginx - curl -L -o nginx/funkwhale.template "https://code.eliotberriot.com/funkwhale/funkwhale/raw/|version|/deploy/docker.nginx.template" - curl -L -o nginx/funkwhale_proxy.conf "https://code.eliotberriot.com/funkwhale/funkwhale/raw/|version|/deploy/funkwhale_proxy.conf" + curl -L -o nginx/funkwhale.template "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/|version|/deploy/docker.nginx.template" + curl -L -o nginx/funkwhale_proxy.conf "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/|version|/deploy/funkwhale_proxy.conf" Update the funkwhale.conf configuration of your server's reverse-proxy:: @@ -788,7 +788,7 @@ it to work Apache2, for instance. It was also not compatible with Subsonic clien Based on that, we're currently removing support for transcoding **in its current state**. The work on a better designed transcoding feature -can be tracked in https://code.eliotberriot.com/funkwhale/funkwhale/issues/272. +can be tracked in https://dev.funkwhale.audio/funkwhale/funkwhale/issues/272. You don't have to do anything on your side, but you may want to remove the now obsolete configuration from your reverse proxy file (nginx only):: @@ -1562,7 +1562,7 @@ information periodically. Celery beat can be enabled easily:: - curl -L -o "/etc/systemd/system/funkwhale-beat.service" "https://code.eliotberriot.com/funkwhale/funkwhale/raw/develop/deploy/funkwhale-beat.service" + curl -L -o "/etc/systemd/system/funkwhale-beat.service" "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/develop/deploy/funkwhale-beat.service" # Also edit /etc/systemd/system/funkwhale.target # and ensure the Wants= line contains the following: # Wants=funkwhale-server.service funkwhale-worker.service funkwhale-beat.service diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 0c2bd5bbd..65557e354 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -31,7 +31,7 @@ Setup front-end only development environment 1. Clone the repository:: - git clone ssh://git@code.eliotberriot.com:2222/funkwhale/funkwhale.git + git clone ssh://git@dev.funkwhale.audio:2222/funkwhale/funkwhale.git cd funkwhale cd front @@ -73,9 +73,9 @@ This is already cover in the relevant documentations: Cloning the project ^^^^^^^^^^^^^^^^^^^ -Visit https://code.eliotberriot.com/funkwhale/funkwhale and clone the repository using SSH or HTTPS. Exemple using SSH:: +Visit https://dev.funkwhale.audio/funkwhale/funkwhale and clone the repository using SSH or HTTPS. Exemple using SSH:: - git clone ssh://git@code.eliotberriot.com:2222/funkwhale/funkwhale.git + git clone ssh://git@dev.funkwhale.audio:2222/funkwhale/funkwhale.git cd funkwhale diff --git a/TRANSLATORS.rst b/TRANSLATORS.rst index f20150995..5e2cf51f7 100644 --- a/TRANSLATORS.rst +++ b/TRANSLATORS.rst @@ -6,7 +6,7 @@ you found the proper place :) Translation is done via our own Weblate instance at https://translate.funkwhale.audio/projects/funkwhale/front/. -You can signup/login using your Gitlab account (from https://code.eliotberriot.com). +You can signup/login using your Gitlab account (from https://dev.funkwhale.audio). Translation workflow -------------------- @@ -25,4 +25,4 @@ Requesting a new language ------------------------- If you'd like to see a new language in Funkwhale, please open an issue here: -https://code.eliotberriot.com/funkwhale/funkwhale/issues +https://dev.funkwhale.audio/funkwhale/funkwhale/issues diff --git a/api/funkwhale_api/music/management/commands/import_files.py b/api/funkwhale_api/music/management/commands/import_files.py index af5d2cee2..541b60886 100644 --- a/api/funkwhale_api/music/management/commands/import_files.py +++ b/api/funkwhale_api/music/management/commands/import_files.py @@ -143,7 +143,7 @@ class Command(BaseCommand): for m in raw_matching: # In some situations, the path is encoded incorrectly on the filesystem # so we filter out faulty paths and display a warning to the user. - # see https://code.eliotberriot.com/funkwhale/funkwhale/issues/138 + # see https://dev.funkwhale.audio/funkwhale/funkwhale/issues/138 try: m.encode("utf-8") matching.append(m) diff --git a/demo/README.md b/demo/README.md index 1fb13b5a1..0577b44f1 100644 --- a/demo/README.md +++ b/demo/README.md @@ -11,7 +11,7 @@ This setup requires Docker and docker-compose. You can use your own music (put it in `/usr/share/music`, this is the directory the demo will look into by default). -If you don't have any music, you can use the repository https://code.eliotberriot.com/funkwhale/catalog, which +If you don't have any music, you can use the repository https://dev.funkwhale.audio/funkwhale/catalog, which requires Git LFS. ## Create an env file diff --git a/demo/setup.sh b/demo/setup.sh index a19f6a7d4..c8801816e 100755 --- a/demo/setup.sh +++ b/demo/setup.sh @@ -10,14 +10,14 @@ cd $demo_path sudo rm -rf $demo_path/* mkdir -p $demo_path echo 'Downloading demo files...' -curl -L -o docker-compose.yml "https://code.eliotberriot.com/funkwhale/funkwhale/raw/$version/deploy/docker-compose.yml" -curl -L -o .env "https://code.eliotberriot.com/funkwhale/funkwhale/raw/$version/deploy/env.prod.sample" +curl -L -o docker-compose.yml "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/$version/deploy/docker-compose.yml" +curl -L -o .env "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/$version/deploy/env.prod.sample" mkdir nginx -curl -L -o nginx/funkwhale.template "https://code.eliotberriot.com/funkwhale/funkwhale/raw/$version/deploy/docker.nginx.template" -curl -L -o nginx/funkwhale_proxy.conf "https://code.eliotberriot.com/funkwhale/funkwhale/raw/$version/deploy/funkwhale_proxy.conf" +curl -L -o nginx/funkwhale.template "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/$version/deploy/docker.nginx.template" +curl -L -o nginx/funkwhale_proxy.conf "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/$version/deploy/funkwhale_proxy.conf" mkdir data/ -curl -L -o front.zip "https://code.eliotberriot.com/funkwhale/funkwhale/-/jobs/artifacts/$version/download?job=build_front" +curl -L -o front.zip "https://dev.funkwhale.audio/funkwhale/funkwhale/-/jobs/artifacts/$version/download?job=build_front" unzip front.zip cat $env_file >> .env diff --git a/deploy/docker.funkwhale_proxy.conf b/deploy/docker.funkwhale_proxy.conf index 08a080d58..a1b0a31e5 100644 --- a/deploy/docker.funkwhale_proxy.conf +++ b/deploy/docker.funkwhale_proxy.conf @@ -1,7 +1,7 @@ # use this one if you put the nginx container behind another proxy # you will have to set some headers on this proxy as well to ensure # everything works correctly, you can use the ones from the funkwhale_proxy.conf file -# at https://code.eliotberriot.com/funkwhale/funkwhale/blob/develop/deploy/funkwhale_proxy.conf +# at https://dev.funkwhale.audio/funkwhale/funkwhale/blob/develop/deploy/funkwhale_proxy.conf # your proxy will also need to support websockets real_ip_header X-Forwarded-For; diff --git a/docs/developpers/subsonic.rst b/docs/developpers/subsonic.rst index df269e956..394cb8afb 100644 --- a/docs/developpers/subsonic.rst +++ b/docs/developpers/subsonic.rst @@ -13,7 +13,7 @@ do not include folder-based endpoints, as it does not match our internal model a and will require substantial effort to emulate. We'll try to keep this list up-to-date, but you can also browse `the relevant code -`_ +`_ if needed. As of today, the following endpoints are implemented: diff --git a/docs/federation/index.rst b/docs/federation/index.rst index cbc8cd155..07f0f0b69 100644 --- a/docs/federation/index.rst +++ b/docs/federation/index.rst @@ -68,7 +68,7 @@ local and remote users. Links: -- `Federation models `_ +- `Federation models `_ Activity creation and delivery @@ -98,8 +98,8 @@ table, retrieve the audio cover, etc. Links: -- `Routing logic for activities `_ -- `Delivery logic for activities `_ +- `Routing logic for activities `_ +- `Delivery logic for activities `_ Supported activities diff --git a/docs/importing-music.rst b/docs/importing-music.rst index 965b2068c..1d0d2c646 100644 --- a/docs/importing-music.rst +++ b/docs/importing-music.rst @@ -138,8 +138,8 @@ under creative commons (courtesy of Jamendo): .. parsed-literal:: - curl -L -o download-tracks.sh "https://code.eliotberriot.com/funkwhale/funkwhale/raw/|version|/demo/download-tracks.sh" - curl -L -o music.txt "https://code.eliotberriot.com/funkwhale/funkwhale/raw/|version|/demo/music.txt" + curl -L -o download-tracks.sh "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/|version|/demo/download-tracks.sh" + curl -L -o music.txt "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/|version|/demo/music.txt" chmod +x download-tracks.sh ./download-tracks.sh music.txt diff --git a/docs/installation/debian.rst b/docs/installation/debian.rst index 1cd8ffffd..af41ef546 100644 --- a/docs/installation/debian.rst +++ b/docs/installation/debian.rst @@ -91,7 +91,7 @@ First, we'll download the latest api release. .. parsed-literal:: - curl -L -o "api-|version|.zip" "https://code.eliotberriot.com/funkwhale/funkwhale/-/jobs/artifacts/|version|/download?job=build_api" + curl -L -o "api-|version|.zip" "https://dev.funkwhale.audio/funkwhale/funkwhale/-/jobs/artifacts/|version|/download?job=build_api" unzip "api-|version|.zip" -d extracted mv extracted/api/* api/ rm -rf extracted @@ -101,7 +101,7 @@ Then we'll download the frontend files: .. parsed-literal:: - curl -L -o "front-|version|.zip" "https://code.eliotberriot.com/funkwhale/funkwhale/-/jobs/artifacts/|version|/download?job=build_front" + curl -L -o "front-|version|.zip" "https://dev.funkwhale.audio/funkwhale/funkwhale/-/jobs/artifacts/|version|/download?job=build_front" unzip "front-|version|.zip" -d extracted mv extracted/front . rm -rf extracted @@ -113,7 +113,7 @@ Then we'll download the frontend files: cd /srv rm -r funkwhale - git clone -b master https://code.eliotberriot.com/funkwhale/funkwhale funkwhale + git clone -b master https://dev.funkwhale.audio/funkwhale/funkwhale funkwhale cd funkwhale By default, the repository will use the ``develop`` which may be unstable thus not recommended for production instances (unless you know what your doing). You should use the master branch instead: @@ -211,7 +211,7 @@ Download the sample environment file: .. parsed-literal:: - curl -L -o config/.env "https://code.eliotberriot.com/funkwhale/funkwhale/raw/develop/deploy/env.prod.sample" + curl -L -o config/.env "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/develop/deploy/env.prod.sample" .. note:: diff --git a/docs/installation/docker.rst b/docs/installation/docker.rst index 8b594eaa3..63cda62be 100644 --- a/docs/installation/docker.rst +++ b/docs/installation/docker.rst @@ -11,16 +11,16 @@ Download the sample docker-compose file: cd /srv/funkwhale mkdir nginx - curl -L -o nginx/funkwhale.template "https://code.eliotberriot.com/funkwhale/funkwhale/raw/develop/deploy/docker.nginx.template" - curl -L -o nginx/funkwhale_proxy.conf "https://code.eliotberriot.com/funkwhale/funkwhale/raw/develop/deploy/funkwhale_proxy.conf" - curl -L -o docker-compose.yml "https://code.eliotberriot.com/funkwhale/funkwhale/raw/develop/deploy/docker-compose.yml" + curl -L -o nginx/funkwhale.template "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/develop/deploy/docker.nginx.template" + curl -L -o nginx/funkwhale_proxy.conf "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/develop/deploy/funkwhale_proxy.conf" + curl -L -o docker-compose.yml "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/develop/deploy/docker-compose.yml" Create your env file: .. parsed-literal:: export FUNKWHALE_VERSION="|version|" - curl -L -o .env "https://code.eliotberriot.com/funkwhale/funkwhale/raw/develop/deploy/env.prod.sample" + curl -L -o .env "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/develop/deploy/env.prod.sample" sed -i "s/FUNKWHALE_VERSION=latest/FUNKWHALE_VERSION=$FUNKWHALE_VERSION/" .env Ensure to edit it to match your needs (this file is heavily commented) diff --git a/docs/installation/index.rst b/docs/installation/index.rst index 683c3bc02..7df753b91 100644 --- a/docs/installation/index.rst +++ b/docs/installation/index.rst @@ -113,7 +113,7 @@ Files for the web frontend are purely static and can simply be downloaded, unzip .. parsed-literal:: cd /srv/funkwhale - curl -L -o front.zip "https://code.eliotberriot.com/funkwhale/funkwhale/builds/artifacts/|version|/download?job=build_front" + curl -L -o front.zip "https://dev.funkwhale.audio/funkwhale/funkwhale/builds/artifacts/|version|/download?job=build_front" unzip front.zip .. _reverse-proxy-setup: @@ -148,15 +148,15 @@ On docker deployments, run the following commands: .. code:: shell # download the needed files - curl -L -o /etc/nginx/funkwhale_proxy.conf "https://code.eliotberriot.com/funkwhale/funkwhale/raw/develop/deploy/funkwhale_proxy.conf" - curl -L -o /etc/nginx/sites-available/funkwhale.template "https://code.eliotberriot.com/funkwhale/funkwhale/raw/develop/deploy/docker.proxy.template" + curl -L -o /etc/nginx/funkwhale_proxy.conf "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/develop/deploy/funkwhale_proxy.conf" + curl -L -o /etc/nginx/sites-available/funkwhale.template "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/develop/deploy/docker.proxy.template" # create a final nginx configuration using the template based on your environment set -a && source /srv/funkwhale/.env && set +a envsubst "`env | awk -F = '{printf \" $%s\", $$1}'`" \ < /etc/nginx/sites-available/funkwhale.template \ > /etc/nginx/sites-available/funkwhale.conf - + ln -s /etc/nginx/sites-available/funkwhale.conf /etc/nginx/sites-enabled/ On non-docker deployments, run the following commands: @@ -164,15 +164,15 @@ On non-docker deployments, run the following commands: .. code:: shell # download the needed files - curl -L -o /etc/nginx/funkwhale_proxy.conf "https://code.eliotberriot.com/funkwhale/funkwhale/raw/develop/deploy/funkwhale_proxy.conf" - curl -L -o /etc/nginx/sites-available/funkwhale.template "https://code.eliotberriot.com/funkwhale/funkwhale/raw/develop/deploy/nginx.template" + curl -L -o /etc/nginx/funkwhale_proxy.conf "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/develop/deploy/funkwhale_proxy.conf" + curl -L -o /etc/nginx/sites-available/funkwhale.template "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/develop/deploy/nginx.template" # create a final nginx configuration using the template based on your environment set -a && source /srv/funkwhale/config/.env && set +a envsubst "`env | awk -F = '{printf \" $%s\", $$1}'`" \ < /etc/nginx/sites-available/funkwhale.template \ > /etc/nginx/sites-available/funkwhale.conf - + ln -s /etc/nginx/sites-available/funkwhale.conf /etc/nginx/sites-enabled/ .. note:: @@ -219,7 +219,7 @@ Then, download our sample virtualhost file: .. parsed-literal:: - curl -L -o /etc/apache2/sites-available/funkwhale.conf "https://code.eliotberriot.com/funkwhale/funkwhale/raw/|version|/deploy/apache.conf" + curl -L -o /etc/apache2/sites-available/funkwhale.conf "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/|version|/deploy/apache.conf" ln -s /etc/apache2/sites-available/funkwhale.conf /etc/apache2/sites-enabled/ You can tweak the configuration file according to your setup, especially the diff --git a/docs/installation/systemd.rst b/docs/installation/systemd.rst index f162cac7d..4f9aa0d18 100644 --- a/docs/installation/systemd.rst +++ b/docs/installation/systemd.rst @@ -10,10 +10,10 @@ First, download the sample unitfiles: .. parsed-literal:: - curl -L -o "/etc/systemd/system/funkwhale.target" "https://code.eliotberriot.com/funkwhale/funkwhale/raw/|version|/deploy/funkwhale.target" - curl -L -o "/etc/systemd/system/funkwhale-server.service" "https://code.eliotberriot.com/funkwhale/funkwhale/raw/|version|/deploy/funkwhale-server.service" - curl -L -o "/etc/systemd/system/funkwhale-worker.service" "https://code.eliotberriot.com/funkwhale/funkwhale/raw/|version|/deploy/funkwhale-worker.service" - curl -L -o "/etc/systemd/system/funkwhale-beat.service" "https://code.eliotberriot.com/funkwhale/funkwhale/raw/|version|/deploy/funkwhale-beat.service" + curl -L -o "/etc/systemd/system/funkwhale.target" "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/|version|/deploy/funkwhale.target" + curl -L -o "/etc/systemd/system/funkwhale-server.service" "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/|version|/deploy/funkwhale-server.service" + curl -L -o "/etc/systemd/system/funkwhale-worker.service" "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/|version|/deploy/funkwhale-worker.service" + curl -L -o "/etc/systemd/system/funkwhale-beat.service" "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/|version|/deploy/funkwhale-beat.service" This will download three unitfiles: diff --git a/docs/troubleshooting.rst b/docs/troubleshooting.rst index 323bb6443..db9a1abef 100644 --- a/docs/troubleshooting.rst +++ b/docs/troubleshooting.rst @@ -194,7 +194,7 @@ Here are a few recommendations on how to structure and what to include in your h - Give us as much context as possible about your installation (OS, version, Docker/non-docker, reverse-proxy type, relevant logs and errors, etc.) - Including screenshots or small gifs or videos can help us considerably when debugging front-end issues -You can also open issues on our `issue tracker `_. Please have a quick look for +You can also open issues on our `issue tracker `_. Please have a quick look for similar issues before doing that, and use the issue tracker only to report bugs, suggest enhancements (both in the software and the documentation) or new features. .. warning:: @@ -208,5 +208,5 @@ Improving this documentation ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ If you feel like something should be improved in this document (and in the documentation in general), feel free to `edit -it `_ and open a Merge Request. If you lack time or skills +it `_ and open a Merge Request. If you lack time or skills to do that, you can open an issue to discuss that, and someone else will do it. diff --git a/docs/upgrading/0.17.rst b/docs/upgrading/0.17.rst index 1414b563e..acd2d366b 100644 --- a/docs/upgrading/0.17.rst +++ b/docs/upgrading/0.17.rst @@ -12,7 +12,7 @@ Overview of the changes .. note:: - The what and why are described more thoroughly in this page: https://code.eliotberriot.com/funkwhale/funkwhale/merge_requests/368 + The what and why are described more thoroughly in this page: https://dev.funkwhale.audio/funkwhale/funkwhale/merge_requests/368 To sum it up, this release big completely changes the way audio content is managed in Funkwhale. As you may guess, this has a huge impact on the whole project, because audio is at the diff --git a/docs/upgrading/index.rst b/docs/upgrading/index.rst index 339274f9b..084229258 100644 --- a/docs/upgrading/index.rst +++ b/docs/upgrading/index.rst @@ -45,8 +45,8 @@ easy: # Load your environment variables source .env # Download newest nginx configuration file - curl -L -o nginx/funkwhale.template "https://code.eliotberriot.com/funkwhale/funkwhale/raw/develop/deploy/docker.nginx.template" - curl -L -o nginx/funkwhale_proxy.conf "https://code.eliotberriot.com/funkwhale/funkwhale/raw/develop/deploy/funkwhale_proxy.conf" + curl -L -o nginx/funkwhale.template "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/develop/deploy/docker.nginx.template" + curl -L -o nginx/funkwhale_proxy.conf "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/develop/deploy/funkwhale_proxy.conf" # Pull the new version containers docker-compose pull # Apply the database migrations @@ -81,7 +81,7 @@ The following example assume your setup match :ref:`frontend-setup`. # this assumes you want to upgrade to version "|version|" export FUNKWHALE_VERSION="|version|" cd /srv/funkwhale - sudo -u funkwhale curl -L -o front.zip "https://code.eliotberriot.com/funkwhale/funkwhale/builds/artifacts/$FUNKWHALE_VERSION/download?job=build_front" + sudo -u funkwhale curl -L -o front.zip "https://dev.funkwhale.audio/funkwhale/funkwhale/builds/artifacts/$FUNKWHALE_VERSION/download?job=build_front" sudo -u funkwhale unzip -o front.zip sudo -u funkwhale rm front.zip @@ -98,7 +98,7 @@ match what is described in :doc:`/installation/debian`: cd /srv/funkwhale # download more recent API files - sudo -u funkwhale curl -L -o "api-$FUNKWHALE_VERSION.zip" "https://code.eliotberriot.com/funkwhale/funkwhale/-/jobs/artifacts/$FUNKWHALE_VERSION/download?job=build_api" + sudo -u funkwhale curl -L -o "api-$FUNKWHALE_VERSION.zip" "https://dev.funkwhale.audio/funkwhale/funkwhale/-/jobs/artifacts/$FUNKWHALE_VERSION/download?job=build_api" sudo -u funkwhale unzip "api-$FUNKWHALE_VERSION.zip" -d extracted sudo -u funkwhale rm -rf api/ && mv extracted/api . sudo -u funkwhale rm -rf extracted diff --git a/front/scripts/i18n-weblate-to-origin.sh b/front/scripts/i18n-weblate-to-origin.sh index 6150ff569..7edd4ad9c 100755 --- a/front/scripts/i18n-weblate-to-origin.sh +++ b/front/scripts/i18n-weblate-to-origin.sh @@ -9,4 +9,4 @@ git reset --hard weblate/develop git push -f origin $integration_branch echo "Branch created on pushed on origin/$integration_branch" -echo "Open a merge request by visiting https://code.eliotberriot.com/funkwhale/funkwhale/merge_requests/new?merge_request%5Bsource_branch%5D=$integration_branch" +echo "Open a merge request by visiting https://dev.funkwhale.audio/funkwhale/funkwhale/merge_requests/new?merge_request%5Bsource_branch%5D=$integration_branch" diff --git a/scripts/clean-unused-artifacts.py b/scripts/clean-unused-artifacts.py index d38373b30..097ed35ce 100644 --- a/scripts/clean-unused-artifacts.py +++ b/scripts/clean-unused-artifacts.py @@ -2,7 +2,7 @@ import gitlab TOKEN = "CHANGEME" CLEAN_BEFORE = "2018-07" -gl = gitlab.Gitlab("https://code.eliotberriot.com", private_token=TOKEN, per_page=100) +gl = gitlab.Gitlab("https://dev.funkwhale.audio", private_token=TOKEN, per_page=100) project = gl.projects.get("funkwhale/funkwhale") jobs = project.jobs.list(as_list=False) From cb7aa5a642156f430f054e4ebbf944e2eeb7f7fd Mon Sep 17 00:00:00 2001 From: Eliot Berriot Date: Mon, 10 Dec 2018 16:24:28 +0100 Subject: [PATCH 06/12] Document additionnal apt packages that are needed for debian install --- docs/installation/debian.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/installation/debian.rst b/docs/installation/debian.rst index af41ef546..fae23ad9c 100644 --- a/docs/installation/debian.rst +++ b/docs/installation/debian.rst @@ -22,7 +22,7 @@ default on system. On Debian-like systems, you can install them using: .. code-block:: shell sudo apt-get update - sudo apt-get install curl python3-pip python3-venv git unzip + sudo apt-get install curl python3-pip python3-venv git unzip libldap2-dev libsasl2-dev On Arch Linux and its derivatives: From 563f182875beb0be6cf68a438a3916df27ed9b38 Mon Sep 17 00:00:00 2001 From: Eliot Berriot Date: Tue, 11 Dec 2018 10:53:19 +0100 Subject: [PATCH 07/12] Install wheel in the virtualenv --- docs/installation/debian.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/installation/debian.rst b/docs/installation/debian.rst index fae23ad9c..f3235fe0a 100644 --- a/docs/installation/debian.rst +++ b/docs/installation/debian.rst @@ -168,12 +168,11 @@ To avoid collisions with other software on your system, Python dependencies will be installed in a dedicated `virtualenv `_. -First, create the virtualenv and install wheel: +First, create the virtualenv: .. code-block:: shell python3 -m venv /srv/funkwhale/virtualenv - pip3 install wheel This will result in a ``virtualenv`` directory being created in ``/srv/funkwhale/virtualenv``. @@ -191,6 +190,7 @@ Finally, install the python dependencies: .. code-block:: shell + pip install wheel pip install -r api/requirements.txt .. important:: From 964a240cbae3a3095efd6e42281b564cef603229 Mon Sep 17 00:00:00 2001 From: Eliot Berriot Date: Wed, 12 Dec 2018 09:58:07 +0100 Subject: [PATCH 08/12] Update debian.rst --- docs/installation/debian.rst | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/installation/debian.rst b/docs/installation/debian.rst index f3235fe0a..77efda723 100644 --- a/docs/installation/debian.rst +++ b/docs/installation/debian.rst @@ -212,6 +212,9 @@ Download the sample environment file: .. parsed-literal:: curl -L -o config/.env "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/develop/deploy/env.prod.sample" + # symlink it so it's sourced automatically by the API process + # (This won't be needed anymore once release 0.18 is out) + ln -s /srv/funkwhale/config/.env /srv/funkwhale/api/.env .. note:: @@ -227,10 +230,6 @@ Especially, populate the ``DATABASE_URL`` and ``CACHE_URL`` values based on how you configured your PostgreSQL and Redis servers in :doc:`external dependencies <./external_dependencies>`. -.. note:: - - The environment file at config/.env is loaded automatically by Funkwhale processes. - Database setup --------------- From ad5fa9dfe11bcedc63b178ead6599c3cc709188d Mon Sep 17 00:00:00 2001 From: Nathanael Date: Sun, 25 Nov 2018 16:53:44 +0000 Subject: [PATCH 09/12] Update docker.rst --- docs/installation/docker.rst | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/docs/installation/docker.rst b/docs/installation/docker.rst index 63cda62be..255d2d322 100644 --- a/docs/installation/docker.rst +++ b/docs/installation/docker.rst @@ -3,18 +3,30 @@ Docker installation Docker is the easiest way to get a Funkwhale instance up and running. -First, ensure you have `Docker `_ and `docker-compose `_ installed. +First, ensure you have `Docker `_ and `docker-compose `_ installed. Download the sample docker-compose file: .. parsed-literal:: + mkdir /srv/funkwhale cd /srv/funkwhale mkdir nginx curl -L -o nginx/funkwhale.template "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/develop/deploy/docker.nginx.template" curl -L -o nginx/funkwhale_proxy.conf "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/develop/deploy/funkwhale_proxy.conf" curl -L -o docker-compose.yml "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/develop/deploy/docker-compose.yml" +At this point, the archticture of ``/srv/funkwhale`` should look like that: + +:: + + . + ├── docker-compose.yml + ├── .env + └── nginx + ├── funkwhale_proxy.conf + └── funkwhale.template + Create your env file: .. parsed-literal:: @@ -22,8 +34,10 @@ Create your env file: export FUNKWHALE_VERSION="|version|" curl -L -o .env "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/develop/deploy/env.prod.sample" sed -i "s/FUNKWHALE_VERSION=latest/FUNKWHALE_VERSION=$FUNKWHALE_VERSION/" .env + sudo nano .env -Ensure to edit it to match your needs (this file is heavily commented) +Ensure to edit it to match your needs (this file is heavily commented), in particular ``DJANGO_SECRET_KEY`` and ``FUNKWHALE_HOSTNAME``. +You should take a look at the `configuration reference `_ for more detailed information regarding each setting. Then, you should be able to pull the required images: From f4b7dd651873827a83d83350736ae1578f51c5a5 Mon Sep 17 00:00:00 2001 From: Eliot Berriot Date: Wed, 19 Dec 2018 10:21:27 +0100 Subject: [PATCH 10/12] Fix #642: Deploy documentation from the master branch instead of the develop branch to avoid inconsistencies --- .gitlab-ci.yml | 2 +- changes/changelog.d/642.documentation | 1 + docs/installation/debian.rst | 2 +- docs/installation/docker.rst | 8 ++++---- docs/installation/index.rst | 8 ++++---- 5 files changed, 11 insertions(+), 10 deletions(-) create mode 100644 changes/changelog.d/642.documentation diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 213c63ce9..e930ccc76 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -230,7 +230,7 @@ pages: paths: - public only: - - develop@funkwhale/funkwhale + - master@funkwhale/funkwhale tags: - docker diff --git a/changes/changelog.d/642.documentation b/changes/changelog.d/642.documentation new file mode 100644 index 000000000..e93dca7b1 --- /dev/null +++ b/changes/changelog.d/642.documentation @@ -0,0 +1 @@ +Deploy documentation from the master branch instead of the develop branch to avoid inconsistencies (#642) diff --git a/docs/installation/debian.rst b/docs/installation/debian.rst index 77efda723..369cc6762 100644 --- a/docs/installation/debian.rst +++ b/docs/installation/debian.rst @@ -211,7 +211,7 @@ Download the sample environment file: .. parsed-literal:: - curl -L -o config/.env "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/develop/deploy/env.prod.sample" + curl -L -o config/.env "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/master/deploy/env.prod.sample" # symlink it so it's sourced automatically by the API process # (This won't be needed anymore once release 0.18 is out) ln -s /srv/funkwhale/config/.env /srv/funkwhale/api/.env diff --git a/docs/installation/docker.rst b/docs/installation/docker.rst index 255d2d322..13403574d 100644 --- a/docs/installation/docker.rst +++ b/docs/installation/docker.rst @@ -12,9 +12,9 @@ Download the sample docker-compose file: mkdir /srv/funkwhale cd /srv/funkwhale mkdir nginx - curl -L -o nginx/funkwhale.template "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/develop/deploy/docker.nginx.template" - curl -L -o nginx/funkwhale_proxy.conf "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/develop/deploy/funkwhale_proxy.conf" - curl -L -o docker-compose.yml "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/develop/deploy/docker-compose.yml" + curl -L -o nginx/funkwhale.template "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/master/deploy/docker.nginx.template" + curl -L -o nginx/funkwhale_proxy.conf "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/master/deploy/funkwhale_proxy.conf" + curl -L -o docker-compose.yml "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/master/deploy/docker-compose.yml" At this point, the archticture of ``/srv/funkwhale`` should look like that: @@ -32,7 +32,7 @@ Create your env file: .. parsed-literal:: export FUNKWHALE_VERSION="|version|" - curl -L -o .env "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/develop/deploy/env.prod.sample" + curl -L -o .env "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/master/deploy/env.prod.sample" sed -i "s/FUNKWHALE_VERSION=latest/FUNKWHALE_VERSION=$FUNKWHALE_VERSION/" .env sudo nano .env diff --git a/docs/installation/index.rst b/docs/installation/index.rst index 7df753b91..0d5412a20 100644 --- a/docs/installation/index.rst +++ b/docs/installation/index.rst @@ -148,8 +148,8 @@ On docker deployments, run the following commands: .. code:: shell # download the needed files - curl -L -o /etc/nginx/funkwhale_proxy.conf "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/develop/deploy/funkwhale_proxy.conf" - curl -L -o /etc/nginx/sites-available/funkwhale.template "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/develop/deploy/docker.proxy.template" + curl -L -o /etc/nginx/funkwhale_proxy.conf "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/master/deploy/funkwhale_proxy.conf" + curl -L -o /etc/nginx/sites-available/funkwhale.template "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/master/deploy/docker.proxy.template" # create a final nginx configuration using the template based on your environment set -a && source /srv/funkwhale/.env && set +a @@ -164,8 +164,8 @@ On non-docker deployments, run the following commands: .. code:: shell # download the needed files - curl -L -o /etc/nginx/funkwhale_proxy.conf "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/develop/deploy/funkwhale_proxy.conf" - curl -L -o /etc/nginx/sites-available/funkwhale.template "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/develop/deploy/nginx.template" + curl -L -o /etc/nginx/funkwhale_proxy.conf "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/master/deploy/funkwhale_proxy.conf" + curl -L -o /etc/nginx/sites-available/funkwhale.template "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/master/deploy/nginx.template" # create a final nginx configuration using the template based on your environment set -a && source /srv/funkwhale/config/.env && set +a From 2adc62c8d4f8e9c5f5bccf3f47269e995212dd4a Mon Sep 17 00:00:00 2001 From: Eliot Berriot Date: Wed, 19 Dec 2018 10:24:53 +0100 Subject: [PATCH 11/12] Linting issues --- api/funkwhale_api/common/search.py | 2 +- api/tests/test_import_audio_file.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/funkwhale_api/common/search.py b/api/funkwhale_api/common/search.py index 5fc6f6804..70aecd632 100644 --- a/api/funkwhale_api/common/search.py +++ b/api/funkwhale_api/common/search.py @@ -3,7 +3,7 @@ import re from django.db.models import Q -QUERY_REGEX = re.compile('(((?P\w+):)?(?P"[^"]+"|[\S]+))') +QUERY_REGEX = re.compile(r'(((?P\w+):)?(?P"[^"]+"|[\S]+))') def parse_query(query): diff --git a/api/tests/test_import_audio_file.py b/api/tests/test_import_audio_file.py index ce6aebbc3..c6b8aea60 100644 --- a/api/tests/test_import_audio_file.py +++ b/api/tests/test_import_audio_file.py @@ -134,7 +134,7 @@ def test_import_files_skip_if_path_already_imported(factories, mocker): ) call_command( - "import_files", str(library.uuid), path, async=False, interactive=False + "import_files", str(library.uuid), path, async_=False, interactive=False ) assert library.uploads.count() == 1 From ee94e69f7d936eaa3fac8d986ee80011e7da6e54 Mon Sep 17 00:00:00 2001 From: Eliot Berriot Date: Wed, 19 Dec 2018 10:33:56 +0100 Subject: [PATCH 12/12] Removed unused port in contributing documentation --- CONTRIBUTING.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 65557e354..c7534c776 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -31,7 +31,7 @@ Setup front-end only development environment 1. Clone the repository:: - git clone ssh://git@dev.funkwhale.audio:2222/funkwhale/funkwhale.git + git clone ssh://git@dev.funkwhale.audio/funkwhale/funkwhale.git cd funkwhale cd front