2018-06-29 01:28:15 +02:00
# How to install Plume on a Debian stretch:
## Basic setup:
2018-06-29 19:13:58 +02:00
```bash
2018-06-29 01:28:15 +02:00
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
2018-06-29 21:15:10 +02:00
curl https://sh.rustup.rs -sSf | sh
2018-06-29 01:28:15 +02:00
cd Plume
rustup toolchain install nightly
2018-06-29 21:09:25 +02:00
rustup toolchain default nightly
rustup update
2018-07-17 22:36:07 +02:00
cargo install diesel_cli --no-default-features --features postgres --version '=1.2.0' # we dont need to compile anything else than pgsql
2018-06-29 19:13:58 +02:00
```
2018-06-29 01:28:15 +02:00
## Now, if you want to run postgresql on the same server:
2018-06-29 19:13:58 +02:00
```bash
2018-06-29 21:15:10 +02:00
service postgresql start
2018-06-29 01:28:15 +02:00
cargo run # this will configure and launch Plume on the server.
2018-06-29 19:13:58 +02:00
```
2018-06-29 01:28:15 +02:00
## If you want to run Plume with a remote DB this time ( Postgresql is not installed on the same server/container):
2018-06-29 19:13:58 +02:00
2018-06-29 01:28:15 +02:00
* On the DB server:
2018-06-29 19:13:58 +02:00
```bash
2018-06-29 01:34:00 +02:00
service postgresql start
2018-06-29 01:28:15 +02:00
su - postgres
createuser -d -P plume
createdb -O plume plume
2018-06-29 19:13:58 +02:00
```
2018-06-29 01:28:15 +02:00
* On the Plume server:
2018-06-29 19:13:58 +02:00
```bash
2018-06-29 01:34:00 +02:00
cd /home/plume/Plume
2018-06-29 01:28:15 +02:00
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.
2018-06-29 19:13:58 +02:00
```
2018-06-29 01:32:15 +02:00
## 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:
2018-06-29 19:13:58 +02:00
2018-06-29 01:32:15 +02:00
* Pgbouncer is not yet supported ( named transactions are used ).
2018-06-29 21:15:10 +02:00
2018-06-29 21:09:25 +02:00
* Rust nightly is a moving target, dependancies can break and sometimes you need to check a few versions to find the one working.
```bash
cd /home/plume/Plume
rustup override set nightly-2018-05-15 # this could be needed for compilation. If errors, try 2018-05-31.
# rustup override unset # remove the override for this directory.
```
* Rust nightly 2018-06-28 is known to be failing to compile diesel 1.3.2