summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorDashie <dashie@sigpipe.me>2019-09-21 10:30:52 +0200
committerDashie <dashie@sigpipe.me>2019-09-21 10:30:52 +0200
commit6fb7d3940c4d6cca186f1ec1f932713bdd1b1591 (patch)
treec3c7b1f349ef4e95f1158ec0bb5a257b07281470 /docs
parent6e97a8f0263dbf07ba8d052d96b62defd163befc (diff)
Some config updates; Use more vars in configs; Docs update
Diffstat (limited to 'docs')
-rw-r--r--docs/installation/docker.rst2
-rw-r--r--docs/installation/index.rst56
2 files changed, 54 insertions, 4 deletions
diff --git a/docs/installation/docker.rst b/docs/installation/docker.rst
index 620a4d2e..6b277ada 100644
--- a/docs/installation/docker.rst
+++ b/docs/installation/docker.rst
@@ -33,7 +33,7 @@ Download the sample docker-compose file:
mkdir /srv/reel2bits
cd /srv/reel2bits
mkdir nginx
- curl -L -o nginx/reel2bits.template "https://github.com/reel2bits/reel2bits/raw/master/deploy/docker/nginx/conf.dev"
+ curl -L -o nginx/reel2bits.template "https://github.com/reel2bits/reel2bits/raw/master/deploy/docker.nginx.template"
curl -L -o nginx/reel2bits_proxy.conf "https://github.com/reel2bits/reel2bits/raw/master/deploy/reel2bits_proxy.conf"
curl -L -o docker-compose.yml "https://github.com/reel2bits/reel2bits/raw/master/deploy/docker-compose.yml"
diff --git a/docs/installation/index.rst b/docs/installation/index.rst
index f93eb7e5..6526dd61 100644
--- a/docs/installation/index.rst
+++ b/docs/installation/index.rst
@@ -76,14 +76,64 @@ Ensure you have a recent version of nginx on your server. On Debian-like system,
sudo apt-get update
sudo apt-get install nginx
-You can now copy the shipped nginx config:
+On docker deployments, run the following commands:
+
+.. code-block:: bash
+
+ export REEL2BITS_VERSION="|version|"
+ curl -L -o /etc/nginx/sites-available/reel2bits.template "https://github.com/reel2bits/reel2bits/raw/|version|/deploy/docker.proxy.template"
+ curl -L -o /etc/nginx/reel2bits_proxy.conf "https://github.com/reel2bits/reel2bits/raw/|version|/deploy/reel2bits_proxy.conf"
+
+.. code-block:: shell
+
+ # create a final nginx configuration using the template based on your environment
+ set -a && source /home/reel2bits/.env && set +a
+ envsubst "`env | awk -F = '{printf \" $%s\", $$1}'`" \
+ < /etc/nginx/sites-available/reel2bits.template \
+ > /etc/nginx/sites-available/reel2bits.conf
+
+ ln -s /etc/nginx/sites-available/reel2bits.conf /etc/nginx/sites-enabled/
+
+On non-docker deployments, run the following commands:
+
+
+.. parsed-literal::
+
+ export REEL2BITS_VERSION="|version|"
+
+ # download the needed files
+ curl -L -o /etc/nginx/reel2bits_proxy.conf "https://github.com/reel2bits/reel2bits/raw/|version|/deploy/reel2bits_proxy.conf"
+ curl -L -o /etc/nginx/sites-available/reel2bits.template "https://github.com/reel2bits/reel2bits/raw/|version|/deploy/docker.nginx.template"
+
+.. code-block:: shell
+
+ # create a final nginx configuration using the template based on your environment
+ set -a && source /home/reel2bits/config/.env && set +a
+ envsubst "`env | awk -F = '{printf \" $%s\", $$1}'`" \
+ < /etc/nginx/sites-available/reel2bits.template \
+ > /etc/nginx/sites-available/reel2bits.conf
+
+ ln -s /etc/nginx/sites-available/reel2bits.conf /etc/nginx/sites-enabled/
+
+.. note::
+
+ The resulting file should not contain any variable such as ``${APP_AP_DOMAIN}``.
+ You can check that using this command::
+
+ grep '${' /etc/nginx/sites-available/reel2bits.conf
+
+.. note::
+
+ You can freely adapt the resulting file to your own needs, as we cannot
+ cover every use case with a single template, especially when it's related
+ to SSL configuration.
+
+Finally, enable the resulting configuration:
.. code-block:: bash
- cp /home/reel2bits/reel2bits/deploy/reel2bits.nginx /etc/nginx/sites-available/reel2bits.conf
ln -s /etc/nginx/sites-available/reel2bits.conf /etc/nginx/sites-enabled/
-Don't forget to edit ``/etc/nginx/sites-enabled/reel2bits.conf`` to suit your needs.
HTTPS Configuration
:::::::::::::::::::