Skip to content
Snippets Groups Projects
Commit 0dae0d50 authored by Creak's avatar Creak
Browse files

Merge branch 'upgrade-to-1.2.3' into 'main'

Upgrade to 1.2.3

See merge request !7
parents 2d75f956 2533d1c4
Branches
Tags
1 merge request!7Upgrade to 1.2.3
Pipeline #19864 passed
#!/bin/bash
## Install Funkwhale using Docker (the multi-container installation)
## Documentation: https://docs.funkwhale.audio/installation/docker.html#docker-multi-container
set -e
funkwhale_version_default=1.2.2
funkwhale_version_default=1.2.3
funkwhale_version="${FUNKWHALE_VERSION-$funkwhale_version_default}"
funkwhale_hostname=""
......@@ -11,7 +14,7 @@ funkwhale_userpasswd=""
funkwhale_useremail=""
# Show an error message and exit.
# Params:
# Parameters:
# 1. message
function die()
{
......@@ -20,7 +23,7 @@ function die()
}
# Get the value out of a "key=value" argument.
# Params:
# Parameters:
# 1. the option (in the format "key=value")
function get_not_empty_arg()
{
......@@ -34,7 +37,7 @@ function get_not_empty_arg()
}
# Show the help text.
# No param.
# No parameter.
function show_help()
{
local bin_name
......@@ -74,7 +77,7 @@ HELP
}
# Run an interactive shell to prompt for a value.
# Params:
# Parameters:
# 1. the prompt text
# 2. the variable name
function prompt_value()
......@@ -91,7 +94,7 @@ function prompt_value()
}
# Run an interactive shell to prompt for a password.
# Params:
# Parameters:
# 1. the prompt text
# 2. the variable name
function prompt_password()
......@@ -235,25 +238,25 @@ fi
echo -n "Fetching the template files... "
raw_src="https://dev.funkwhale.audio/funkwhale/funkwhale/raw/${funkwhale_version}/deploy"
mkdir -p "templates/nginx"
pushd "templates" > /dev/null
curl -sLo "nginx/funkwhale.template" "${raw_src}/docker.nginx.template"
curl -sLo "nginx/funkwhale_proxy.conf" "${raw_src}/docker.funkwhale_proxy.conf"
curl -sLo "docker-compose.yml" "${raw_src}/docker-compose.yml"
curl -sLo "env.prod.sample" "${raw_src}/env.prod.sample"
popd > /dev/null
curl -sLo "templates/nginx/funkwhale.template" "${raw_src}/docker.nginx.template"
curl -sLo "templates/nginx/funkwhale_proxy.conf" "${raw_src}/docker.funkwhale_proxy.conf"
curl -sLo "templates/docker-compose.yml" "${raw_src}/docker-compose.yml"
curl -sLo "templates/env.prod.sample" "${raw_src}/env.prod.sample"
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/"
cp "templates/docker-compose.yml" "funkwhale/"
cp "templates/env.prod.sample" "funkwhale/.env"
# Enter working directory
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"
# Set up the Funkwhale instance files
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment