Docker-compose + tt-rss

i think it’s time to recommend docker compose in our installation guide by default.

however, i don’t want to reinvent the wheel, so which of the multiple existing containers should i choose?

what i’m interested in, specifically:

  1. docker-compose
  2. three linked containers, i guess, postgresql + php stuff / fpm + nginx
  3. some kind of updates support from git master
  4. ssl via letsencrypt? idk about that one

any suggestions?

I use the linuxserver one Docker. The main reason is becuase it puts the main config as a mounted volume, so it exposes directories for local_plugins and local_themes.

The main issue with a generic container is if you want to load plugins, ie I used to use the feedly theme so needed a container than incorporated that as part of the build…the linux server container doesn’t have that problem as I can keep the theme locally.

I don’t have the ngnix as I use caddy elsewhere to point at my tt-rss instance, but do have the container and postgres (and not included here is rss-bridge)

version: '2.2'
services:
  postgres_ttrss:
    #postgres server for ttrss
    container_name: postgres_ttrss
    image: postgres:10.7
    restart: always
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U postgres"]
      interval: 10s
      timeout: 5s
      retries: 5
    networks:
      - tt-rss
    volumes:
      - postgres_ttrss:/var/lib/postgresql/data
      - "/etc/timezone:/etc/timezone:ro"
      - "/etc/localtime:/etc/localtime:ro"
  ttrss:
    container_name: ttrss
    depends_on:
      postgres_ttrss:
        condition: service_healthy
    image: linuxserver/tt-rss:amd64-latest
    restart: always
    networks:
      - tt-rss
    ports:
      - "8012:80"
    environment:
      - SELF=https://{stick your external url here}
      - SELF_URL_PATH=${SELF}
      - TZ={your timezone}
      - PUID=1000
      - PGID=1000
    volumes:
      - {full path to your tt-rss config}:/config
      - "/etc/timezone:/etc/timezone:ro"
      - "/etc/localtime:/etc/localtime:ro"

Hopefully that may help. This config…with a little tweak here and there has run on odroid c2 (arm64v7), rPi (arm32v7) and amd64

yeah stuff exposed via docker volumes is definitely a must.

to add to the requirements in the first post: container should skip initial installation steps and install default schema to linked database server and matching config.php on creation so things would be ready out of the box.

I believe the linuxserver one did this for me, standing it up was via opml import which is pretty fine for that purpose…the only thing that breaks is the id of feeds must change and it breaks your filters.

i’ve looked over the linuxserver one and it involves too much manual configuration for my taste. i guess this works if you want to get into details but i would prefer a compose solution working OOTB which i could push into the installation guide to make it easier for people who would want things to just work.

i mean this container installation involves creating the database yourself and editing nginx configuration manually, at this point you might as well do everything else yourself. something like that would be a very questionable improvement over current installation process outlined in the guide.

e: if nothing else their installation-related page is several times longer than our guide.

Hmm, I don’t think I’ve ever done that…and I don’t think I re-used a db from another container (I may have tried and failed). So just did an import as I mentioned.

normal procedure, i think, is a separate DB instance linked to your application container.

yeah I have that, you can see in my compose the postgres container and the tt-rss container…but I didn’t have to run anything special on first run to create the db.

ah, alright, that’s good.

docker-compose, that used 3 Dockerfile.

Dockerfiles contains FROM + RUN steps + HEALTHCHECK + ENTRYPOINT for inner stuff
docker-compose contains shared infrastructure.

for example, see https://github.com/mazzy-ax/lsfusion-samples

this linuxserver container is something else

  • can’t even install the schema (or can it? it didn’t do anything with the linked postgres server)
  • gets an ancient 19.8 tag from Gogs so they either don’t understand my release process or simply don’t give a fuck
  • no provision for updates at all without recreating the container, need to specify version manually
  • literally whines for donations on startup

1/5 will not recommend

here’s a really quick example yml i was using

version: '3'

services:
  db:
    image: postgres:12-alpine
    restart: always
    volumes:
      - db:/var/lib/postgresql/data
    environment:
      - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
      - POSTGRES_USER=${POSTGRES_USER}

  ttrss:
    image: linuxserver/tt-rss
    container_name: tt-rss
    environment:
      - DB_TYPE=pgsql
      - DB_HOST=db
      - DB_NAME=${POSTGRES_USER}
      - DB_USER=${POSTGRES_USER}
      - DB_PASS=${POSTGRES_PASSWORD}
      - SELF_URL_PATH=http://localhost:8380/
      - PUID=1000
      - PGID=1000
      - TZ=UTC
    volumes:
      - ttrss-data:/config
    ports:
      - 8380:80
    restart: unless-stopped
    depends_on:
      - db

volumes:
  db:
  ttrss-data:

for once i was hoping someone did a good job. but no, everything must always be shit.

alright so there’s this now, if someone is feeling brave enough to test it and provide feedback, i’ll appreciate it:

https://git.tt-rss.org/fox/ttrss-docker-compose

if nothing else this should show the general idea of how i’m seeing this configuration.

i’m also not sure what’s the best way to handle SELF_URL_PATH situation.

by the way, thanks for making me aware this exists.

It’s kick ass. Much easier than nginx as far as I can tell.

I have everything running through it. Have to run it swarm mode so it load balances.

Hi all, first of all, I love this utility. TT-rss is hosted in my home “server” and I am all day connected to eat for personal and business purposes. I am technology fun, so I would like to migrate to ttss dockerized, however, as per my understanding, this utility works only with docker-compose? I have a google apps kubernets and I am wondering if I can deploy it there as a cluster.

i have never used kubernetes but you should be able to adapt the YML, i think:

i’m sure there’s other links out there. if you manage to make it work, posting instructions here would be helpful to others.

I am waiting a new server from my university, I will try to install first docker as per your instructions, in order to understand exactly how it works, and after that I will try in google cloud with kubernets. I let you know asap.

I use the linuxserver image and traefik:

version: "3"

services:
  traefik:
    image: traefik:v2.0.5
    command:
      - --entrypoints.websecure.address=:443
      - --providers.docker
      - --ping
      <...>
    container_name: traefik
    restart: always
    ports:
      - 443:443
    healthcheck:
      test: traefik healthcheck --ping
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro

  tt-rss:
    image: linuxserver/tt-rss:19.8-ls35
    container_name: tt-rss
    restart: always
    healthcheck:
      test: curl --fail -s http://localhost/ || exit 1
    depends_on:
      - postgres
    volumes:
      - tt-rss:/config
    environment:
      - SELF_URL_PATH=https://tt-rss.example.com/
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Moscow
    labels:
      - "traefik.http.routers.tt-rss.rule=Host(`tt-rss.example.com`)"
      - "traefik.http.routers.tt-rss.tls=true"
      <...>

  postgres:
    image: postgres:12.1-alpine
    container_name: postgres
    restart: always
    volumes:
      - pgdata:/var/lib/postgresql/data

I have problem with the refresh of the rss. IS there any process that collects the new rss data?