Skip to content
Snippets Groups Projects

Upgrade to 1.2.3

Merged Creak requested to merge upgrade-to-1.2.3 into main
1 file
+ 20
17
Compare changes
  • Side-by-side
  • Inline
+ 20
17
#!/bin/bash
#!/bin/bash
 
## Install Funkwhale using Docker (the multi-container installation)
 
## Documentation: https://docs.funkwhale.audio/installation/docker.html#docker-multi-container
 
set -e
set -e
funkwhale_version_default=1.2.2
funkwhale_version_default=1.2.3
funkwhale_version="${FUNKWHALE_VERSION-$funkwhale_version_default}"
funkwhale_version="${FUNKWHALE_VERSION-$funkwhale_version_default}"
funkwhale_hostname=""
funkwhale_hostname=""
@@ -11,7 +14,7 @@ funkwhale_userpasswd=""
@@ -11,7 +14,7 @@ funkwhale_userpasswd=""
funkwhale_useremail=""
funkwhale_useremail=""
# Show an error message and exit.
# Show an error message and exit.
# Params:
# Parameters:
# 1. message
# 1. message
function die()
function die()
{
{
@@ -20,7 +23,7 @@ function die()
@@ -20,7 +23,7 @@ function die()
}
}
# Get the value out of a "key=value" argument.
# Get the value out of a "key=value" argument.
# Params:
# Parameters:
# 1. the option (in the format "key=value")
# 1. the option (in the format "key=value")
function get_not_empty_arg()
function get_not_empty_arg()
{
{
@@ -34,7 +37,7 @@ function get_not_empty_arg()
@@ -34,7 +37,7 @@ function get_not_empty_arg()
}
}
# Show the help text.
# Show the help text.
# No param.
# No parameter.
function show_help()
function show_help()
{
{
local bin_name
local bin_name
@@ -74,7 +77,7 @@ HELP
@@ -74,7 +77,7 @@ HELP
}
}
# Run an interactive shell to prompt for a value.
# Run an interactive shell to prompt for a value.
# Params:
# Parameters:
# 1. the prompt text
# 1. the prompt text
# 2. the variable name
# 2. the variable name
function prompt_value()
function prompt_value()
@@ -91,7 +94,7 @@ function prompt_value()
@@ -91,7 +94,7 @@ function prompt_value()
}
}
# Run an interactive shell to prompt for a password.
# Run an interactive shell to prompt for a password.
# Params:
# Parameters:
# 1. the prompt text
# 1. the prompt text
# 2. the variable name
# 2. the variable name
function prompt_password()
function prompt_password()
@@ -235,25 +238,25 @@ fi
@@ -235,25 +238,25 @@ fi
echo -n "Fetching the template files... "
echo -n "Fetching the template files... "
raw_src="https://dev.funkwhale.audio/funkwhale/funkwhale/raw/${funkwhale_version}/deploy"
raw_src="https://dev.funkwhale.audio/funkwhale/funkwhale/raw/${funkwhale_version}/deploy"
mkdir -p "templates/nginx"
mkdir -p "templates/nginx"
pushd "templates" > /dev/null
curl -sLo "templates/nginx/funkwhale.template" "${raw_src}/docker.nginx.template"
curl -sLo "nginx/funkwhale.template" "${raw_src}/docker.nginx.template"
curl -sLo "templates/nginx/funkwhale_proxy.conf" "${raw_src}/docker.funkwhale_proxy.conf"
curl -sLo "nginx/funkwhale_proxy.conf" "${raw_src}/docker.funkwhale_proxy.conf"
curl -sLo "templates/docker-compose.yml" "${raw_src}/docker-compose.yml"
curl -sLo "docker-compose.yml" "${raw_src}/docker-compose.yml"
curl -sLo "templates/env.prod.sample" "${raw_src}/env.prod.sample"
curl -sLo "env.prod.sample" "${raw_src}/env.prod.sample"
popd > /dev/null
echo "done"
echo "done"
# Copy the template files to the "funkwhale" directory
# Copy the template files to the "funkwhale" directory
echo
echo
echo "Copy files to the \"funkwhale\" directory"
echo "Copy files to the \"funkwhale\" directory"
mkdir -p "funkwhale/nginx"
mkdir -p "funkwhale/nginx"
 
cp "templates/nginx/funkwhale.template" "funkwhale/nginx/"
 
cp "templates/nginx/funkwhale_proxy.conf" "funkwhale/nginx/"
 
cp "templates/docker-compose.yml" "funkwhale/"
 
cp "templates/env.prod.sample" "funkwhale/.env"
 
 
# Enter working directory
cd "funkwhale"
cd "funkwhale"
cp "../templates/nginx/funkwhale.template" "nginx/"
cp "../templates/nginx/funkwhale_proxy.conf" "nginx/"
cp "../templates/docker-compose.yml" "./"
cp "../templates/env.prod.sample" ".env"
# reduce permissions on the .env file since it contains sensitive data
# Reduce permissions on the .env file since it contains sensitive data
chmod 600 ".env"
chmod 600 ".env"
# Set up the Funkwhale instance files
# Set up the Funkwhale instance files
Loading