Skip to content
Snippets Groups Projects
Commit 30c70ca4 authored by Creak's avatar Creak
Browse files

Add clean script

parent cf3830d6
No related branches found
No related tags found
No related merge requests found
Pipeline #19066 failed
......@@ -5,4 +5,4 @@ linter:
stage: test
image: koalaman/shellcheck-alpine
script:
- shellcheck setup.sh
- shellcheck **/*.sh
......@@ -8,6 +8,8 @@ This repo is here to help installing Funkwhale using Docker. It follows the
Prerequisites:
* docker-compose
## Setup
To set up your instance, clone this repo and enter the directory, then run the
script `./setup.sh`.
......@@ -18,9 +20,22 @@ pass them to it directly. See the help with this command:
./setup --help
```
## Clean
If you are doing tests, you might want to start from a blank slate each time.
The `clean.sh` script cleans the Docker containers, their volumes and the
residual files. Since running the containers needs to create volume bindings,
this script needs sudo rights in order to clean the files created with root
access.
Because of the security risk, please take a look at the script to understand
what it does: [`clean.sh`](./clean.sh)
## Developer
Prerequisites:
* spellchecker
[docs-multi-container]: https://docs.funkwhale.audio/installation/docker.html#docker-multi-container
clean.sh 0 → 100755
#!/bin/bash
set -e
if [ -d funkwhale ]; then
pushd funkwhale
docker-compose down
docker volume prune -f
if [ -d data ]; then
sudo rm -rf data
fi
popd
rm -rf funkwhale
fi
if [ -d /srv/funkwhale ]; then
sudo rm -rf /srv/funkwhale
fi
rm -rf templates
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment