Use templates according to FUNKWHALE_VERSION during install

This commit is contained in:
Eliot Berriot 2019-01-22 11:12:40 +01:00
parent ac76657f7b
commit 28d78458de
No known key found for this signature in database
GPG Key ID: DD6965E2476E5C27
2 changed files with 24 additions and 12 deletions

View File

@ -119,6 +119,12 @@ Multi-container installation
First, ensure you have `Docker <https://docs.docker.com/engine/installation/>`_ and `docker-compose <https://docs.docker.com/compose/install/>`_ installed.
Export the version you want to deploy:
.. parsed-literal::
export FUNKWHALE_VERSION="|version|"
Download the sample docker-compose file:
.. parsed-literal::
@ -126,9 +132,9 @@ Download the sample docker-compose file:
mkdir /srv/funkwhale
cd /srv/funkwhale
mkdir nginx
curl -L -o nginx/funkwhale.template "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/master/deploy/docker.nginx.template"
curl -L -o nginx/funkwhale_proxy.conf "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/master/deploy/funkwhale_proxy.conf"
curl -L -o docker-compose.yml "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/master/deploy/docker-compose.yml"
curl -L -o nginx/funkwhale.template "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/|version|/deploy/docker.nginx.template"
curl -L -o nginx/funkwhale_proxy.conf "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/|version|/deploy/funkwhale_proxy.conf"
curl -L -o docker-compose.yml "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/|version|/deploy/docker-compose.yml"
At this point, the architecture of ``/srv/funkwhale`` should look like that:
@ -136,7 +142,6 @@ At this point, the architecture of ``/srv/funkwhale`` should look like that:
.
├── docker-compose.yml
├── .env
└── nginx
├── funkwhale_proxy.conf
└── funkwhale.template
@ -145,8 +150,7 @@ Create your env file:
.. parsed-literal::
export FUNKWHALE_VERSION="|version|"
curl -L -o .env "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/master/deploy/env.prod.sample"
curl -L -o .env "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/|version|/deploy/env.prod.sample"
sed -i "s/FUNKWHALE_VERSION=latest/FUNKWHALE_VERSION=$FUNKWHALE_VERSION/" .env
sudo nano .env

View File

@ -149,11 +149,14 @@ match the application configuration and make upgrade/maintenance easier.
On docker deployments, run the following commands:
.. code:: shell
.. parsed-literal::
export FUNKWHALE_VERSION="|version|"
# download the needed files
curl -L -o /etc/nginx/funkwhale_proxy.conf "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/master/deploy/funkwhale_proxy.conf"
curl -L -o /etc/nginx/sites-available/funkwhale.template "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/master/deploy/docker.proxy.template"
curl -L -o /etc/nginx/funkwhale_proxy.conf "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/|version|/deploy/funkwhale_proxy.conf"
curl -L -o /etc/nginx/sites-available/funkwhale.template "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/|version|/deploy/docker.proxy.template"
.. code-block:: shell
# create a final nginx configuration using the template based on your environment
set -a && source /srv/funkwhale/.env && set +a
@ -165,11 +168,16 @@ On docker deployments, run the following commands:
On non-docker deployments, run the following commands:
.. code:: shell
.. parsed-literal::
export FUNKWHALE_VERSION="|version|"
# download the needed files
curl -L -o /etc/nginx/funkwhale_proxy.conf "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/master/deploy/funkwhale_proxy.conf"
curl -L -o /etc/nginx/sites-available/funkwhale.template "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/master/deploy/nginx.template"
curl -L -o /etc/nginx/funkwhale_proxy.conf "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/|version|/deploy/funkwhale_proxy.conf"
curl -L -o /etc/nginx/sites-available/funkwhale.template "https://dev.funkwhale.audio/funkwhale/funkwhale/raw/|version|/deploy/nginx.template"
.. code-block:: shell
# create a final nginx configuration using the template based on your environment
set -a && source /srv/funkwhale/config/.env && set +a