mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2024-11-23 10:05:32 +03:00
docs: improve docker docs (#4183)
* docs: improve docker docs * fix: cleanup and remove duplicate docker instructions
This commit is contained in:
parent
d050fe9a9b
commit
0051e0fcdd
8 changed files with 53 additions and 126 deletions
54
README.md
54
README.md
|
@ -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)
|
||||
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
```
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
```
|
||||
|
@ -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
|
||||
### Install with docker-compose (using Docker Hub)
|
||||
|
||||
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
|
||||
```
|
||||
You can put custom `config.ini.php` and bridges into `./config`.
|
||||
|
||||
Then launch with `docker-compose`:
|
||||
**You must restart container for custom changes to take effect.**
|
||||
|
||||
See `docker-entrypoint.sh` for details.
|
||||
|
||||
```bash
|
||||
docker-compose up
|
||||
|
|
9
docker-compose.yml
Normal file
9
docker-compose.yml
Normal file
|
@ -0,0 +1,9 @@
|
|||
version: '2'
|
||||
services:
|
||||
rss-bridge:
|
||||
image: rssbridge/rss-bridge:latest
|
||||
volumes:
|
||||
- ./config:/config
|
||||
ports:
|
||||
- 3000:80
|
||||
restart: unless-stopped
|
|
@ -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
|
||||
|
@ -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.
|
|
@ -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.
|
|
@ -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
|
||||
|
|
|
@ -1,49 +0,0 @@
|
|||
This guide is for people who want to run RSS Bridge using Docker. If you want to run it a simple PHP Webhost environment, see [Installation](../03_For_Hosts/01_Installation.md) instead.
|
||||
|
||||
## Setup
|
||||
|
||||
### Create the container
|
||||
|
||||
```bash
|
||||
docker create \
|
||||
--name=rss-bridge \
|
||||
--volume </local/custom/path>:/config \
|
||||
--publish 3000:80 \
|
||||
rssbridge/rss-bridge:latest
|
||||
```
|
||||
### Run it
|
||||
```bash
|
||||
docker start rss-bridge
|
||||
```
|
||||
|
||||
Access it using `http://IP_Address:3000`. If you'd like to run a specific version, you can run it by changing the ':latest' on the image to a tag listed [here](https://hub.docker.com/r/rssbridge/rss-bridge/tags/)
|
||||
|
||||
The server runs on port 80 internally, map any port of your choice (in this example 3000).
|
||||
|
||||
You can run it using a `docker-compose.yml` as well:
|
||||
|
||||
```yml
|
||||
version: '2'
|
||||
services:
|
||||
rss-bridge:
|
||||
image: rssbridge/rss-bridge:latest
|
||||
volumes:
|
||||
- </local/custom/path>:/config
|
||||
ports:
|
||||
- 3000:80
|
||||
restart: unless-stopped
|
||||
```
|
||||
|
||||
# Container access and information
|
||||
|
||||
|Function|Command|
|
||||
|----|----|
|
||||
|Shell access (live container)|`docker exec -it rss-bridge /bin/sh`|
|
||||
|Realtime container logs|`docker logs -f rss-bridge`|
|
||||
|
||||
# Adding custom bridges and configurations
|
||||
If you want to add a bridge that is not part of [`/bridges`](https://github.com/RSS-Bridge/rss-bridge/tree/master/bridges), you can map a folder to the `/config` folder of the `rss-bridge` container.
|
||||
|
||||
1. Create a folder in the location of your docker-compose.yml or your general docker working area (in this example it will be `/home/docker/rssbridge/config` ).
|
||||
2. Copy your [custom bridges](../05_Bridge_API/01_How_to_create_a_new_bridge.md) to the `/home/docker/rssbridge/config` folder. Applies also to [config.ini.php](../03_For_Hosts/08_Custom_Configuration.md).
|
||||
3. Map the folder to `/config` inside the container. To do that, replace the `</local/custom/path>` from the previous examples with `/home/docker/rssbridge/config`
|
|
@ -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.
|
|
@ -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:
|
||||
|
||||
|
|
Loading…
Reference in a new issue