From d7e56dbfa0b9695458864983f07fe2aa1c36f11f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20K=C3=B6sters?= Date: Tue, 20 Oct 2020 14:18:20 +0200 Subject: [PATCH] docs: recommend using binaries --- DEPLOY_FROM_SOURCE.md => DEPLOY.md | 19 ++++++++++++++----- README.md | 9 ++++----- 2 files changed, 18 insertions(+), 10 deletions(-) rename DEPLOY_FROM_SOURCE.md => DEPLOY.md (72%) diff --git a/DEPLOY_FROM_SOURCE.md b/DEPLOY.md similarity index 72% rename from DEPLOY_FROM_SOURCE.md rename to DEPLOY.md index 456fe6ea..443fac83 100644 --- a/DEPLOY_FROM_SOURCE.md +++ b/DEPLOY.md @@ -7,15 +7,24 @@ Make sure you have `libssl-dev` and `pkg-config` installed and the [rust toolcha ## Install Conduit +You have to download the binary that fits your machine. Run `uname -m` to see what you need: +- x84_64: `https://conduit.rs/master/x86_64/conduit-bin` +- armv7: `https://conduit.rs/master/armv7/conduit-bin` +- armv8: `https://conduit.rs/master/armv8/conduit-bin` +- arm: `https://conduit.rs/master/arm/conduit-bin` + ```bash $ sudo useradd -m conduit -$ sudo -u conduit cargo install --git "https://git.koesters.xyz/timo/conduit.git" +$ sudo -u conduit wget -O /home/conduit/conduit-bin && chmod +x /home/conduit/conduit-bin ``` ## Setup systemd service -In this guide, we set up a systemd service for Conduit, so it's easy to start, stop Conduit and set it to autostart when your server reboots. Paste the default systemd service below and configure it to fit your setup (in /etc/systemd/system/conduit.service). +In this guide, we set up a systemd service for Conduit, so it's easy to +start/stop Conduit and set it to autostart when your server reboots. Paste the +default systemd service you can find below into +`/etc/systemd/system/conduit.service` and configure it to fit your setup. ```systemd [Unit] @@ -38,7 +47,7 @@ User=conduit Group=conduit Type=simple Restart=always -ExecStart=/home/conduit/.cargo/bin/conduit +ExecStart=/home/conduit/conduit-bin [Install] WantedBy=multi-user.target @@ -92,12 +101,12 @@ $ sudo certbot -d conduit.koesters.xyz ## You're done! -Now you can start Conduit with +Now you can start Conduit with: ```bash $ sudo systemctl start conduit ``` -and set it to start automatically when your system boots with +Set it to start automatically when your system boots with: ```bash $ sudo systemctl enable conduit ``` diff --git a/README.md b/README.md index c8397758..8e4b1b70 100644 --- a/README.md +++ b/README.md @@ -17,13 +17,12 @@ example) and register on the `https://conduit.koesters.xyz` homeserver. #### How can I deploy my own? -##### From source +##### Deploy -Clone the repo, build it with `cargo build --release` and call the binary -(target/release/conduit) from somewhere like a systemd script. [Read -more](DEPLOY_FROM_SOURCE.md) +Download or compile a conduit binary and call it from somewhere like a systemd script. [Read +more](DEPLOY.md) -##### Using Docker +##### Deploy using Docker Pull and run the docker image with