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
25 changed files with 145 additions and 144 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue