Commit 0bd663c6 authored by Creak's avatar Creak
Browse files

Merge branch 'upgrade-path' into 'main'

A new upgrade.sh script to upgrade your Funkwhale instance

See merge request !8
parents 0dae0d50 3e9468c3
Pipeline #20784 passed with stage
in 7 seconds
......@@ -5,4 +5,4 @@ linter:
stage: test
image: koalaman/shellcheck-alpine
script:
- shellcheck setup.sh clean.sh
- shellcheck **.sh
......@@ -8,16 +8,27 @@ This repo is here to help installing Funkwhale using Docker. It follows the
Prerequisites:
* docker-compose
## Setup
## Install Funkwhale
To set up your instance, clone this repo and enter the directory, then run the
script `./setup.sh`.
script `./install.sh`.
This script will ask for the needed information, but it is also possible to
pass them to it directly. See the help with this command:
```sh
./setup.sh --help
./install.sh --help
```
## Upgrade Funkwhale
To upgrade your instance, define the new version in FUNKWHALE_VERSION
environment variable and run the script `./upgrade.sh`.
Example:
```sh
FUNKWHALE_VERSION=1.2.5 ./upgrade.sh
```
## Clean
......
#!/bin/bash
set -e
if [ -d funkwhale ]; then
......
......@@ -4,7 +4,7 @@
set -e
funkwhale_version_default=1.2.3
funkwhale_version_default=1.2.5
funkwhale_version="${FUNKWHALE_VERSION-$funkwhale_version_default}"
funkwhale_hostname=""
......
#!/bin/bash
set -e
if [ -z "$FUNKWHALE_VERSION" ]; then
echo "ERROR: Couldn't find a FUNKWHALE_VERSION environment variable" >&2
exit 1
fi
funkwhale_version="$FUNKWHALE_VERSION"
# Fetch the template files
echo -n "Fetching the template files... "
raw_src="https://dev.funkwhale.audio/funkwhale/funkwhale/raw/${funkwhale_version}/deploy"
mkdir -p "templates/nginx"
curl -sLo "templates/nginx/funkwhale.template" "${raw_src}/docker.nginx.template"
curl -sLo "templates/nginx/funkwhale_proxy.conf" "${raw_src}/docker.funkwhale_proxy.conf"
echo "done"
# Copy the template files to the "funkwhale" directory
echo
echo "Copy files to the \"funkwhale\" directory"
mkdir -p "funkwhale/nginx"
cp "templates/nginx/funkwhale.template" "funkwhale/nginx/"
cp "templates/nginx/funkwhale_proxy.conf" "funkwhale/nginx/"
# Enter working directory
cd "funkwhale"
# Set up the Funkwhale instance files
echo "Set Funkwhale version: $funkwhale_version"
sed -i "s/FUNKWHALE_VERSION=.*$/FUNKWHALE_VERSION=$funkwhale_version/" .env
echo
echo "Pull the new Docker images"
docker-compose pull
echo
echo "Apply the database migrations"
docker-compose run --rm api python manage.py migrate
echo
echo "Relaunch the the Funkwhale instance"
docker-compose up -d
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment