feat: prefer using the funkwhale-manage entrypoint
This replaces `poetry run python3 manage.py` with `venv/bin/funkwhale-manage`. Command running `venv/bin/funkwhale-manage` assume the current working directory is `/srv/funkwhale` on common deployments. In the funkwhale api docker image, the funwhale-manage command line interface is available globally.
This commit is contained in:
parent
75c9b1eabe
commit
14b5e137bd
|
@ -260,9 +260,9 @@ build_openapi_schema:
|
|||
- cd api
|
||||
- pip3 install poetry
|
||||
- poetry install
|
||||
- poetry run python3 manage.py migrate
|
||||
- poetry run funkwhale-manage migrate
|
||||
script:
|
||||
- poetry run python3 manage.py spectacular --file ../docs/schema.yml
|
||||
- poetry run funkwhale-manage spectacular --file ../docs/schema.yml
|
||||
artifacts:
|
||||
expire_in: 2 weeks
|
||||
paths:
|
||||
|
|
|
@ -18,8 +18,8 @@ tasks:
|
|||
|
||||
gp ports await 5432
|
||||
|
||||
poetry run python3 manage.py migrate
|
||||
poetry run python3 manage.py gitpod init
|
||||
poetry run funkwhale-manage migrate
|
||||
poetry run funkwhale-manage gitpod init
|
||||
command: |
|
||||
echo "MEDIA_URL=`gp url 8000`/media/" >> ../.gitpod/.env
|
||||
echo "STATIC_URL=`gp url 8000`/staticfiles/" >> ../.gitpod/.env
|
||||
|
@ -28,8 +28,8 @@ tasks:
|
|||
|
||||
docker-compose up -d
|
||||
gp ports await 5432
|
||||
poetry run python3 manage.py collectstatic --no-input
|
||||
poetry run python3 manage.py gitpod dev
|
||||
poetry run funkwhale-manage collectstatic --no-input
|
||||
poetry run funkwhale-manage gitpod dev
|
||||
|
||||
- name: Celery Worker
|
||||
env:
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
set -eux
|
||||
|
||||
python3 /app/manage.py collectstatic --noinput
|
||||
python3 /app/manage.py migrate
|
||||
funkwhale-manage collectstatic --noinput
|
||||
funkwhale-manage migrate
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
gunicorn config.asgi:application \
|
||||
|
|
|
@ -26,7 +26,7 @@ class Command(BaseCommand):
|
|||
script = available_scripts[name]
|
||||
except KeyError:
|
||||
raise CommandError(
|
||||
"{} is not a valid script. Run python3 manage.py script for a "
|
||||
"{} is not a valid script. Run funkwhale-manage for a "
|
||||
"list of available scripts".format(name)
|
||||
)
|
||||
|
||||
|
@ -43,7 +43,7 @@ class Command(BaseCommand):
|
|||
def show_help(self):
|
||||
self.stdout.write("")
|
||||
self.stdout.write("Available scripts:")
|
||||
self.stdout.write("Launch with: python3 manage.py <script_name>")
|
||||
self.stdout.write("Launch with: funkwhale-manage <script_name>")
|
||||
available_scripts = self.get_scripts()
|
||||
for name, script in sorted(available_scripts.items()):
|
||||
self.stdout.write("")
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Prefer using the funkwhale-manage entrypoint
|
2
dev.yml
2
dev.yml
|
@ -55,7 +55,7 @@ services:
|
|||
install_dev_deps: 1
|
||||
image: funkwhale-api
|
||||
command: >
|
||||
bash -c "python3 manage.py collectstatic --no-input
|
||||
bash -c "funkwhale-manage collectstatic --no-input
|
||||
&& uvicorn --reload config.asgi:application --host 0.0.0.0 --port 5000 --reload-dir config/ --reload-dir=funkwhale_api/"
|
||||
volumes:
|
||||
- ./api:/app
|
||||
|
|
|
@ -10,7 +10,7 @@ Your instance URL is your pod's unique identifier in the {term}`fediverse`. If y
|
|||
- The instance URL in your webserver config.
|
||||
- Any references to the old URL in your database.
|
||||
|
||||
To clean the database, the {file}`manage.py` script contains a `fix_federation_ids` command.
|
||||
To clean the database, the `funkwhale-manage` command line interface contains a `fix_federation_ids` command.
|
||||
|
||||
```{warning}
|
||||
Running `fix_federation_ids` with the `--no-dry-run` flag is irreversible. Make sure you [back up your data](../upgrade_docs/backup.md).
|
||||
|
@ -28,7 +28,7 @@ Running `fix_federation_ids` with the `--no-dry-run` flag is irreversible. Make
|
|||
:sync: debian
|
||||
|
||||
```{code-block} sh
|
||||
poetry run python3 manage.py fix_federation_ids https://old-url https://new-url --no-dry-run --no-input
|
||||
venv/bin/funkwhale-manage fix_federation_ids https://old-url https://new-url --no-dry-run --no-input
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -37,7 +37,7 @@ Running `fix_federation_ids` with the `--no-dry-run` flag is irreversible. Make
|
|||
:sync: docker
|
||||
|
||||
```{code-block} sh
|
||||
docker-compose run --rm api python3 manage.py fix_federation_ids https://old-url https://new-url --no-dry-run --no-input
|
||||
docker-compose run --rm api funkwhale-manage fix_federation_ids https://old-url https://new-url --no-dry-run --no-input
|
||||
```
|
||||
|
||||
:::
|
||||
|
|
|
@ -90,7 +90,7 @@ To make the job of writing and debugging MRF policies easier, we provide a manag
|
|||
:sync: debian
|
||||
|
||||
```{code-block} sh
|
||||
poetry run python3 manage.py mrf_check --list
|
||||
venv/bin/funkwhale-manage mrf_check --list
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -99,7 +99,7 @@ To make the job of writing and debugging MRF policies easier, we provide a manag
|
|||
:sync: docker
|
||||
|
||||
```{code-block} sh
|
||||
docker-compose run --rm api python3 manage.py mrf_check --list
|
||||
docker-compose run --rm api funkwhale-manage mrf_check --list
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -114,7 +114,7 @@ To make the job of writing and debugging MRF policies easier, we provide a manag
|
|||
|
||||
```{code-block} sh
|
||||
export MRF_MESSAGE='{"actor": "https://normal.domain/@alice", "type": "Create", "object": {"type": "Follow"}}'
|
||||
echo $MRF_MESSAGE | poetry run python3 manage.py mrf_check inbox - -p blocked_follow_domains
|
||||
echo $MRF_MESSAGE | venv/bin/funkwhale-manage mrf_check inbox - -p blocked_follow_domains
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -124,7 +124,7 @@ To make the job of writing and debugging MRF policies easier, we provide a manag
|
|||
|
||||
```{code-block} sh
|
||||
export MRF_MESSAGE='{"actor": "https://normal.domain/@alice", "type": "Create", "object": {"type": "Follow"}}'
|
||||
echo $MRF_MESSAGE | docker-compose run --rm api python3 manage.py mrf_check inbox - -p blocked_follow_domains
|
||||
echo $MRF_MESSAGE | docker-compose run --rm api funkwhale-manage mrf_check inbox - -p blocked_follow_domains
|
||||
```
|
||||
|
||||
::::
|
||||
|
@ -138,7 +138,7 @@ To make the job of writing and debugging MRF policies easier, we provide a manag
|
|||
|
||||
```{code-block} sh
|
||||
export MRF_MESSAGE='{"actor": "https://botdomain.org/@bob", "type": "Create", "object": {"type": "Follow"}}'
|
||||
echo $MRF_MESSAGE | poetry run python3 manage.py mrf_check inbox - -p blocked_follow_domains
|
||||
echo $MRF_MESSAGE | venv/bin/funkwhale-manage mrf_check inbox - -p blocked_follow_domains
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -148,7 +148,7 @@ To make the job of writing and debugging MRF policies easier, we provide a manag
|
|||
|
||||
```{code-block} sh
|
||||
export MRF_MESSAGE='{"actor": "https://botdomain.org/@bob", "type": "Create", "object": {"type": "Follow"}}'
|
||||
echo $MRF_MESSAGE | docker-compose run --rm api python3 manage.py mrf_check inbox - -p blocked_follow_domains
|
||||
echo $MRF_MESSAGE | docker-compose run --rm api funkwhale-manage mrf_check inbox - -p blocked_follow_domains
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -163,7 +163,7 @@ To make the job of writing and debugging MRF policies easier, we provide a manag
|
|||
|
||||
```{code-block} sh
|
||||
export ACTIVITY_UUID="06208aea-c687-4e8b-aefd-22f1c3f76039"
|
||||
echo $MRF_MESSAGE | poetry run python3 manage.py mrf_check inbox $ACTIVITY_UUID -p blocked_follow_domains
|
||||
echo $MRF_MESSAGE | venv/bin/funkwhale-manage mrf_check inbox $ACTIVITY_UUID -p blocked_follow_domains
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -175,7 +175,7 @@ To make the job of writing and debugging MRF policies easier, we provide a manag
|
|||
|
||||
export ACTIVITY_UUID="06208aea-c687-4e8b-aefd-22f1c3f76039"
|
||||
|
||||
echo $MRF_MESSAGE | docker-compose run --rm api python3 manage.py mrf_check inbox $ACTIVITY_UUID -p blocked_follow_domains
|
||||
echo $MRF_MESSAGE | docker-compose run --rm api funkwhale-manage mrf_check inbox $ACTIVITY_UUID -p blocked_follow_domains
|
||||
|
||||
```
|
||||
|
||||
|
@ -190,7 +190,7 @@ There are extra options for testing MRF policies. Check the command help for mor
|
|||
:sync: debian
|
||||
|
||||
```{code-block} sh
|
||||
poetry run python3 manage.py mrf_check --help
|
||||
venv/bin/funkwhale-manage mrf_check --help
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -199,7 +199,7 @@ poetry run python3 manage.py mrf_check --help
|
|||
:sync: docker
|
||||
|
||||
```{code-block} sh
|
||||
docker-compose run --rm api python3 manage.py mrf_check --help
|
||||
docker-compose run --rm api funkwhale-manage mrf_check --help
|
||||
```
|
||||
|
||||
:::
|
||||
|
|
|
@ -15,7 +15,7 @@ To see a full list of options, run the command with the `--help` flag.
|
|||
:sync: debian
|
||||
|
||||
```{code-block} sh
|
||||
poetry run python3 manage.py import_files --help
|
||||
venv/bin/funkwhale-manage import_files --help
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -24,7 +24,7 @@ poetry run python3 manage.py import_files --help
|
|||
:sync: docker
|
||||
|
||||
```{code-block} sh
|
||||
docker-compose run --rm api python3 manage.py import_files --help
|
||||
docker-compose run --rm api funkwhale-manage import_files --help
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -91,7 +91,7 @@ Once you have your library ID, you can copy content from your server and import
|
|||
3. Run the `import_files` command to copy your files. In this example, the music is stored in `data/music`. Replace this with your music directory.
|
||||
|
||||
```{code-block} sh
|
||||
poetry run python3 manage.py import_files $LIBRARY_ID "data/music" --recursive --noinput
|
||||
venv/bin/funkwhale-manage import_files $LIBRARY_ID "data/music" --recursive --noinput
|
||||
```
|
||||
|
||||
Funkwhale copies your files to your media store.
|
||||
|
@ -174,7 +174,7 @@ To use the in-place import method, follow these steps:
|
|||
4. Run your import command against your music storage directory. In this example, the storage directory is `/srv/funkwhale/data/music/nfsshare`. Replace this with your storage directory.
|
||||
|
||||
```{code-block} sh
|
||||
poetry run python3 manage.py import_files $LIBRARY_ID "/srv/funkwhale/data/music/nfsshare/" --recursive --noinput --in-place
|
||||
venv/bin/funkwhale-manage import_files $LIBRARY_ID "/srv/funkwhale/data/music/nfsshare/" --recursive --noinput --in-place
|
||||
```
|
||||
|
||||
Funkwhale imports the music in your storage directory into the specified library.
|
||||
|
@ -188,7 +188,7 @@ Funkwhale imports the music in your storage directory into the specified library
|
|||
2. Run your import command against your music storage directory:
|
||||
|
||||
```{code-block} sh
|
||||
docker-compose run --rm api python3 manage.py import_files $LIBRARY_ID "/srv/funkwhale/data/music/nfsshare/" --recursive --noinput --in-place
|
||||
docker-compose run --rm api funkwhale-manage import_files $LIBRARY_ID "/srv/funkwhale/data/music/nfsshare/" --recursive --noinput --in-place
|
||||
```
|
||||
|
||||
Funkwhale imports the music in your storage directory into the specified library.
|
||||
|
@ -241,7 +241,7 @@ The `import_files --watch` command watches for changes to the following metadata
|
|||
:sync: debian
|
||||
|
||||
```{code-block} sh
|
||||
poetry run python3 manage.py import_files $LIBRARY_ID "/srv/funkwhale/data/music/nfsshare/" --recursive --noinput --in-place --watch
|
||||
venv/bin/funkwhale-manage import_files $LIBRARY_ID "/srv/funkwhale/data/music/nfsshare/" --recursive --noinput --in-place --watch
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -250,7 +250,7 @@ poetry run python3 manage.py import_files $LIBRARY_ID "/srv/funkwhale/data/music
|
|||
:sync: docker
|
||||
|
||||
```{code-block} sh
|
||||
docker-compose run --rm api python3 manage.py import_files $LIBRARY_ID "/srv/funkwhale/data/music/nfsshare/" --recursive --noinput --in-place --watch
|
||||
docker-compose run --rm api funkwhale-manage import_files $LIBRARY_ID "/srv/funkwhale/data/music/nfsshare/" --recursive --noinput --in-place --watch
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -272,7 +272,7 @@ You can use the `--prune` flag with the `--watch` flag. This means Funkwhale rem
|
|||
:sync: debian
|
||||
|
||||
```{code-block} sh
|
||||
poetry run python3 manage.py import_files $LIBRARY_ID "/srv/funkwhale/data/music/nfsshare/" --recursive --noinput --in-place --watch --prune
|
||||
venv/bin/funkwhale-manage import_files $LIBRARY_ID "/srv/funkwhale/data/music/nfsshare/" --recursive --noinput --in-place --watch --prune
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -281,7 +281,7 @@ poetry run python3 manage.py import_files $LIBRARY_ID "/srv/funkwhale/data/music
|
|||
:sync: docker
|
||||
|
||||
```{code-block} sh
|
||||
docker-compose run --rm api python3 manage.py import_files $LIBRARY_ID "/srv/funkwhale/data/music/nfsshare/" --recursive --noinput --in-place --watch --prune
|
||||
docker-compose run --rm api funkwhale-manage import_files $LIBRARY_ID "/srv/funkwhale/data/music/nfsshare/" --recursive --noinput --in-place --watch --prune
|
||||
```
|
||||
|
||||
:::
|
||||
|
|
|
@ -234,11 +234,11 @@ Funkwhale uses a [PostgreSQL](https://www.postgresql.org/) database to store inf
|
|||
sudo -u postgres psql funkwhale -c 'CREATE EXTENSION "citext";'
|
||||
```
|
||||
|
||||
7. Your database is ready to be populated! Use the `manage.py` script to create the database structure.
|
||||
7. Your database is ready to be populated! Use the `funkwhale-manage` command line interface to create the database structure.
|
||||
|
||||
```{code-block} sh
|
||||
cd /srv/funkwhale/api
|
||||
sudo -u funkwhale poetry run python3 manage.py migrate
|
||||
cd /srv/funkwhale
|
||||
sudo -u funkwhale venv/bin/funkwhale-manage migrate
|
||||
```
|
||||
|
||||
````{note}
|
||||
|
@ -255,7 +255,7 @@ That's it! You've finished setting up your database.
|
|||
|
||||
## 7. Set up Funkwhale
|
||||
|
||||
Once you have got your database up and running, you can get Funkwhale ready to launch. Use the built-in `manage.py` script to get things ready.
|
||||
Once you have got your database up and running, you can get Funkwhale ready to launch. Use the built-in `funkwhale-manage` command line interface to get things ready.
|
||||
|
||||
### Create a superuser for your pod
|
||||
|
||||
|
@ -266,17 +266,17 @@ You can create several superusers.
|
|||
To start using Funkwhale, you need to create a superuser for your pod. This user has all the permissions needed to administrate the pod. Follow these steps to create a superuser.
|
||||
|
||||
```{code-block} sh
|
||||
sudo -u funkwhale poetry run python3 manage.py createsuperuser
|
||||
sudo -u funkwhale venv/bin/funkwhale-manage createsuperuser
|
||||
```
|
||||
|
||||
That's it! You can log in as this user when you finish setting up Funkwhale.
|
||||
|
||||
### Collect static files
|
||||
|
||||
Funkwhale uses several static assets to serve its frontend. Use `manage.py` to collect these files so that the webserver can serve them.
|
||||
Funkwhale uses several static assets to serve its frontend. Use the `funkwhale-manage` command line interface to collect these files so that the webserver can serve them.
|
||||
|
||||
```{code-block} sh
|
||||
sudo poetry run python3 manage.py collectstatic
|
||||
sudo venv/bin/funkwhale-manage collectstatic
|
||||
```
|
||||
|
||||
## 8. Set up systemd unit files
|
||||
|
|
|
@ -140,7 +140,7 @@ Once you've filled in your environment file, you can set up Funkwhale. Follow th
|
|||
3. Run the database migrations.
|
||||
|
||||
```{code-block} sh
|
||||
docker-compose run --rm api python3 manage.py migrate
|
||||
docker-compose run --rm api funkwhale-manage migrate
|
||||
```
|
||||
|
||||
````{note}
|
||||
|
@ -156,7 +156,7 @@ Once you've filled in your environment file, you can set up Funkwhale. Follow th
|
|||
4. Create your superuser.
|
||||
|
||||
```{code-block} sh
|
||||
docker-compose run --rm api python3 manage.py createsuperuser
|
||||
docker-compose run --rm api funkwhale-manage createsuperuser
|
||||
```
|
||||
|
||||
5. Launch all the containers to bring up your pod.
|
||||
|
|
|
@ -40,7 +40,7 @@ Before you move your data, you need to install Funkwhale on your {term}`destinat
|
|||
On your {term}`destination server`, follow the [installation guide](debian.md). Skip the following steps:
|
||||
|
||||
- Don't enable the `unaccent` and `citext` extensions when you set up the database.
|
||||
- Don't run the `manage.py migrate` command to migrate the database.
|
||||
- Don't run the `funkwhale-manage migrate` command to migrate the database.
|
||||
- Don't create a superuser.
|
||||
|
||||
Once you have finished the installation, stop the Funkwhale services. These shouldn't be running when you copy your existing data over.
|
||||
|
@ -56,7 +56,7 @@ sudo systemctl stop funkwhale.target
|
|||
|
||||
On your {term}`destination server`, follow the [installation guide](docker.md). Skip the following steps:
|
||||
|
||||
- Don't run the `manage.py migrate` command to migrate the database.
|
||||
- Don't run the `funkwhale-manage migrate` command to migrate the database.
|
||||
- Don't create a superuser.
|
||||
|
||||
Once you have finished the installation, stop the Funkwhale services. These shouldn't be running when you copy your existing data over.
|
||||
|
@ -136,11 +136,11 @@ Run the following on your {term}`destination server`:
|
|||
sudo psql -d funkwhale dump.sql
|
||||
```
|
||||
|
||||
When the import finishes, run the `manage.py migrate` command to set up the database.
|
||||
When the import finishes, run the `funkwhale-manage migrate` command to set up the database.
|
||||
|
||||
```{code-block} sh
|
||||
cd /srv/funkwhale/api
|
||||
poetry run python3 manage.py migrate
|
||||
cd /srv/funkwhale
|
||||
venv/bin/funkwhale-manage migrate
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -166,10 +166,10 @@ You need to initialize the postgres container on your {term}`destination server`
|
|||
docker-compose run --rm postgres psql -U postgres -d postgres < "dump.sql"
|
||||
```
|
||||
|
||||
3. When the import finishes, run the `manage.py migrate` command to set up the database.
|
||||
3. When the import finishes, run the `funkwhale-manage migrate` command to set up the database.
|
||||
|
||||
```{code-block} sh
|
||||
docker-compose run --rm api python3 manage.py migrate
|
||||
docker-compose run --rm api funkwhale-manage migrate
|
||||
```
|
||||
|
||||
:::
|
||||
|
|
|
@ -38,7 +38,7 @@ Use the following command to create a new library with a custom name and privacy
|
|||
:sync: debian
|
||||
|
||||
```{code-block} sh
|
||||
poetry run python3 manage.py create_library username1 --name="Library 1" --privacy-level="everyone"
|
||||
venv/bin/funkwhale-manage create_library username1 --name="Library 1" --privacy-level="everyone"
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -47,7 +47,7 @@ poetry run python3 manage.py create_library username1 --name="Library 1" --priva
|
|||
:sync: docker
|
||||
|
||||
```{code-block} sh
|
||||
docker-compose run --rm api python3 manage.py create_library username1 --name="Library 1" --privacy-level="everyone"
|
||||
docker-compose run --rm api funkwhale-manage create_library username1 --name="Library 1" --privacy-level="everyone"
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -70,7 +70,7 @@ You can create a library using only a username. The script substitutes default v
|
|||
:sync: debian
|
||||
|
||||
```{code-block} sh
|
||||
poetry run python3 manage.py create_library username1
|
||||
venv/bin/funkwhale-manage create_library username1
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -79,7 +79,7 @@ poetry run python3 manage.py create_library username1
|
|||
:sync: docker
|
||||
|
||||
```{code-block} sh
|
||||
docker-compose run --rm api python3 manage.py create_library username1
|
||||
docker-compose run --rm api funkwhale-manage create_library username1
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -102,7 +102,7 @@ If a library with the same name already exists for the given user, the script wi
|
|||
:sync: debian
|
||||
|
||||
```{code-block} sh
|
||||
poetry run python3 manage.py create_library username1 --name="Library 1" --privacy-level="everyone"
|
||||
venv/bin/funkwhale-manage create_library username1 --name="Library 1" --privacy-level="everyone"
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -111,7 +111,7 @@ poetry run python3 manage.py create_library username1 --name="Library 1" --priva
|
|||
:sync: docker
|
||||
|
||||
```{code-block} sh
|
||||
docker-compose run --rm api python3 manage.py create_library username1 --name="Library 1" --privacy-level="everyone"
|
||||
docker-compose run --rm api funkwhale-manage create_library username1 --name="Library 1" --privacy-level="everyone"
|
||||
```
|
||||
|
||||
:::
|
||||
|
|
|
@ -16,7 +16,7 @@ To ensure you don't remove data by accident, this command runs in dry run mode b
|
|||
:sync: debian
|
||||
|
||||
```{code-block} sh
|
||||
poetry run python3 manage.py check_inplace_files
|
||||
venv/bin/funkwhale-manage check_inplace_files
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -25,7 +25,7 @@ poetry run python3 manage.py check_inplace_files
|
|||
:sync: docker
|
||||
|
||||
```{code-block} sh
|
||||
docker-compose run --rm api python3 manage.py check_inplace_files
|
||||
docker-compose run --rm api funkwhale-manage check_inplace_files
|
||||
```
|
||||
|
||||
:::
|
||||
|
|
|
@ -14,7 +14,7 @@ Check and fix file mimetypes with the `--mimetype` flag. This helps prevent issu
|
|||
:sync: debian
|
||||
|
||||
```{code-block} sh
|
||||
poetry run python3 manage.py fix_uploads --mimetype
|
||||
venv/bin/funkwhale-manage fix_uploads --mimetype
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -23,7 +23,7 @@ poetry run python3 manage.py fix_uploads --mimetype
|
|||
:sync: docker
|
||||
|
||||
```{code-block} sh
|
||||
docker-compose run --rm api python3 manage.py fix_uploads --mimetype
|
||||
docker-compose run --rm api funkwhale-manage fix_uploads --mimetype
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -39,7 +39,7 @@ Check and fix bitrate and duration with the `--audio-data` flag. This process ca
|
|||
:sync: debian
|
||||
|
||||
```{code-block} sh
|
||||
poetry run python3 manage.py fix_uploads --audio-data
|
||||
venv/bin/funkwhale-manage fix_uploads --audio-data
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -48,7 +48,7 @@ poetry run python3 manage.py fix_uploads --audio-data
|
|||
:sync: docker
|
||||
|
||||
```{code-block} sh
|
||||
docker-compose run --rm api python3 manage.py fix_uploads --audio-data
|
||||
docker-compose run --rm api funkwhale-manage fix_uploads --audio-data
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -64,7 +64,7 @@ Check and fix the file size with the `--size` flag.
|
|||
:sync: debian
|
||||
|
||||
```{code-block} sh
|
||||
poetry run python3 manage.py fix_uploads --size
|
||||
venv/bin/funkwhale-manage fix_uploads --size
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -73,7 +73,7 @@ poetry run python3 manage.py fix_uploads --size
|
|||
:sync: docker
|
||||
|
||||
```{code-block} sh
|
||||
docker-compose run --rm api python3 manage.py fix_uploads --size
|
||||
docker-compose run --rm api funkwhale-manage fix_uploads --size
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -89,7 +89,7 @@ Check and fix file checksums with the `--checksum` flag.
|
|||
:sync: debian
|
||||
|
||||
```{code-block} sh
|
||||
poetry run python3 manage.py fix_uploads --checksum
|
||||
venv/bin/funkwhale-manage fix_uploads --checksum
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -98,7 +98,7 @@ poetry run python3 manage.py fix_uploads --checksum
|
|||
:sync: docker
|
||||
|
||||
```{code-block} sh
|
||||
docker-compose run --rm api python3 manage.py fix_uploads --checksum
|
||||
docker-compose run --rm api funkwhale-manage fix_uploads --checksum
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -114,7 +114,7 @@ Choose the batch size you want to process with the `--batch-size` or -`s` flag.
|
|||
:sync: debian
|
||||
|
||||
```{code-block} sh
|
||||
poetry run python3 manage.py fix_uploads --batch-size 500
|
||||
venv/bin/funkwhale-manage fix_uploads --batch-size 500
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -123,7 +123,7 @@ poetry run python3 manage.py fix_uploads --batch-size 500
|
|||
:sync: docker
|
||||
|
||||
```{code-block} sh
|
||||
docker-compose run --rm api python3 manage.py fix_uploads --batch-size 500
|
||||
docker-compose run --rm api funkwhale-manage fix_uploads --batch-size 500
|
||||
```
|
||||
|
||||
:::
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Funkwhale management script
|
||||
# Funkwhale management command line interface
|
||||
|
||||
Funkwhale includes a {file}`manage.py` script that can help you automate a lot of admin tasks. Check out the guides in this section for instructions on how to use this tool.
|
||||
Funkwhale includes a `funkwhale-manage` command line interface that can help you automate a lot of admin tasks. Check out the guides in this section for instructions on how to use this tool.
|
||||
|
||||
```{toctree}
|
||||
---
|
||||
|
|
|
@ -4,7 +4,7 @@ Funkwhale doesn't delete data objects from the database when you delete a file.
|
|||
|
||||
Sometimes you may want to clear out dangling metadata. For example, if you import a lot of files with incorrect tags and then delete them.
|
||||
|
||||
To help with this, the {file}`manage.py` script includes commands to prune dangling metadata from your database. All prune commands are available under the python3 manage.py prune_library namespace. To ensure you don't remove data by accident, all commands run in dry run mode by default. Run commands with the `--no-dry-run` flag to perform the pruning action.
|
||||
To help with this, the `funkwhale-manage` command line interface includes commands to prune dangling metadata from your database. All prune commands are available under the `funkwhale-manage prune_library` namespace. To ensure you don't remove data by accident, all commands run in dry run mode by default. Run commands with the `--no-dry-run` flag to perform the pruning action.
|
||||
|
||||
```{warning}
|
||||
Running `prune_library` commands with the `--no-dry-run` flag is irreversible. Make sure you [back up your data](../upgrade_docs/backup.md).
|
||||
|
@ -20,7 +20,7 @@ Running `prune_library` commands with the `--no-dry-run` flag is irreversible. M
|
|||
:sync: debian
|
||||
|
||||
```bash
|
||||
poetry run python3 manage.py prune_library --tracks
|
||||
venv/bin/funkwhale-manage prune_library --tracks
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -29,7 +29,7 @@ poetry run python3 manage.py prune_library --tracks
|
|||
:sync: docker
|
||||
|
||||
```bash
|
||||
docker-compose run --rm api python3 manage.py prune_library --tracks
|
||||
docker-compose run --rm api funkwhale-manage prune_library --tracks
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -43,7 +43,7 @@ docker-compose run --rm api python3 manage.py prune_library --tracks
|
|||
:sync: debian
|
||||
|
||||
```{code-block} sh
|
||||
poetry run python3 manage.py prune_library --albums
|
||||
venv/bin/funkwhale-manage prune_library --albums
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -52,7 +52,7 @@ poetry run python3 manage.py prune_library --albums
|
|||
:sync: docker
|
||||
|
||||
```{code-block} sh
|
||||
docker-compose run --rm api python3 manage.py prune_library --albums
|
||||
docker-compose run --rm api funkwhale-manage prune_library --albums
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -66,7 +66,7 @@ docker-compose run --rm api python3 manage.py prune_library --albums
|
|||
:sync: debian
|
||||
|
||||
```{code-block} sh
|
||||
poetry run python3 manage.py prune_library --artists
|
||||
venv/bin/funkwhale-manage prune_library --artists
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -75,7 +75,7 @@ poetry run python3 manage.py prune_library --artists
|
|||
:sync: docker
|
||||
|
||||
```{code-block} sh
|
||||
docker-compose run --rm api python3 manage.py prune_library --artists
|
||||
docker-compose run --rm api funkwhale-manage prune_library --artists
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -89,7 +89,7 @@ docker-compose run --rm api python3 manage.py prune_library --artists
|
|||
:sync: debian
|
||||
|
||||
```{code-block} sh
|
||||
poetry run python3 manage.py prune_library --tracks --albums --artists
|
||||
venv/bin/funkwhale-manage prune_library --tracks --albums --artists
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -98,7 +98,7 @@ poetry run python3 manage.py prune_library --tracks --albums --artists
|
|||
:sync: docker
|
||||
|
||||
```{code-block} sh
|
||||
docker-compose run --rm api python3 manage.py prune_library --tracks --albums --artists
|
||||
docker-compose run --rm api funkwhale-manage prune_library --tracks --albums --artists
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -112,7 +112,7 @@ There are extra options for pruning your database. Check the command help for mo
|
|||
:sync: debian
|
||||
|
||||
```{code-block} sh
|
||||
poetry run python3 manage.py prune_library --help
|
||||
venv/bin/funkwhale-manage prune_library --help
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -121,7 +121,7 @@ poetry run python3 manage.py prune_library --help
|
|||
:sync: docker
|
||||
|
||||
```{code-block} sh
|
||||
docker-compose run --rm api python3 manage.py prune_library --help
|
||||
docker-compose run --rm api funkwhale-manage prune_library --help
|
||||
```
|
||||
|
||||
:::
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Add artist and album tags from track metadata
|
||||
|
||||
Funkwhale extracts track tags from the file's metadata. Funkwhale applies these tags to the track's album and artist by running a check every few days. You can run the process at any time using the `manage.py` script.
|
||||
Funkwhale extracts track tags from the file's metadata. Funkwhale applies these tags to the track's album and artist by running a check every few days. You can run the process at any time using the `funkwhale-manage` command line interface.
|
||||
|
||||
The command performs the following actions:
|
||||
|
||||
|
@ -24,10 +24,10 @@ To add tags to untagged albums:
|
|||
cd /srv/funkwhale
|
||||
```
|
||||
|
||||
3. Run the `manage.py` script to generate tags for untagged albums.
|
||||
3. Run the `funkwhale-manage` command line interface to generate tags for untagged albums.
|
||||
|
||||
```{code-block} sh
|
||||
poetry run python3 manage.py fw albums add-tags-from-tracks
|
||||
venv/bin/funkwhale-manage fw albums add-tags-from-tracks
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -42,10 +42,10 @@ To add tags to untagged albums:
|
|||
cd /srv/funkwhale
|
||||
```
|
||||
|
||||
3. Run the `manage.py` script to generate tags for untagged albums.
|
||||
3. Run the `funkwhale-manage` command line interface to generate tags for untagged albums.
|
||||
|
||||
```{code-block} sh
|
||||
docker-compose run --rm api python3 manage.py fw albums add-tags-from-tracks
|
||||
docker-compose run --rm api funkwhale-manage fw albums add-tags-from-tracks
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -67,10 +67,10 @@ To add tags to untagged artists:
|
|||
cd /srv/funkwhale
|
||||
```
|
||||
|
||||
3. Run the `manage.py` script to generate tags for untagged artists.
|
||||
3. Run the `funkwhale-manage` command line interface to generate tags for untagged artists.
|
||||
|
||||
```{code-block} sh
|
||||
poetry run python3 manage.py fw artists add-tags-from-tracks
|
||||
venv/bin/funkwhale-manage fw artists add-tags-from-tracks
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -85,10 +85,10 @@ To add tags to untagged artists:
|
|||
cd /srv/funkwhale
|
||||
```
|
||||
|
||||
3. Run the `manage.py` script to generate tags for untagged artists.
|
||||
3. Run the `funkwhale-manage` command line interface to generate tags for untagged artists.
|
||||
|
||||
```{code-block} sh
|
||||
docker-compose run --rm api python3 manage.py fw artists add-tags-from-tracks
|
||||
docker-compose run --rm api funkwhale-manage fw artists add-tags-from-tracks
|
||||
```
|
||||
|
||||
:::
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Regenerate thumbnails
|
||||
|
||||
We increased the quality of thumbnails from 70px to 95px in Funkwhale 1.0. This action removes visual artifacts that affect lower quality thumbnails. You can run the `manage.py` script to generate new thumbnails. If you want to keep thumbnails at their original quality, add `THUMBNAIL_JPEG_RESIZE_QUALITY=70` to your `.env` file.
|
||||
We increased the quality of thumbnails from 70px to 95px in Funkwhale 1.0. This action removes visual artifacts that affect lower quality thumbnails. You can run the `funkwhale-manage` command line interface to generate new thumbnails. If you want to keep thumbnails at their original quality, add `THUMBNAIL_JPEG_RESIZE_QUALITY=70` to your `.env` file.
|
||||
|
||||
```{note}
|
||||
If you're using S3 storage, the `__sized__` folder is located in your S3 bucket.
|
||||
|
@ -26,10 +26,10 @@ To generate new thumbnails:
|
|||
rm -r __sized__/
|
||||
```
|
||||
|
||||
4. Run the `manage.py` script to regenerate the thumbnails.
|
||||
4. Run the `funkwhale-manage` command line interface to regenerate the thumbnails.
|
||||
|
||||
```{code-block} sh
|
||||
poetry run python3 manage.py fw media generate-thumbnails
|
||||
venv/bin/funkwhale-manage fw media generate-thumbnails
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -50,10 +50,10 @@ To generate new thumbnails:
|
|||
rm -r data/media/__sized__/
|
||||
```
|
||||
|
||||
4. Run the `manage.py` script to regenerate the thumbnails.
|
||||
4. Run the `funkwhale-manage` command line interface to regenerate the thumbnails.
|
||||
|
||||
```{code-block} sh
|
||||
docker-compose run --rm api python3 manage.py fw media generate-thumbnails
|
||||
docker-compose run --rm api funkwhale-manage fw media generate-thumbnails
|
||||
```
|
||||
|
||||
:::
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
# Manage users with manage.py
|
||||
# Manage users
|
||||
|
||||
The {file}`manage.py` script includes commands for user management. Use these commands to automate managing users from the command line.
|
||||
The `funkwhale-manage` command line interface includes commands for user management. Use these commands to automate managing users from the command line.
|
||||
|
||||
All users-related commands are available under the `python3 manage.py fw users` namespace.
|
||||
All users-related commands are available under the `funkwhale-manage fw users` namespace.
|
||||
|
||||
## Create users
|
||||
|
||||
You can create users with the {file}`manage.py` script. There are different ways to create users depending on what approach you want to take.
|
||||
You can create users with the `funkwhale-manage` command line interface. There are different ways to create users depending on what approach you want to take.
|
||||
|
||||
### Create a user interactively
|
||||
|
||||
|
@ -16,7 +16,7 @@ You can create users with the {file}`manage.py` script. There are different ways
|
|||
:sync: debian
|
||||
|
||||
```{code-block} sh
|
||||
poetry run python3 manage.py fw users create
|
||||
venv/bin/funkwhale-manage fw users create
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -25,7 +25,7 @@ poetry run python3 manage.py fw users create
|
|||
:sync: docker
|
||||
|
||||
```{code-block} sh
|
||||
docker-compose run --rm api python3 manage.py fw users create
|
||||
docker-compose run --rm api funkwhale-manage fw users create
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -39,7 +39,7 @@ docker-compose run --rm api python3 manage.py fw users create
|
|||
:sync: debian
|
||||
|
||||
```{code-block} sh
|
||||
poetry run python3 manage.py fw users create --username <username> --email <user email> -p ""
|
||||
venv/bin/funkwhale-manage fw users create --username <username> --email <user email> -p ""
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -48,7 +48,7 @@ poetry run python3 manage.py fw users create --username <username> --email <user
|
|||
:sync: docker
|
||||
|
||||
```{code-block} sh
|
||||
docker-compose run --rm api python3 manage.py fw users create --username <username> --email <user email> -p ""
|
||||
docker-compose run --rm api funkwhale-manage fw users create --username <username> --email <user email> -p ""
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -63,7 +63,7 @@ docker-compose run --rm api python3 manage.py fw users create --username <userna
|
|||
|
||||
```{code-block} sh
|
||||
export FUNKWHALE_CLI_USER_PASSWORD=<password>
|
||||
poetry run python3 manage.py fw users create --username <username> --email <user email>
|
||||
venv/bin/funkwhale-manage fw users create --username <username> --email <user email>
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -73,7 +73,7 @@ poetry run python3 manage.py fw users create --username <username> --email <user
|
|||
|
||||
```{code-block} sh
|
||||
export FUNKWHALE_CLI_USER_PASSWORD=<password>
|
||||
docker-compose run --rm api python3 manage.py fw users create --username <username> --email <user email>
|
||||
docker-compose run --rm api funkwhale-manage fw users create --username <username> --email <user email>
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -87,7 +87,7 @@ There are extra options for user configuration, such as quota and {term}`permiss
|
|||
:sync: debian
|
||||
|
||||
```{code-block} sh
|
||||
poetry run python3 manage.py fw users --help
|
||||
venv/bin/funkwhale-manage fw users --help
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -96,7 +96,7 @@ poetry run python3 manage.py fw users --help
|
|||
:sync: docker
|
||||
|
||||
```{code-block} sh
|
||||
docker-compose run --rm api python3 manage.py fw users --help
|
||||
docker-compose run --rm api funkwhale-manage fw users --help
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -104,7 +104,7 @@ docker-compose run --rm api python3 manage.py fw users --help
|
|||
|
||||
## Update users
|
||||
|
||||
You can update user accounts using the {file}`manage.py` script. Update commands are available under the `python3 manage.py fw users set` namespace.
|
||||
You can update user accounts using the `funkwhale-manage` command line interface. Update commands are available under the `funkwhale-manage fw users set` namespace.
|
||||
|
||||
### Set upload quota for a user
|
||||
|
||||
|
@ -114,7 +114,7 @@ You can update user accounts using the {file}`manage.py` script. Update commands
|
|||
:sync: debian
|
||||
|
||||
```{code-block} sh
|
||||
poetry run python3 manage.py fw users set --upload-quota 500 <user>
|
||||
venv/bin/funkwhale-manage fw users set --upload-quota 500 <user>
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -123,7 +123,7 @@ poetry run python3 manage.py fw users set --upload-quota 500 <user>
|
|||
:sync: docker
|
||||
|
||||
```{code-block} sh
|
||||
docker-compose run --rm api python3 manage.py fw users set --upload-quota 500 <user>
|
||||
docker-compose run --rm api funkwhale-manage fw users set --upload-quota 500 <user>
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -137,7 +137,7 @@ docker-compose run --rm api python3 manage.py fw users set --upload-quota 500 <u
|
|||
:sync: debian
|
||||
|
||||
```{code-block} sh
|
||||
poetry run python3 manage.py fw users set --staff --superuser <user 1> <user 2>
|
||||
venv/bin/funkwhale-manage fw users set --staff --superuser <user 1> <user 2>
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -146,7 +146,7 @@ poetry run python3 manage.py fw users set --staff --superuser <user 1> <user 2>
|
|||
:sync: docker
|
||||
|
||||
```{code-block} sh
|
||||
docker-compose run --rm api python3 manage.py fw users set --staff --superuser <user 1> <user 2>
|
||||
docker-compose run --rm api funkwhale-manage fw users set --staff --superuser <user 1> <user 2>
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -160,7 +160,7 @@ docker-compose run --rm api python3 manage.py fw users set --staff --superuser <
|
|||
:sync: debian
|
||||
|
||||
```{code-block} sh
|
||||
poetry run python3 manage.py fw users set --no-staff --no-superuser <user>
|
||||
venv/bin/funkwhale-manage fw users set --no-staff --no-superuser <user>
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -169,7 +169,7 @@ poetry run python3 manage.py fw users set --no-staff --no-superuser <user>
|
|||
:sync: docker
|
||||
|
||||
```{code-block} sh
|
||||
docker-compose run --rm api python3 manage.py fw users set --no-staff --no-superuser <user>
|
||||
docker-compose run --rm api funkwhale-manage fw users set --no-staff --no-superuser <user>
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -183,7 +183,7 @@ docker-compose run --rm api python3 manage.py fw users set --no-staff --no-super
|
|||
:sync: debian
|
||||
|
||||
```{code-block} sh
|
||||
poetry run python3 manage.py fw users set --permission-moderation <user>
|
||||
venv/bin/funkwhale-manage fw users set --permission-moderation <user>
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -192,7 +192,7 @@ poetry run python3 manage.py fw users set --permission-moderation <user>
|
|||
:sync: docker
|
||||
|
||||
```{code-block} sh
|
||||
docker-compose run --rm api python3 manage.py fw users set --permission-moderation <user>
|
||||
docker-compose run --rm api funkwhale-manage fw users set --permission-moderation <user>
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -206,7 +206,7 @@ docker-compose run --rm api python3 manage.py fw users set --permission-moderati
|
|||
:sync: debian
|
||||
|
||||
```{code-block} sh
|
||||
poetry run python3 manage.py fw users set --password "<password>" <user>
|
||||
venv/bin/funkwhale-manage fw users set --password "<password>" <user>
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -215,7 +215,7 @@ poetry run python3 manage.py fw users set --password "<password>" <user>
|
|||
:sync: docker
|
||||
|
||||
```{code-block} sh
|
||||
docker-compose run --rm api python3 manage.py fw users set --password "<password>" <user>
|
||||
docker-compose run --rm api funkwhale-manage fw users set --password "<password>" <user>
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -230,7 +230,7 @@ docker-compose run --rm api python3 manage.py fw users set --password "<password
|
|||
|
||||
```{code-block} sh
|
||||
export FUNKWHALE_CLI_USER_UPDATE_PASSWORD=<password>
|
||||
poetry run python3 manage.py fw users set <user>
|
||||
venv/bin/funkwhale-manage fw users set <user>
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -240,7 +240,7 @@ poetry run python3 manage.py fw users set <user>
|
|||
|
||||
```{code-block} sh
|
||||
export FUNKWHALE_CLI_USER_UPDATE_PASSWORD=<password>
|
||||
docker-compose run --rm api python3 manage.py fw users set <user>
|
||||
docker-compose run --rm api funkwhale-manage fw users set <user>
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -254,7 +254,7 @@ There are extra options for updating users. Check the command help for more opti
|
|||
:sync: debian
|
||||
|
||||
```{code-block} sh
|
||||
poetry run python3 manage.py fw users set --help
|
||||
venv/bin/funkwhale-manage fw users set --help
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -263,7 +263,7 @@ poetry run python3 manage.py fw users set --help
|
|||
:sync: docker
|
||||
|
||||
```{code-block} sh
|
||||
docker-compose run --rm api python3 manage.py fw users set --help
|
||||
docker-compose run --rm api funkwhale-manage fw users set --help
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -281,7 +281,7 @@ This prevents the same username being used in future.
|
|||
:sync: debian
|
||||
|
||||
```{code-block} py
|
||||
poetry run python3 manage.py fw users rm <user>
|
||||
venv/bin/funkwhale-manage fw users rm <user>
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -290,7 +290,7 @@ poetry run python3 manage.py fw users rm <user>
|
|||
:sync: docker
|
||||
|
||||
```{code-block} py
|
||||
docker-compose run --rm api python3 manage.py fw users rm <user>
|
||||
docker-compose run --rm api funkwhale-manage fw users rm <user>
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -306,7 +306,7 @@ This means the username can be reused.
|
|||
:sync: debian
|
||||
|
||||
```{code-block} py
|
||||
poetry run python3 manage.py fw users rm --hard <user>
|
||||
venv/bin/funkwhale-manage fw users rm --hard <user>
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -315,7 +315,7 @@ poetry run python3 manage.py fw users rm --hard <user>
|
|||
:sync: docker
|
||||
|
||||
```{code-block} py
|
||||
docker-compose run --rm api python3 manage.py fw users rm --hard <user>
|
||||
docker-compose run --rm api funkwhale-manage fw users rm --hard <user>
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -329,7 +329,7 @@ There are extra options for deleting users. Check the command help for more opti
|
|||
:sync: debian
|
||||
|
||||
```{code-block} sh
|
||||
poetry run python3 manage.py fw users rm --help
|
||||
venv/bin/funkwhale-manage fw users rm --help
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -338,7 +338,7 @@ poetry run python3 manage.py fw users rm --help
|
|||
:sync: docker
|
||||
|
||||
```{code-block} sh
|
||||
docker-compose run --rm api python3 manage.py fw users rm --help
|
||||
docker-compose run --rm api funkwhale-manage fw users rm --help
|
||||
```
|
||||
|
||||
:::
|
||||
|
|
|
@ -125,7 +125,7 @@ Check the file and remove any duplicated settings after copying.
|
|||
3. Run the database migrations.
|
||||
|
||||
```{code-block} sh
|
||||
docker-compose run --rm api python3 manage.py migrate
|
||||
docker-compose run --rm api funkwhale-manage migrate
|
||||
```
|
||||
|
||||
## Start your Funkwhale instance
|
||||
|
|
|
@ -111,11 +111,11 @@ To restore your database, do the following:
|
|||
sudo -u postgres psql -f /path/to/your/backup/dump.sql funkwhale
|
||||
```
|
||||
|
||||
2. Run the `manage.py migrate` command to set up the database.
|
||||
2. Run the `funkwhale-manage migrate` command to set up the database.
|
||||
|
||||
```{code-block} sh
|
||||
cd /srv/funkwhale/api
|
||||
poetry run python3 manage.py migrate
|
||||
cd /srv/funkwhale
|
||||
venv/bin/funkwhale-manage migrate
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -129,10 +129,10 @@ To restore your database, do the following:
|
|||
docker-compose run --rm -T postgres psql -U postgres postgres < "/path/to/your/backup/dump.sql"
|
||||
```
|
||||
|
||||
2. Run the `manage.py migrate` command to set up the database.
|
||||
2. Run the `funkwhale-manage migrate` command to set up the database.
|
||||
|
||||
```{code-block} sh
|
||||
docker-compose run --rm api python3 manage.py migrate
|
||||
docker-compose run --rm api funkwhale-manage migrate
|
||||
```
|
||||
|
||||
:::
|
||||
|
|
|
@ -44,7 +44,7 @@ If you installed Funkwhale following the [Docker guide](../installation_docs/doc
|
|||
8. Apply the database migrations.
|
||||
|
||||
```{code-block} sh
|
||||
docker-compose run --rm api python3 manage.py migrate
|
||||
docker-compose run --rm api funkwhale-manage migrate
|
||||
```
|
||||
|
||||
9. Relaunch your containers.
|
||||
|
|
|
@ -17,7 +17,7 @@ To install a plugin located on your server:
|
|||
|
||||
## Install a third-party plugin
|
||||
|
||||
You can install third-party plugins using the `manage.py` script. To do this:
|
||||
You can install third-party plugins using the `funkwhale-manage` command line interface. To do this:
|
||||
|
||||
1. Add the plugin name to the `FUNKWHALE_PLUGINS` variable in your `.env` file
|
||||
|
||||
|
@ -25,14 +25,14 @@ You can install third-party plugins using the `manage.py` script. To do this:
|
|||
FUNKWHALE_PLUGINS=myplugin,anotherplugin
|
||||
```
|
||||
|
||||
2. Call the `manage.py` script with the location of the plugin archive
|
||||
2. Call the `funkwhale-manage` command line interface with the location of the plugin archive
|
||||
|
||||
:::: {tab-set}
|
||||
|
||||
:::{tab-item} Debian
|
||||
|
||||
```{code-block} shell
|
||||
python3 manage.py fw plugins install https://plugin_url.zip
|
||||
venv/bin/funkwhale-manage fw plugins install https://plugin_url.zip
|
||||
```
|
||||
|
||||
:::
|
||||
|
@ -40,7 +40,7 @@ You can install third-party plugins using the `manage.py` script. To do this:
|
|||
:::{tab-item} Docker
|
||||
|
||||
```{code-block} shell
|
||||
docker-compose run --rm api python3 manage.py fw plugins install https://plugin_url.zip
|
||||
docker-compose run --rm api funkwhale-manage fw plugins install https://plugin_url.zip
|
||||
```
|
||||
|
||||
:::
|
||||
|
|
|
@ -69,10 +69,10 @@ docker-compose -f dev.yml build
|
|||
|
||||
## Set up the database
|
||||
|
||||
Funkwhale relies on a postgresql database to store information. To set this up, you need to run the `manage.py migrate` command:
|
||||
Funkwhale relies on a postgresql database to store information. To set this up, you need to run the `funkwhale-manage migrate` command:
|
||||
|
||||
```sh
|
||||
docker-compose -f dev.yml run --rm api python3 manage.py migrate
|
||||
docker-compose -f dev.yml run --rm api funkwhale-manage migrate
|
||||
```
|
||||
|
||||
This command creates all the required tables. You need to run this whenever there are changes to the API schema. You can run this at any time without causing issues.
|
||||
|
@ -84,7 +84,7 @@ You need to create some local data to mimic a production environment.
|
|||
1. Create a superuser so you can log in to your local app:
|
||||
|
||||
```sh
|
||||
docker-compose -f dev.yml run --rm api python3 manage.py createsuperuser
|
||||
docker-compose -f dev.yml run --rm api funkwhale-manage createsuperuser
|
||||
```
|
||||
|
||||
2. Add some fake data to populate the database. The following command creates 25 artists with random albums, tracks, and metadata.
|
||||
|
@ -92,7 +92,7 @@ You need to create some local data to mimic a production environment.
|
|||
```sh
|
||||
artists=25 # Adds 25 fake artists
|
||||
command="from funkwhale_api.music import fake_data; fake_data.create_data($artists)"
|
||||
echo $command | docker-compose -f dev.yml run --rm -T api python3 manage.py shell -i python
|
||||
echo $command | docker-compose -f dev.yml run --rm -T api funkwhale-manage shell -i python
|
||||
```
|
||||
|
||||
## Manage services
|
||||
|
@ -194,8 +194,8 @@ To run a reverse proxy for your app:
|
|||
```sh
|
||||
export COMPOSE_PROJECT_NAME=node2
|
||||
export VUE_PORT=1234 # this has to be unique for each instance
|
||||
docker-compose -f dev.yml run --rm api python3 manage.py migrate
|
||||
docker-compose -f dev.yml run --rm api python3 manage.py createsuperuser
|
||||
docker-compose -f dev.yml run --rm api funkwhale-manage migrate
|
||||
docker-compose -f dev.yml run --rm api funkwhale-manage createsuperuser
|
||||
docker-compose -f dev.yml up nginx api front nginx api celeryworker
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in New Issue