Table of Contents

Tiny Tiny RSS

Prerequisites

Prerequisites - Ubuntu

sudo apt update
sudo apt -y upgrade
sudo apt -y install docker docker-compose git
sudo usermod -aG docker $USER
sudo reboot
cd ~/
git clone https://git.tt-rss.org/fox/ttrss-docker-compose.git ttrss-docker
cd ttrss-docker

Prerequisites - Amazon Linux 2

sudo yum -y upgrade
sudo yum -y install docker git
sudo systemctl enable docker
#sudo systemctl start docker
sudo usermod -aG docker $USER
sudo curl -L https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo reboot
docker-compose version
cd ~/
git clone https://git.tt-rss.org/fox/ttrss-docker-compose.git ttrss-docker
cd ttrss-docker

Install

Install Build

cd ~/ttrss-docker
cp .env-dist .env
vim .env
sudo docker-compose up --build -d

Install Static Image (alternative)

cd ~/ttrss-docker
git checkout static-dockerhub
cp .env-dist .env
vim .env
sudo docker-compose pull
sudo docker-compose up -d

Backup and Restore

Amazon Linux 2 may require exec -T db

cd ~/ttrss-docker
source .env
sudo docker-compose exec db /bin/bash \
  -c "export PGPASSWORD=$TTRSS_DB_PASS \
  && pg_dump -U $TTRSS_DB_USER $TTRSS_DB_NAME" \
  | gzip -9 > backup.sql.gz

Restore

# Copy backup file to ttrss host
scp backup-2021-12-30.sql.gz [email protected]:~/

# Copy backup file to  backups container
sudo cp backup-2021-12-30.sql.gz /var/lib/docker/volumes/ttrss-docker_backups/_data/
sudo ls /var/lib/docker/volumes/ttrss-docker_backups/_data/

# Restore from outside of backups container
cd ~/ttrss-docker
docker-compose exec backups /bin/sh -c 'export PGPASSWORD=$TTRSS_DB_PASS && psql -h db -U $TTRSS_DB_USER $TTRSS_DB_NAME -e -c "drop schema public cascade; create schema public"'
docker-compose exec backups /bin/sh -c 'export PGPASSWORD=$TTRSS_DB_PASS && zcat /backups/backup-2021-12-30.sql.gz | psql -h db -U $TTRSS_DB_USER $TTRSS_DB_NAME'

# Enter backups container (alternative)
cd ~/ttrss-docker
docker-compose exec backups /bin/sh

# Restore from inside backups container (alternative)
ls /backups
psql -h db -U $TTRSS_DB_USER $TTRSS_DB_NAME -e -c "drop schema public cascade; create schema public"
zcat /backups/backup-2021-12-30.sql.gz | psql -h db -U $TTRSS_DB_USER $TTRSS_DB_NAME

Stop and Update

Stop

cd ~/ttrss-docker
sudo docker-compose down

Update Build

cd ~/ttrss-docker
sudo docker-compose down
sudo docker-compose rm
git pull origin master
vim .env
sudo docker-compose up --build -d

Update Static Image (alternative)

cd ~/ttrss-docker
sudo docker-compose down
sudo docker-compose rm
git pull origin static-dockerhub
vim .env
sudo docker-compose pull
sudo docker-compose up -d

Miscellaneous

Work around iOS Safari issues

sudo su -
cd /var/lib/docker/volumes/ttrss-docker_app/_data/tt-rss/
curl https://raw.githubusercontent.com/pladaria/requestidlecallback-polyfill/master/index.js -O
mv index.js local-overrides.js
exit

Enable SMTP mailer plugin via .env file

TTRSS_PLUGINS=auth_internal,nginx_xaccel,mailer_smtp

TTRSS_SMTP_SERVER=email-smtp.us-east-1.amazonaws.com:587
TTRSS_SMTP_LOGIN=<AWS ACCESS KEY ID>
TTRSS_SMTP_PASSWORD=<AWS SECRET ACCESS KEY ID>
TTRSS_SMTP_SECURE=tls
TTRSS_SMTP_FROM_NAME=<FROM NAME>
TTRSS_SMTP_FROM_ADDRESS=<FROM EMAIL ADDRESS>