Skip to content

Commit

Permalink
docs: improve docker docs (RSS-Bridge#4183)
Browse files Browse the repository at this point in the history
* docs: improve docker docs

* fix: cleanup and remove duplicate docker instructions
  • Loading branch information
dvikan committed Aug 1, 2024
1 parent d050fe9 commit 0051e0f
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 127 deletions.
56 changes: 35 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@ Requires minimum PHP 7.4.

### How to install on traditional shared web hosting

RSS-Bridge can basically be unzipped in a web folder. Should be working instantly.
RSS-Bridge can basically be unzipped into a web folder. Should be working instantly.

Latest zip as of Sep 2023: https://github.com/RSS-Bridge/rss-bridge/archive/refs/tags/2023-09-24.zip
Latest zip:
https://github.com/RSS-Bridge/rss-bridge/archive/refs/heads/master.zip (2MB)

### How to install on Debian 12 (nginx + php-fpm)

Expand All @@ -66,7 +67,7 @@ timedatectl set-timezone Europe/Oslo

apt install git nginx php8.2-fpm php-mbstring php-simplexml php-curl php-intl

# Create a new user account
# Create a user account
useradd --shell /bin/bash --create-home rss-bridge

cd /var/www
Expand Down Expand Up @@ -101,7 +102,10 @@ Nginx config:
server {
listen 80;
# TODO: change to your own server name
server_name example.com;
access_log /var/log/nginx/rss-bridge.access.log;
error_log /var/log/nginx/rss-bridge.error.log;
log_not_found off;
Expand Down Expand Up @@ -150,8 +154,11 @@ listen = /run/php/rss-bridge.sock
listen.owner = www-data
listen.group = www-data

# Create 10 workers standing by to serve requests
pm = static
pm.max_children = 10

# Respawn worker after 500 requests (workaround for memory leaks etc.)
pm.max_requests = 500
```

Expand Down Expand Up @@ -179,7 +186,7 @@ Install the latest release.

```shell
cd /var/www
composer create-project -v --no-dev rss-bridge/rss-bridge
composer create-project -v --no-dev --no-scripts rss-bridge/rss-bridge
```

### How to install with Caddy
Expand All @@ -192,8 +199,16 @@ Install by downloading the docker image from Docker Hub:

```bash
# Create container
docker create --name=rss-bridge --publish 3000:80 rssbridge/rss-bridge
docker create --name=rss-bridge --publish 3000:80 --volume $(pwd)/config:/config rssbridge/rss-bridge
```

You can put custom `config.ini.php` and bridges into `./config`.

**You must restart container for custom changes to take effect.**

See `docker-entrypoint.sh` for details.

```bash
# Start container
docker start rss-bridge
```
Expand All @@ -207,30 +222,29 @@ Browse http://localhost:3000/
docker build -t rss-bridge .

# Create container
docker create --name rss-bridge --publish 3000:80 rss-bridge
docker create --name rss-bridge --publish 3000:80 --volume $(pwd)/config:/config rss-bridge
```

You can put custom `config.ini.php` and bridges into `./config`.

**You must restart container for custom changes to take effect.**

See `docker-entrypoint.sh` for details.

```bash
# Start container
docker start rss-bridge
```

Browse http://localhost:3000/

### Install with docker-compose

Create a `docker-compose.yml` file locally with with the following content:
```yml
version: '2'
services:
rss-bridge:
image: rssbridge/rss-bridge:latest
volumes:
- </local/custom/path>:/config
ports:
- 3000:80
restart: unless-stopped
```
### Install with docker-compose (using Docker Hub)

You can put custom `config.ini.php` and bridges into `./config`.

**You must restart container for custom changes to take effect.**

Then launch with `docker-compose`:
See `docker-entrypoint.sh` for details.

```bash
docker-compose up
Expand Down
9 changes: 9 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: '2'
services:
rss-bridge:
image: rssbridge/rss-bridge:latest
volumes:
- ./config:/config
ports:
- 3000:80
restart: unless-stopped
10 changes: 0 additions & 10 deletions docs/01_General/03_Requirements.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
**RSS-Bridge** requires either of the following:

## A Web server* with:

- PHP 7.4 (or higher)
- [`openssl`](https://secure.php.net/manual/en/book.openssl.php) extension
Expand All @@ -14,11 +12,3 @@
- [`sqlite3`](http://php.net/manual/en/book.sqlite3.php) extension (only when using SQLiteCache)

Enable extensions by un-commenting the corresponding line in your PHP configuration (`php.ini`).


## A Linux server with:

- Docker server configured (Any recent version should do)
- 100MB of disk space

To setup RSS Bridge using Docker, see the [Docker Guide](../03_For_Hosts/03_Docker_Installation.md) on installing RSS Bridge.
4 changes: 1 addition & 3 deletions docs/03_For_Hosts/01_Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,4 @@ In order to install RSS-Bridge on your own web server* do as follows:
For linux hosts:
* Grant read-write-access for `www-data` to the `./cache` directory (`chown -R www-data ./cache`)

You have successfully installed RSS-Bridge.

Instructions for Docker setups are at [Docker Installation](../03_For_Hosts/03_Docker_Installation.md)
You have successfully installed RSS-Bridge.
4 changes: 0 additions & 4 deletions docs/03_For_Hosts/02_Updating.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ Updating an existing installation is very simple, depending on your type of inst

This will update all core files to the latest version. Your custom configuration and bridges are left untouched. Keep in mind that changes to any core file of RSS-Bridge will be replaced.

## Docker

Simply get the latest Docker build via `:latest` or specific builds via `:<tag-name>`.

## Heroku

### If you didn't fork the repo before
Expand Down
49 changes: 0 additions & 49 deletions docs/03_For_Hosts/03_Docker_Installation.md

This file was deleted.

13 changes: 8 additions & 5 deletions docs/03_For_Hosts/index.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
This section is directed at **hosts** and **server administrators**.

To install RSS-Bridge, please follow the [installation instructions](../03_For_Hosts/01_Installation.md). You must have access to a web server with a working PHP environment!
To install RSS-Bridge, please follow the [installation instructions](../03_For_Hosts/01_Installation.md).
You must have access to a web server with a working PHP environment!

RSS-Bridge comes with a large amount of bridges. Only few bridges are enabled by default. Unlock more bridges by adding them to the [whitelist](../03_For_Hosts/05_Whitelisting.md).
RSS-Bridge comes with a large amount of bridges.

Some bridges could be implemented more efficiently by actually using proprietary APIs, but there are reasons against it:
Some bridges could be implemented more efficiently by actually using proprietary APIs,
but there are reasons against it:

- RSS-Bridge exists in the first place to NOT use APIs. See [the rant](https://github.com/RSS-Bridge/rss-bridge/blob/master/README.md#Rant)
- RSS-Bridge exists in the first place to NOT use APIs.
- See [the rant](https://github.com/RSS-Bridge/rss-bridge/blob/master/README.md#Rant)

- APIs require private keys that could be stored on servers running RSS-Bridge, which is a security concern, involves complex authorizations for inexperienced users and could cause harm (when using paid services for example). In a closed environment (a server only you use for yourself) however you might be interested in using them anyway. So, check [this](https://github.com/RSS-Bridge/rss-bridge/pull/478/files) possible implementation of an anti-captcha solution.
- APIs require private keys that could be stored on servers running RSS-Bridge,which is a security concern, involves complex authorizations for inexperienced users and could cause harm (when using paid services for example). In a closed environment (a server only you use for yourself) however you might be interested in using them anyway. So, check [this](https://github.com/RSS-Bridge/rss-bridge/pull/478/files) possible implementation of an anti-captcha solution.
36 changes: 1 addition & 35 deletions docs/04_For_Developers/07_Development_Environment_Setup.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,5 @@
These are examples of how to setup a local development environment to add bridges, improve the docs, etc.

## Docker

The following can serve as an example for using docker:

```
# create a new directory
mkdir rss-bridge-contribution
cd rss-bridge-contribution
# clone the project into a subfolder
git clone https://github.com/RSS-Bridge/rss-bridge
```

Then add a `docker-compose.yml` file:

```yml
version: '3'

services:
rss-bridge:
build:
context: ./rss-bridge
ports:
- 3000:80
volumes:
- ./config:/config
- ./rss-bridge/bridges:/app/bridges
```
You can then access RSS-Bridge at `localhost:3000` and [add your bridge](../05_Bridge_API/How_to_create_a_new_bridge) to the `rss-bridge/bridges` folder.

If you need to edit any other files, like from the `lib` folder add this to the `volumes` section: `./rss-bridge/lib:/app/lib`.

### Docs with Docker
## Docs with Docker

If you want to edit the docs add this to your docker-compose.yml:

Expand Down

0 comments on commit 0051e0f

Please sign in to comment.