diff --git a/CHANGELOG.md b/CHANGELOG.md index 530210158..b047e34d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -408,7 +408,7 @@ Update instructions: 3. Bring the containers back up using the **docker compose** syntax. ```sh - sudo docker compose up -d + docker compose up -d ``` After this you can continue to use the **docker compose** syntax for all Docker management tasks. diff --git a/docs/administrator/configuration/change-url.md b/docs/administrator/configuration/change-url.md index b22e13d17..8ac228cd8 100644 --- a/docs/administrator/configuration/change-url.md +++ b/docs/administrator/configuration/change-url.md @@ -37,7 +37,7 @@ Running `fix_federation_ids` with the `--no-dry-run` flag is irreversible. Make :sync: docker ```{code-block} sh - sudo docker compose run --rm api funkwhale-manage 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 ``` ::: diff --git a/docs/administrator/configuration/env-file.md b/docs/administrator/configuration/env-file.md index 0ac82af01..7f33f52bb 100644 --- a/docs/administrator/configuration/env-file.md +++ b/docs/administrator/configuration/env-file.md @@ -19,7 +19,7 @@ sudo systemctl restart funkwhale.target :sync: docker ```{code-block} sh -sudo docker compose restart +docker compose restart ``` ::: diff --git a/docs/administrator/configuration/mrf.md b/docs/administrator/configuration/mrf.md index 6de2e76e8..fb852bfe9 100644 --- a/docs/administrator/configuration/mrf.md +++ b/docs/administrator/configuration/mrf.md @@ -99,7 +99,7 @@ To make the job of writing and debugging MRF policies easier, we provide a manag :sync: docker ```{code-block} sh - sudo docker compose run --rm api funkwhale-manage mrf_check --list + docker compose run --rm api funkwhale-manage mrf_check --list ``` ::: @@ -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 | sudo docker compose run --rm api funkwhale-manage mrf_check inbox - -p blocked_follow_domains + echo $MRF_MESSAGE | docker compose run --rm api 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 | sudo docker compose run --rm api funkwhale-manage mrf_check inbox - -p blocked_follow_domains + echo $MRF_MESSAGE | docker compose run --rm api funkwhale-manage mrf_check inbox - -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 | sudo docker compose run --rm api funkwhale-manage 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 ``` @@ -199,7 +199,7 @@ venv/bin/funkwhale-manage mrf_check --help :sync: docker ```{code-block} sh -sudo docker compose run --rm api funkwhale-manage mrf_check --help +docker compose run --rm api funkwhale-manage mrf_check --help ``` ::: diff --git a/docs/administrator/configuration/object-storage.md b/docs/administrator/configuration/object-storage.md index 3964065ba..be9cc43b4 100644 --- a/docs/administrator/configuration/object-storage.md +++ b/docs/administrator/configuration/object-storage.md @@ -162,7 +162,7 @@ Serving files from an object store requires some changes to the reverse proxy. :sync: docker ```{code-block} sh - sudo docker compose restart + docker compose restart sudo systemctl restart nginx ``` diff --git a/docs/administrator/configuration/optimize.md b/docs/administrator/configuration/optimize.md index f9afe579d..936bcf36a 100644 --- a/docs/administrator/configuration/optimize.md +++ b/docs/administrator/configuration/optimize.md @@ -60,7 +60,7 @@ Celery uses a `prefork` pool by default. This enables the server to process many 2. Restart Celery. ```{code-block} sh - sudo docker compose restart celerybeat + docker compose restart celerybeat ``` ::: diff --git a/docs/administrator/import.md b/docs/administrator/import.md index abb1a6250..6273d5aa5 100644 --- a/docs/administrator/import.md +++ b/docs/administrator/import.md @@ -24,7 +24,7 @@ venv/bin/funkwhale-manage import_files --help :sync: docker ```{code-block} sh -sudo docker compose run --rm api funkwhale-manage import_files --help +docker compose run --rm api funkwhale-manage import_files --help ``` ::: @@ -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 - sudo docker compose run --rm api funkwhale-manage 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. @@ -250,7 +250,7 @@ venv/bin/funkwhale-manage import_files $LIBRARY_ID "/srv/funkwhale/data/music/nf :sync: docker ```{code-block} sh -sudo docker compose run --rm api funkwhale-manage 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 ``` ::: @@ -281,7 +281,7 @@ venv/bin/funkwhale-manage import_files $LIBRARY_ID "/srv/funkwhale/data/music/nf :sync: docker ```{code-block} sh -sudo docker compose run --rm api funkwhale-manage 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 ``` ::: diff --git a/docs/administrator/installation/docker.md b/docs/administrator/installation/docker.md index fde0907a5..775b2516a 100644 --- a/docs/administrator/installation/docker.md +++ b/docs/administrator/installation/docker.md @@ -126,19 +126,19 @@ Once you've filled in your environment file, you can set up Funkwhale. Follow th ```{code-block} sh cd /srv/funkwhale - sudo docker compose pull + docker compose pull ``` 2. Bring up the database container so you can run the database migrations. ```{code-block} sh - sudo docker compose up -d postgres + docker compose up -d postgres ``` 3. Run the database migrations. ```{code-block} sh - sudo docker compose run --rm api funkwhale-manage migrate + docker compose run --rm api funkwhale-manage migrate ``` ````{note} @@ -154,13 +154,13 @@ Once you've filled in your environment file, you can set up Funkwhale. Follow th 4. Create your superuser. ```{code-block} sh - sudo docker compose run --rm api funkwhale-manage fw users create --superuser + docker compose run --rm api funkwhale-manage fw users create --superuser ``` 5. Launch all the containers to bring up your pod. ```{code-block} sh - sudo docker compose up -d + docker compose up -d ``` That's it! Your Funkwhale pod is now up and running. @@ -266,7 +266,7 @@ The frontend container ships default Nginx templates which serve content to the 6. Bring the `front` container up again to pick up the changes. ```{code-block} sh - sudo docker compose up -d front + docker compose up -d front ``` That's it! The container mounts your custom nginx files and uses its values to serve Funkwhale content. To revert to the default values, comment out the volumes by adding a `#` in front of them and bring the `front` container back up. diff --git a/docs/administrator/installation/migrate.md b/docs/administrator/installation/migrate.md index 28860368e..2552c2b4c 100644 --- a/docs/administrator/installation/migrate.md +++ b/docs/administrator/installation/migrate.md @@ -62,7 +62,7 @@ On your {term}`destination server`, follow the [installation guide](docker.md). Once you have finished the installation, stop the Funkwhale services. These shouldn't be running when you copy your existing data over. ```{code-block} sh -sudo docker compose stop +docker compose stop ``` ::: @@ -87,7 +87,7 @@ sudo -u postgres -H pg_dump funkwhale > /srv/funkwhale/dump.sql :sync: docker ```{code-block} sh -sudo docker compose exec postgres pg_dumpall -c -U postgres > dump.sql +docker compose exec postgres pg_dumpall -c -U postgres > dump.sql ``` ::: @@ -157,19 +157,19 @@ You need to initialize the postgres container on your {term}`destination server` CREATE USER funkwhale; \ GRANT ALL PRIVILEGES ON DATABASE funkwhale TO funkwhale;" > init.sql # Create an init.sql file with the correct permissions - sudo docker compose run --rm postgres psql -U postgres -d postgres < "init.sql" # Import the init.sql file + docker compose run --rm postgres psql -U postgres -d postgres < "init.sql" # Import the init.sql file ``` 2. Import your database backup. ```{code-block} sh - sudo docker compose run --rm postgres psql -U postgres -d postgres < "dump.sql" + docker compose run --rm postgres psql -U postgres -d postgres < "dump.sql" ``` 3. When the import finishes, run the `funkwhale-manage migrate` command to set up the database. ```{code-block} sh - sudo docker compose run --rm api funkwhale-manage migrate + docker compose run --rm api funkwhale-manage migrate ``` ::: @@ -198,7 +198,7 @@ sudo systemctl start funkwhale.target :sync: docker ```{code-block} sh -sudo docker compose up -d +docker compose up -d ``` ::: diff --git a/docs/administrator/manage-script/create-library.md b/docs/administrator/manage-script/create-library.md index 06b364a34..d56c8de75 100644 --- a/docs/administrator/manage-script/create-library.md +++ b/docs/administrator/manage-script/create-library.md @@ -47,7 +47,7 @@ venv/bin/funkwhale-manage create_library username1 --name="Library 1" --privacy- :sync: docker ```{code-block} sh -sudo docker compose run --rm api funkwhale-manage 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" ``` ::: @@ -79,7 +79,7 @@ venv/bin/funkwhale-manage create_library username1 :sync: docker ```{code-block} sh -sudo docker compose run --rm api funkwhale-manage create_library username1 +docker compose run --rm api funkwhale-manage create_library username1 ``` ::: @@ -111,7 +111,7 @@ venv/bin/funkwhale-manage create_library username1 --name="Library 1" --privacy- :sync: docker ```{code-block} sh -sudo docker compose run --rm api funkwhale-manage 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" ``` ::: diff --git a/docs/administrator/manage-script/database.md b/docs/administrator/manage-script/database.md index 1e938f5ae..d5068778a 100644 --- a/docs/administrator/manage-script/database.md +++ b/docs/administrator/manage-script/database.md @@ -25,7 +25,7 @@ venv/bin/funkwhale-manage check_inplace_files :sync: docker ```{code-block} sh -sudo docker compose run --rm api funkwhale-manage check_inplace_files +docker compose run --rm api funkwhale-manage check_inplace_files ``` ::: diff --git a/docs/administrator/manage-script/fix-uploads.md b/docs/administrator/manage-script/fix-uploads.md index 2b56ff295..99dde8bd5 100644 --- a/docs/administrator/manage-script/fix-uploads.md +++ b/docs/administrator/manage-script/fix-uploads.md @@ -23,7 +23,7 @@ venv/bin/funkwhale-manage fix_uploads --mimetype :sync: docker ```{code-block} sh -sudo docker compose run --rm api funkwhale-manage fix_uploads --mimetype +docker compose run --rm api funkwhale-manage fix_uploads --mimetype ``` ::: @@ -48,7 +48,7 @@ venv/bin/funkwhale-manage fix_uploads --audio-data :sync: docker ```{code-block} sh -sudo docker compose run --rm api funkwhale-manage fix_uploads --audio-data +docker compose run --rm api funkwhale-manage fix_uploads --audio-data ``` ::: @@ -73,7 +73,7 @@ venv/bin/funkwhale-manage fix_uploads --size :sync: docker ```{code-block} sh -sudo docker compose run --rm api funkwhale-manage fix_uploads --size +docker compose run --rm api funkwhale-manage fix_uploads --size ``` ::: @@ -98,7 +98,7 @@ venv/bin/funkwhale-manage fix_uploads --checksum :sync: docker ```{code-block} sh -sudo docker compose run --rm api funkwhale-manage fix_uploads --checksum +docker compose run --rm api funkwhale-manage fix_uploads --checksum ``` ::: @@ -123,7 +123,7 @@ venv/bin/funkwhale-manage fix_uploads --batch-size 500 :sync: docker ```{code-block} sh -sudo docker compose run --rm api funkwhale-manage fix_uploads --batch-size 500 +docker compose run --rm api funkwhale-manage fix_uploads --batch-size 500 ``` ::: diff --git a/docs/administrator/manage-script/library.md b/docs/administrator/manage-script/library.md index 52f701e1c..9f6e53d46 100644 --- a/docs/administrator/manage-script/library.md +++ b/docs/administrator/manage-script/library.md @@ -29,7 +29,7 @@ venv/bin/funkwhale-manage prune_library --tracks :sync: docker ```bash -sudo docker compose run --rm api funkwhale-manage prune_library --tracks +docker compose run --rm api funkwhale-manage prune_library --tracks ``` ::: @@ -52,7 +52,7 @@ venv/bin/funkwhale-manage prune_library --albums :sync: docker ```{code-block} sh -sudo docker compose run --rm api funkwhale-manage prune_library --albums +docker compose run --rm api funkwhale-manage prune_library --albums ``` ::: @@ -75,7 +75,7 @@ venv/bin/funkwhale-manage prune_library --artists :sync: docker ```{code-block} sh -sudo docker compose run --rm api funkwhale-manage prune_library --artists +docker compose run --rm api funkwhale-manage prune_library --artists ``` ::: @@ -98,7 +98,7 @@ venv/bin/funkwhale-manage prune_library --tracks --albums --artists :sync: docker ```{code-block} sh -sudo docker compose run --rm api funkwhale-manage prune_library --tracks --albums --artists +docker compose run --rm api funkwhale-manage prune_library --tracks --albums --artists ``` ::: @@ -121,7 +121,7 @@ venv/bin/funkwhale-manage prune_library --help :sync: docker ```{code-block} sh -sudo docker compose run --rm api funkwhale-manage prune_library --help +docker compose run --rm api funkwhale-manage prune_library --help ``` ::: diff --git a/docs/administrator/manage-script/mbid_prune.md b/docs/administrator/manage-script/mbid_prune.md index 2d5c963af..9e81a35fe 100644 --- a/docs/administrator/manage-script/mbid_prune.md +++ b/docs/administrator/manage-script/mbid_prune.md @@ -25,7 +25,7 @@ venv/bin/funkwhale-manage prune_non_mbid_content :sync: docker ```{code-block} sh -sudo docker compose run --rm api funkwhale-manage prune_non_mbid_content +docker compose run --rm api funkwhale-manage prune_non_mbid_content ``` ::: diff --git a/docs/administrator/manage-script/tags.md b/docs/administrator/manage-script/tags.md index 91e772b8a..61f6b65b5 100644 --- a/docs/administrator/manage-script/tags.md +++ b/docs/administrator/manage-script/tags.md @@ -45,7 +45,7 @@ To add tags to untagged albums: 3. Run the `funkwhale-manage` command line interface to generate tags for untagged albums. ```{code-block} sh - sudo docker compose run --rm api funkwhale-manage fw albums add-tags-from-tracks + docker compose run --rm api funkwhale-manage fw albums add-tags-from-tracks ``` ::: @@ -88,7 +88,7 @@ To add tags to untagged artists: 3. Run the `funkwhale-manage` command line interface to generate tags for untagged artists. ```{code-block} sh - sudo docker compose run --rm api funkwhale-manage fw artists add-tags-from-tracks + docker compose run --rm api funkwhale-manage fw artists add-tags-from-tracks ``` ::: diff --git a/docs/administrator/manage-script/thumbnails.md b/docs/administrator/manage-script/thumbnails.md index 01c223736..5879590e2 100644 --- a/docs/administrator/manage-script/thumbnails.md +++ b/docs/administrator/manage-script/thumbnails.md @@ -53,7 +53,7 @@ To generate new thumbnails: 4. Run the `funkwhale-manage` command line interface to regenerate the thumbnails. ```{code-block} sh - sudo docker compose run --rm api funkwhale-manage fw media generate-thumbnails + docker compose run --rm api funkwhale-manage fw media generate-thumbnails ``` ::: diff --git a/docs/administrator/manage-script/update-s3-links.md b/docs/administrator/manage-script/update-s3-links.md index 4aceefbe1..a4bf828d7 100644 --- a/docs/administrator/manage-script/update-s3-links.md +++ b/docs/administrator/manage-script/update-s3-links.md @@ -60,7 +60,7 @@ This command doesn't move files. It only updates the location of the file to its 3. Run the `funkwhale-manage` command line interface to update your in-place imports. ```{code-block} console - $ sudo docker compose run --rm api funkwhale-manage inplace_to_s3 --no-dry-run + $ docker compose run --rm api funkwhale-manage inplace_to_s3 --no-dry-run ``` ::: @@ -101,7 +101,7 @@ This command doesn't move files. It only updates the location of the file to its 3. Run the `funkwhale-manage` command line interface to update your in-place imports. ```{code-block} console - $ sudo docker compose run --rm api funkwhale-manage inplace_to_s3 --source "/music" --no-dry-run + $ docker compose run --rm api funkwhale-manage inplace_to_s3 --source "/music" --no-dry-run ``` ::: @@ -144,7 +144,7 @@ All in-place imports in the `/music` folder are updated to reference the `/music 3. Run the `funkwhale-manage` command line interface to update your in-place imports. ```{code-block} console - $ sudo docker compose run --rm api funkwhale-manage inplace_to_s3 --source "/music" --target "/new_import" --no-dry-run + $ docker compose run --rm api funkwhale-manage inplace_to_s3 --source "/music" --target "/new_import" --no-dry-run ``` ::: diff --git a/docs/administrator/manage-script/users.md b/docs/administrator/manage-script/users.md index e525a6bb0..d1b01ac12 100644 --- a/docs/administrator/manage-script/users.md +++ b/docs/administrator/manage-script/users.md @@ -25,7 +25,7 @@ venv/bin/funkwhale-manage fw users create :sync: docker ```{code-block} sh -sudo docker compose run --rm api funkwhale-manage fw users create +docker compose run --rm api funkwhale-manage fw users create ``` ::: @@ -48,7 +48,7 @@ venv/bin/funkwhale-manage fw users create --username --email --email -p "" +docker compose run --rm api funkwhale-manage fw users create --username --email -p "" ``` ::: @@ -73,7 +73,7 @@ venv/bin/funkwhale-manage fw users create --username --email -sudo docker compose run --rm api funkwhale-manage fw users create --username --email +docker compose run --rm api funkwhale-manage fw users create --username --email ``` ::: @@ -96,7 +96,7 @@ venv/bin/funkwhale-manage fw users --help :sync: docker ```{code-block} sh -sudo docker compose run --rm api funkwhale-manage fw users --help +docker compose run --rm api funkwhale-manage fw users --help ``` ::: @@ -123,7 +123,7 @@ venv/bin/funkwhale-manage fw users set --upload-quota 500 :sync: docker ```{code-block} sh -sudo docker compose run --rm api funkwhale-manage fw users set --upload-quota 500 +docker compose run --rm api funkwhale-manage fw users set --upload-quota 500 ``` ::: @@ -146,7 +146,7 @@ venv/bin/funkwhale-manage fw users set --staff --superuser :sync: docker ```{code-block} sh -sudo docker compose run --rm api funkwhale-manage fw users set --staff --superuser +docker compose run --rm api funkwhale-manage fw users set --staff --superuser ``` ::: @@ -169,7 +169,7 @@ venv/bin/funkwhale-manage fw users set --no-staff --no-superuser :sync: docker ```{code-block} sh -sudo docker compose run --rm api funkwhale-manage fw users set --no-staff --no-superuser +docker compose run --rm api funkwhale-manage fw users set --no-staff --no-superuser ``` ::: @@ -192,7 +192,7 @@ venv/bin/funkwhale-manage fw users set --permission-moderation :sync: docker ```{code-block} sh -sudo docker compose run --rm api funkwhale-manage fw users set --permission-moderation +docker compose run --rm api funkwhale-manage fw users set --permission-moderation ``` ::: @@ -215,7 +215,7 @@ venv/bin/funkwhale-manage fw users set --password "" :sync: docker ```{code-block} sh -sudo docker compose run --rm api funkwhale-manage fw users set --password "" +docker compose run --rm api funkwhale-manage fw users set --password "" ``` ::: @@ -240,7 +240,7 @@ venv/bin/funkwhale-manage fw users set ```{code-block} sh export FUNKWHALE_CLI_USER_UPDATE_PASSWORD= -sudo docker compose run --rm api funkwhale-manage fw users set +docker compose run --rm api funkwhale-manage fw users set ``` ::: @@ -263,7 +263,7 @@ venv/bin/funkwhale-manage fw users set --help :sync: docker ```{code-block} sh -sudo docker compose run --rm api funkwhale-manage fw users set --help +docker compose run --rm api funkwhale-manage fw users set --help ``` ::: @@ -290,7 +290,7 @@ venv/bin/funkwhale-manage fw users rm :sync: docker ```{code-block} py -sudo docker compose run --rm api funkwhale-manage fw users rm +docker compose run --rm api funkwhale-manage fw users rm ``` ::: @@ -315,7 +315,7 @@ venv/bin/funkwhale-manage fw users rm --hard :sync: docker ```{code-block} py -sudo docker compose run --rm api funkwhale-manage fw users rm --hard +docker compose run --rm api funkwhale-manage fw users rm --hard ``` ::: @@ -338,7 +338,7 @@ venv/bin/funkwhale-manage fw users rm --help :sync: docker ```{code-block} sh -sudo docker compose run --rm api funkwhale-manage fw users rm --help +docker compose run --rm api funkwhale-manage fw users rm --help ``` ::: diff --git a/docs/administrator/migration.md b/docs/administrator/migration.md index b15d11b9a..e280bd650 100644 --- a/docs/administrator/migration.md +++ b/docs/administrator/migration.md @@ -35,7 +35,7 @@ Follow this guide to migrate a mono-container installation to a multi-container 1. Create a backup of your Funkwhale database. We will import this into the new postgres container later. ```{code-block} sh - sudo docker compose exec funkwhale /usr/bin/pg_dumpall -U funkwhale > db_dump.sql + docker compose exec funkwhale /usr/bin/pg_dumpall -U funkwhale > db_dump.sql ``` ## Stop your Funkwhale instance @@ -43,7 +43,7 @@ Follow this guide to migrate a mono-container installation to a multi-container 1. Stop all Funkwhale services. This ensures that no data is changed while you migrate your instance. ```{code-block} sh - sudo docker compose down + docker compose down ``` ## Prepare the multi-container setup diff --git a/docs/administrator/troubleshooting/backend.md b/docs/administrator/troubleshooting/backend.md index 9a065d43c..1c1a3a9b9 100644 --- a/docs/administrator/troubleshooting/backend.md +++ b/docs/administrator/troubleshooting/backend.md @@ -47,7 +47,7 @@ journalctl -xn -u funkwhale-server :sync: docker ```{code-block} sh -sudo docker compose logs -f --tail=50 api # Follow the last 50 messages +docker compose logs -f --tail=50 api # Follow the last 50 messages ``` ::: @@ -70,7 +70,7 @@ journalctl -xn -u funkwhale-worker :sync: docker ```{code-block} sh -sudo docker compose logs -f --tail=50 celery # Follow the last 50 messages +docker compose logs -f --tail=50 celery # Follow the last 50 messages ``` ::: @@ -150,7 +150,7 @@ If your Funkwhale server uses more memory than expected, you can check the footp :sync: docker ```{code-block} sh - sudo docker compose restart + docker compose restart ``` ::: @@ -189,7 +189,7 @@ To disable memory tracing: :sync: docker ```{code-block} sh - sudo docker compose restart + docker compose restart ``` ::: diff --git a/docs/administrator/uninstall/docker.md b/docs/administrator/uninstall/docker.md index dd63141e9..e65f4a3c7 100644 --- a/docs/administrator/uninstall/docker.md +++ b/docs/administrator/uninstall/docker.md @@ -24,7 +24,7 @@ Before you remove any data, you need to stop the Funkwhale containers. 2. Stop the containers ```{code-block} sh - sudo docker compose down + docker compose down ``` ## Remove the reverse proxy @@ -80,7 +80,7 @@ This action is __irreversible__. Make sure you have [backed up your data](../upg Once you have stopped the containers, you can delete all containers and associated volumes. ```{code-block} sh -sudo docker compose rm -fsv +docker compose rm -fsv ``` ## Remove the Funkwhale directory diff --git a/docs/administrator/upgrade/backup.md b/docs/administrator/upgrade/backup.md index bd5d72fbe..02d257c36 100644 --- a/docs/administrator/upgrade/backup.md +++ b/docs/administrator/upgrade/backup.md @@ -21,13 +21,13 @@ Before performing big changes, we recommend you back up your database and media 1. Stop the running containers: ```console - $ sudo docker compose down + $ docker compose down ``` 2. Dump the database to a backup file: ```console - $ sudo docker compose run --rm postgres pg_dump -U postgres postgres > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql + $ docker compose run --rm postgres pg_dump -U postgres postgres > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql ``` ::: @@ -133,19 +133,19 @@ To restore your database, do the following: 1. Restore your database backup. ```console - $ sudo docker compose run --rm -T postgres psql -U postgres postgres < "/path/to/your/backup/dump.sql" + $ docker compose run --rm -T postgres psql -U postgres postgres < "/path/to/your/backup/dump.sql" ``` 2. Run the `funkwhale-manage migrate` command to set up the database. ```console - $ sudo docker compose run --rm api funkwhale-manage migrate + $ docker compose run --rm api funkwhale-manage migrate ``` 3. Restart the services. ```console - $ sudo docker compose up -d + $ docker compose up -d ``` ::: diff --git a/docs/developer/contribute/api.md b/docs/developer/contribute/api.md index bd85f86df..c9bfd07f8 100644 --- a/docs/developer/contribute/api.md +++ b/docs/developer/contribute/api.md @@ -36,7 +36,7 @@ Try to keep your tests small and focused. Each test should test a single functio Test files must target a module and follow the `funkwhale_api` directory structure. If you write tests for `funkwhale_api/myapp/views.py`, you should put them in `tests/myapp/test_views.py`. ``` -We provide utilities and fixtures to make writing tests as easy as possible. You can see the list of available fixtures by running `sudo docker compose -f dev.yml run --rm api pytest --fixtures`. +We provide utilities and fixtures to make writing tests as easy as possible. You can see the list of available fixtures by running `docker compose run --rm api pytest --fixtures`. ### Factories @@ -134,17 +134,17 @@ def test_downgrade_not_superuser_skips_email(factories, mocker): You can run all tests in the pytest suite with the following command: ```sh -sudo docker compose -f dev.yml run --rm api pytest +docker compose run --rm api pytest ``` Run a specific test file by calling pytest against it: ```sh -sudo docker compose -f dev.yml run --rm api pytest tests/music/test_models.py +docker compose run --rm api pytest tests/music/test_models.py ``` You can check the full list of options by passing the `-h` flag: ```sh -sudo docker compose -f dev.yml run --rm api pytest -h +docker compose run --rm api pytest -h ``` diff --git a/docs/developer/contribute/frontend.md b/docs/developer/contribute/frontend.md index c962bd955..a43608f53 100644 --- a/docs/developer/contribute/frontend.md +++ b/docs/developer/contribute/frontend.md @@ -26,11 +26,11 @@ The Funkwhale frontend contains some tests to catch errors before changes go liv To run the test suite, run the following command: ```sh -sudo docker compose -f dev.yml run --rm front yarn test:unit +docker compose run --rm front yarn test:unit ``` To run tests as you make changes, launch the test suite with the `-w` flag: ```sh -sudo docker compose -f dev.yml run --rm front yarn test:unit -w +docker compose run --rm front yarn test:unit -w ``` diff --git a/docs/developer/plugins/install.md b/docs/developer/plugins/install.md index 12bc0cd19..1b46fc9db 100644 --- a/docs/developer/plugins/install.md +++ b/docs/developer/plugins/install.md @@ -40,7 +40,7 @@ You can install third-party plugins using the `funkwhale-manage` command line in :::{tab-item} Docker ```{code-block} shell - sudo docker compose run --rm api funkwhale-manage fw plugins install https://plugin_url.zip + docker compose run --rm api funkwhale-manage fw plugins install https://plugin_url.zip ``` ::: diff --git a/docs/developer/setup/docker.md b/docs/developer/setup/docker.md index 9ebf86c18..e267c43a3 100644 --- a/docs/developer/setup/docker.md +++ b/docs/developer/setup/docker.md @@ -30,16 +30,10 @@ Funkwhale can be run in Docker containers for local development. You can work on ## Set up your Docker environment -````{note} - -Funkwhale provides a `dev.yml` file that contains the required docker compose setup. You need to pass the `-f dev.yml` flag you run docker compose commands to ensure it uses this file. If you don't want to add this each time, you can export it as a `COMPOSE_FILE` variable: - -```sh -export COMPOSE_FILE=dev.yml +```{note} +Funkwhale provides a `compose.yml` file following the default file naming convention of a Docker Compose manifest. For Linux users, we assume that you finished the post-install steps to [manage Docker as a non-root user](https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user). ``` -```` - To set up your Docker environment: 1. Create a `.env` file to enable customization of your setup. @@ -64,7 +58,7 @@ To set up your Docker environment: Once you've set everything up, you need to build the containers. Run this command any time there are upstream changes or dependency changes to ensure you're up-to-date. ```sh -sudo docker compose -f dev.yml build +docker compose build ``` ## Set up the database @@ -72,7 +66,7 @@ sudo docker compose -f dev.yml build Funkwhale relies on a postgresql database to store information. To set this up, you need to run the `funkwhale-manage migrate` command: ```sh -sudo docker compose -f dev.yml run --rm api funkwhale-manage migrate +docker compose 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 +78,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 - sudo docker compose -f dev.yml run --rm api funkwhale-manage fw users create --superuser + docker compose run --rm api funkwhale-manage fw users create --superuser ``` 2. Add some fake data to populate the database. The following command creates 25 artists with random albums, tracks, and metadata. @@ -92,7 +86,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 | sudo docker compose -f dev.yml run --rm -T api funkwhale-manage shell -i python + echo $command | docker compose run --rm -T api funkwhale-manage shell -i python ``` ## Manage services @@ -100,7 +94,7 @@ You need to create some local data to mimic a production environment. Once you have set up your containers, launch all services to start working on them: ```sh -sudo docker compose -f dev.yml up front api nginx celeryworker +docker compose up front api nginx celeryworker ``` This gives you access to the following: @@ -112,13 +106,13 @@ This gives you access to the following: Once you're done with the containers, you can stop them all: ```sh -sudo docker compose -f dev.yml stop +docker compose stop ``` If you want to destroy your containers, run the following: ```sh -sudo docker compose -f dev.yml down -v +docker compose down -v ``` ## Set up federation support @@ -178,7 +172,7 @@ To run a reverse proxy for your app: 2. Launch traefik using the bundled configuration: ```sh - sudo docker compose -f docker/traefik.yml up -d + docker compose -f docker/traefik.yml up -d ``` 3. Set up as many different projects as you need. Make sure the `COMPOSE_PROJECT_NAME` and `VUE_PORT` variables are unique per instance @@ -186,9 +180,9 @@ 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 - sudo docker compose -f dev.yml run --rm api funkwhale-manage migrate - sudo docker compose -f dev.yml run --rm api funkwhale-manage fw users create --superuser - sudo docker compose -f dev.yml up nginx api front nginx api celeryworker + docker compose run --rm api funkwhale-manage migrate + docker compose run --rm api funkwhale-manage fw users create --superuser + docker compose up nginx api front nginx api celeryworker ``` You can access your project at `https://{COMPOSE_PROJECT_NAME}.funkwhale.test`. diff --git a/docs/locales/en_GB/LC_MESSAGES/changelog.po b/docs/locales/en_GB/LC_MESSAGES/changelog.po index ee95129a1..33f315b9b 100644 --- a/docs/locales/en_GB/LC_MESSAGES/changelog.po +++ b/docs/locales/en_GB/LC_MESSAGES/changelog.po @@ -9174,7 +9174,7 @@ msgstr "" #~ msgid "```sh sudo docker-compose down ```" #~ msgstr "" -#~ msgid "```sh sudo docker compose up -d ```" +#~ msgid "```sh docker compose up -d ```" #~ msgstr "" #~ msgid "" @@ -10079,4 +10079,3 @@ msgstr "" #~ "shortcut to toggle the currently playing" #~ " track as a favorite (#53)" #~ msgstr "" - diff --git a/docs/locales/en_GB/LC_MESSAGES/developer/contribute/api.po b/docs/locales/en_GB/LC_MESSAGES/developer/contribute/api.po index f797f8291..223ab12b7 100644 --- a/docs/locales/en_GB/LC_MESSAGES/developer/contribute/api.po +++ b/docs/locales/en_GB/LC_MESSAGES/developer/contribute/api.po @@ -144,7 +144,7 @@ msgstr "" msgid "" "We provide utilities and fixtures to make writing tests as easy as " "possible. You can see the list of available fixtures by running `sudo " -"docker compose -f dev.yml run --rm api pytest --fixtures`." +"docker compose run --rm api pytest --fixtures`." msgstr "" #: ../../developer_documentation/contribute/api.md:41 @@ -183,4 +183,3 @@ msgstr "" #: ../../developer_documentation/contribute/api.md:146 msgid "You can check the full list of options by passing the `-h` flag:" msgstr "" - diff --git a/docs/locales/en_US/LC_MESSAGES/changelog.po b/docs/locales/en_US/LC_MESSAGES/changelog.po index ee95129a1..33f315b9b 100644 --- a/docs/locales/en_US/LC_MESSAGES/changelog.po +++ b/docs/locales/en_US/LC_MESSAGES/changelog.po @@ -9174,7 +9174,7 @@ msgstr "" #~ msgid "```sh sudo docker-compose down ```" #~ msgstr "" -#~ msgid "```sh sudo docker compose up -d ```" +#~ msgid "```sh docker compose up -d ```" #~ msgstr "" #~ msgid "" @@ -10079,4 +10079,3 @@ msgstr "" #~ "shortcut to toggle the currently playing" #~ " track as a favorite (#53)" #~ msgstr "" - diff --git a/docs/locales/en_US/LC_MESSAGES/developer/contribute/api.po b/docs/locales/en_US/LC_MESSAGES/developer/contribute/api.po index f797f8291..223ab12b7 100644 --- a/docs/locales/en_US/LC_MESSAGES/developer/contribute/api.po +++ b/docs/locales/en_US/LC_MESSAGES/developer/contribute/api.po @@ -144,7 +144,7 @@ msgstr "" msgid "" "We provide utilities and fixtures to make writing tests as easy as " "possible. You can see the list of available fixtures by running `sudo " -"docker compose -f dev.yml run --rm api pytest --fixtures`." +"docker compose run --rm api pytest --fixtures`." msgstr "" #: ../../developer_documentation/contribute/api.md:41 @@ -183,4 +183,3 @@ msgstr "" #: ../../developer_documentation/contribute/api.md:146 msgid "You can check the full list of options by passing the `-h` flag:" msgstr "" - diff --git a/docs/locales/fr/LC_MESSAGES/changelog.po b/docs/locales/fr/LC_MESSAGES/changelog.po index c62f51959..cd3343089 100644 --- a/docs/locales/fr/LC_MESSAGES/changelog.po +++ b/docs/locales/fr/LC_MESSAGES/changelog.po @@ -9181,7 +9181,7 @@ msgstr "" #~ msgid "```sh sudo docker-compose down ```" #~ msgstr "" -#~ msgid "```sh sudo docker compose up -d ```" +#~ msgid "```sh docker compose up -d ```" #~ msgstr "" #~ msgid "" diff --git a/docs/locales/fr/LC_MESSAGES/developer/contribute/api.po b/docs/locales/fr/LC_MESSAGES/developer/contribute/api.po index f797f8291..223ab12b7 100644 --- a/docs/locales/fr/LC_MESSAGES/developer/contribute/api.po +++ b/docs/locales/fr/LC_MESSAGES/developer/contribute/api.po @@ -144,7 +144,7 @@ msgstr "" msgid "" "We provide utilities and fixtures to make writing tests as easy as " "possible. You can see the list of available fixtures by running `sudo " -"docker compose -f dev.yml run --rm api pytest --fixtures`." +"docker compose run --rm api pytest --fixtures`." msgstr "" #: ../../developer_documentation/contribute/api.md:41 @@ -183,4 +183,3 @@ msgstr "" #: ../../developer_documentation/contribute/api.md:146 msgid "You can check the full list of options by passing the `-h` flag:" msgstr "" - diff --git a/docs/locales/gettext/developer/contribute/api.pot b/docs/locales/gettext/developer/contribute/api.pot index 8699dc2ba..304061c10 100644 --- a/docs/locales/gettext/developer/contribute/api.pot +++ b/docs/locales/gettext/developer/contribute/api.pot @@ -109,7 +109,7 @@ msgid "Test files must target a module and follow the `funkwhale_api` directory msgstr "" #: ../../developer/contribute/api.md:39 -msgid "We provide utilities and fixtures to make writing tests as easy as possible. You can see the list of available fixtures by running `sudo docker compose -f dev.yml run --rm api pytest --fixtures`." +msgid "We provide utilities and fixtures to make writing tests as easy as possible. You can see the list of available fixtures by running `docker compose run --rm api pytest --fixtures`." msgstr "" #: ../../developer/contribute/api.md:41