More README changes, modify contrib/

This commit is contained in:
Matthew Esposito 2023-12-26 18:48:09 -05:00
parent c5d11f220e
commit 4c78ab30d3
No known key found for this signature in database
4 changed files with 24 additions and 24 deletions

View File

@ -42,7 +42,7 @@ Both files are part of the [libreddit-instances](https://github.com/libreddit/li
# About # About
Find Redlib on 💬 [Matrix](https://matrix.to/#/#libreddit:kde.org), 🐋 [Docker](https://hub.docker.com/r/libreddit/libreddit), :octocat: [GitHub](https://github.com/libreddit/libreddit), and 🦊 [GitLab](https://gitlab.com/libreddit/libreddit). Find Redlib on 💬 [Matrix](https://matrix.to/#/#libreddit:kde.org), 🐋 [Quay.io](https://quay.io/repository/redlib/redlib), :octocat: [GitHub](https://github.com/libreddit/libreddit), and 🦊 [GitLab](https://gitlab.com/libreddit/libreddit).
## Built with ## Built with
@ -147,21 +147,21 @@ cargo install libreddit
## 2) Docker ## 2) Docker
Deploy the [Docker image](https://hub.docker.com/r/libreddit/libreddit) of Redlib: Deploy the [Docker image](https://quay.io/repository/redlib/redlib) of Redlib:
``` ```
docker pull libreddit/libreddit docker pull quay.io/redlib/redlib
docker run -d --name libreddit -p 8080:8080 libreddit/libreddit docker run -d --name libreddit -p 8080:8080 redlib
``` ```
Deploy using a different port (in this case, port 80): Deploy using a different port (in this case, port 80):
``` ```
docker pull libreddit/libreddit docker pull quay.io/redlib/redlib
docker run -d --name libreddit -p 80:8080 libreddit/libreddit docker run -d --name libreddit -p 80:8080 redlib
``` ```
To deploy on `arm64` platforms, simply replace `libreddit/libreddit` in the commands above with `libreddit/libreddit:arm`. To deploy on `arm64` platforms, simply replace `quay.io/redlib/redlib` in the commands above with `quay.io/redlib/redlib:arm`.
To deploy on `armv7` platforms, simply replace `libreddit/libreddit` in the commands above with `libreddit/libreddit:armv7`. To deploy on `armv7` platforms, simply replace `quay.io/redlib/redlib` in the commands above with `quay.io/redlib/redlib:armv7`.
## 3) AUR ## 3) AUR
@ -187,15 +187,15 @@ make install
## 5) GitHub Releases ## 5) GitHub Releases
If you're on Linux and none of these methods work for you, you can grab a Linux binary from [the newest release](https://github.com/libreddit/libreddit/releases/latest). If you're on Linux and none of these methods work for you, you can grab a Linux binary from [the newest release](https://github.com/redlib-org/redlib/releases/latest).
## 6) Replit/Heroku/Glitch ## 6) Replit/Heroku/Glitch
> **Warning** > **Warning**
> These are free hosting options, but they are *not* private and will monitor server usage to prevent abuse. If you need a free and easy setup, this method may work best for you. > These are free hosting options, but they are *not* private and will monitor server usage to prevent abuse. If you need a free and easy setup, this method may work best for you.
<a href="https://repl.it/github/libreddit/libreddit"><img src="https://repl.it/badge/github/libreddit/libreddit" alt="Run on Repl.it" height="32" /></a> <a href="https://repl.it/github/redlib-org/redlib"><img src="https://repl.it/badge/github/redlib-org/redlib" alt="Run on Repl.it" height="32" /></a>
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/libreddit/libreddit) [![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/redlib-org/redlib)
[![Remix on Glitch](https://cdn.glitch.com/2703baf2-b643-4da7-ab91-7ee2a2d00b5b%2Fremix-button-v2.svg)](https://glitch.com/edit/#!/remix/libreddit) [![Remix on Glitch](https://cdn.glitch.com/2703baf2-b643-4da7-ab91-7ee2a2d00b5b%2Fremix-button-v2.svg)](https://glitch.com/edit/#!/remix/libreddit)
--- ---
@ -205,7 +205,7 @@ If you're on Linux and none of these methods work for you, you can grab a Linux
Once installed, deploy Redlib to `0.0.0.0:8080` by running: Once installed, deploy Redlib to `0.0.0.0:8080` by running:
``` ```
libreddit redlib
``` ```
## Instance settings ## Instance settings
@ -243,7 +243,7 @@ Assign a default value for each user-modifiable setting by passing environment v
| `HIDE_SCORE` | `["on", "off"]` | `off` | | `HIDE_SCORE` | `["on", "off"]` | `off` |
| `FIXED_NAVBAR` | `["on", "off"]` | `on` | | `FIXED_NAVBAR` | `["on", "off"]` | `on` |
You can also configure Redlib with a configuration file. An example `libreddit.toml` can be found below: You can also configure Redlib with a configuration file. An example `redlib.toml` can be found below:
```toml ```toml
REDLIB_DEFAULT_WIDE = "on" REDLIB_DEFAULT_WIDE = "on"
@ -253,11 +253,11 @@ REDLIB_DEFAULT_USE_HLS = "on"
### Examples ### Examples
```bash ```bash
REDLIB_DEFAULT_SHOW_NSFW=on libreddit REDLIB_DEFAULT_SHOW_NSFW=on redlib
``` ```
```bash ```bash
REDLIB_DEFAULT_WIDE=on REDLIB_DEFAULT_THEME=dark libreddit -r REDLIB_DEFAULT_WIDE=on REDLIB_DEFAULT_THEME=dark redlib -r
``` ```
## Proxying using NGINX ## Proxying using NGINX
@ -271,17 +271,17 @@ REDLIB_DEFAULT_WIDE=on REDLIB_DEFAULT_THEME=dark libreddit -r
## systemd ## systemd
You can use the systemd service available in `contrib/libreddit.service` You can use the systemd service available in `contrib/redlib.service`
(install it on `/etc/systemd/system/libreddit.service`). (install it on `/etc/systemd/system/redlib.service`).
That service can be optionally configured in terms of environment variables by That service can be optionally configured in terms of environment variables by
creating a file in `/etc/libreddit.conf`. Use the `contrib/libreddit.conf` as a creating a file in `/etc/redlib.conf`. Use the `contrib/redlib.conf` as a
template. You can also add the `REDLIB_DEFAULT__{X}` settings explained template. You can also add the `REDLIB_DEFAULT__{X}` settings explained
above. above.
When "Proxying using NGINX" where the proxy is on the same machine, you should When "Proxying using NGINX" where the proxy is on the same machine, you should
guarantee nginx waits for this service to start. Edit guarantee nginx waits for this service to start. Edit
`/etc/systemd/system/libreddit.service.d/reverse-proxy.conf`: `/etc/systemd/system/redlib.service.d/reverse-proxy.conf`:
```conf ```conf
[Unit] [Unit]
@ -290,16 +290,16 @@ Before=nginx.service
## launchd ## launchd
If you are on macOS, you can use the launchd service available in `contrib/libreddit.plist`. If you are on macOS, you can use the launchd service available in `contrib/redlib.plist`.
Install it with `cp contrib/libreddit.plist ~/Library/LaunchAgents/`. Install it with `cp contrib/redlib.plist ~/Library/LaunchAgents/`.
Load and start it with `launchctl load ~/Library/LaunchAgents/libreddit.plist`. Load and start it with `launchctl load ~/Library/LaunchAgents/redlib.plist`.
## Building ## Building
``` ```
git clone https://github.com/libreddit/libreddit git clone https://github.com/redlib-org/redlib
cd libreddit cd redlib
cargo run cargo run
``` ```