71 lines
2.1 KiB
Markdown
71 lines
2.1 KiB
Markdown
# Tiny Tiny RSS on dokku
|
|
|
|
Runs as a [Dockerfile deployment](http://dokku.viewdocs.io/dokku/deployment/methods/dockerfiles/) with a [Postgres database](https://github.com/dokku/dokku-postgres). Pulls [TTRSS release](https://git.tt-rss.org/git/tt-rss) into an [nginx base image](https://hub.docker.com/_/nginx/) with PHP7, parses `DATABASE_URL` environment variable and starts the fetch daemon using supervisord.
|
|
|
|
## Setup
|
|
|
|
```bash
|
|
dokku plugin:install https://github.com/dokku/dokku-postgres.git
|
|
|
|
dokku apps:create ttrss
|
|
dokku ps:scale ttrss web=0
|
|
dokku postgres:create ttrss-postgres-12_2 --image-version 12.2
|
|
dokku postgres:link ttrss-postgres-12_2 ttrss
|
|
dokku config:set ttrss SELF_URL_PATH=http://ttrss.example.com/
|
|
|
|
git remote add dokku dokku@example.com:ttrrs
|
|
git push dokku
|
|
|
|
dokku run ttrss php7 /var/lib/tt-rss-install/install-db.php
|
|
dokku ps:scale ttrss web=1
|
|
```
|
|
|
|
## HTTPS
|
|
|
|
### Setup
|
|
|
|
```bash
|
|
dokku plugin:install https://github.com/dokku/dokku-letsencrypt.git
|
|
|
|
dokku config:set --no-restart ttrss DOKKU_LETSENCRYPT_EMAIL=todo@example.com
|
|
dokku config:set --no-restart ttrss SELF_URL_PATH=https://ttrss.example.com/
|
|
dokku letsencrypt ttrss
|
|
dokku ps:restart ttrss
|
|
```
|
|
|
|
### Renewal
|
|
|
|
```bash
|
|
dokku plugins:upgrade letsencrypt
|
|
dokku letsencrypt:auto-renew ttrss
|
|
```
|
|
|
|
## Upgrade
|
|
|
|
### TTRSS
|
|
|
|
* Upgrade base image in `Dockerfile`: https://hub.docker.com/_/nginx?tab=tags
|
|
* Upgrade TTRSS commit in `Dockerfile`
|
|
* Propagate updates in `config.php-dist` to `config.php`: https://git.tt-rss.org/fox/tt-rss/src/master/config.php-dist
|
|
|
|
```bash
|
|
dokku postgres:export ttrssdb_11_4 > ttrss.db
|
|
git push dokku
|
|
# go to Tiny Tiny RSS, it will ask to upgrade database, do it and check app is working
|
|
rm ttrss.db
|
|
```
|
|
|
|
### Database
|
|
|
|
```bash
|
|
# upgrade from Postgres 11.6 to 12.2
|
|
dokku plugins:upgrade postgres
|
|
dokku postgres:clone ttrss-postgres-11_6 ttrss-postgres-12_2 --image-version 12.2
|
|
dokku postgres:link ttrss-postgres-12_2 ttrss
|
|
dokku postgres:promote ttrss-postgres-12_2 ttrss
|
|
|
|
# check app is working, then delete old database
|
|
dokku postgres:unlink ttrss-postgres-11_6 ttrss
|
|
dokku postgres:destroy ttrss-postgres-11_6
|
|
```
|