From 484182c979af437adcdc43166857ec3e600fe0cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tristan=20Mah=C3=A9?= Date: Thu, 28 Jun 2018 16:28:15 -0700 Subject: [PATCH 1/3] INSTALL.md: notes from installing Plume --- INSTALL.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 INSTALL.md diff --git a/INSTALL.md b/INSTALL.md new file mode 100644 index 00000000..80e2d11d --- /dev/null +++ b/INSTALL.md @@ -0,0 +1,27 @@ +# How to install Plume on a Debian stretch: + +## Basic setup: +apt update +apt install gettext postgresql postgresql-contrib libpq-dev +adduser plume +su - plume +cd /home/plume +git clone https://github.com/Plume-org/Plume.git +curl https://sh.rustup.rs -sSf | sh -s -- --no-modify-path --default-toolchain nightly +cd Plume +rustup toolchain install nightly +rustup override set nightly-2018-05-15 # this seems to be needed for compilation +cargo install diesel_cli --no-default-features --features postgres # we dont need to compile anything else than pgsql + +## Now, if you want to run postgresql on the same server: +cargo run # this will configure and launch Plume on the server. + +## If you want to run Plume with a remote DB this time ( Postgresql is not installed on the same server/container): +* On the DB server: +su - postgres +createuser -d -P plume +createdb -O plume plume + +* On the Plume server: +diesel migration run --database-url postgres://plume:PASSWORD@DBSERVERIP:DBPORT/plume +DB_URL=postgres://plume:PASSWORD@DBSERVERIP:DBPORT/plume cargo run # the first launch will ask questions to configure the instance. A second launch will not need the DB_URL. From 3b9ccb0dda1d54322a305842144ef1a24e50f47e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tristan=20Mah=C3=A9?= Date: Thu, 28 Jun 2018 16:32:15 -0700 Subject: [PATCH 2/3] add nginx snippet --- INSTALL.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/INSTALL.md b/INSTALL.md index 80e2d11d..b7077e6d 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -25,3 +25,19 @@ createdb -O plume plume * On the Plume server: diesel migration run --database-url postgres://plume:PASSWORD@DBSERVERIP:DBPORT/plume DB_URL=postgres://plume:PASSWORD@DBSERVERIP:DBPORT/plume cargo run # the first launch will ask questions to configure the instance. A second launch will not need the DB_URL. + +## Plume is now accessible as seen on your console. You can have fun now, or configure an nginx proxy with the following excerpt: + + location / { + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header Host $http_host; + + proxy_pass http://localhost:8000; + + client_max_body_size 16m; + } + +# Caveats: +* Pgbouncer is not yet supported ( named transactions are used ). From 52c000ef4b09b83f138c3bf37d893e4076577874 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tristan=20Mah=C3=A9?= Date: Thu, 28 Jun 2018 16:34:00 -0700 Subject: [PATCH 3/3] missing start postgresql --- INSTALL.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/INSTALL.md b/INSTALL.md index b7077e6d..84991eca 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -18,11 +18,13 @@ cargo run # this will configure and launch Plume on the server. ## If you want to run Plume with a remote DB this time ( Postgresql is not installed on the same server/container): * On the DB server: +service postgresql start su - postgres createuser -d -P plume createdb -O plume plume * On the Plume server: +cd /home/plume/Plume diesel migration run --database-url postgres://plume:PASSWORD@DBSERVERIP:DBPORT/plume DB_URL=postgres://plume:PASSWORD@DBSERVERIP:DBPORT/plume cargo run # the first launch will ask questions to configure the instance. A second launch will not need the DB_URL.