I almost despaired when trying to get the popular RSS server Tiny Tiny RSS working with Traefik. I’ve also tested other RSS reader, but none have pleased me as much as ttrss.
Since I got it working after a long time of testing, I would like to show you here how I got it working.
In my example, the docker configuration files are located unter /opt/containers/.
So first we navigate to this path and clone the GIT repository:
cd /opt/containers
git clone https://git.tt-rss.org/fox/ttrss-docker-compose.git ttrss-docker && cd ttrss-docker
Then we copy the configuration file and adjust the content:
cp .env-dist .env
nano .env
TTRSS_DB_USER=postgres TTRSS_DB_NAME=postgres TTRSS_DB_PASS=YOUR (RANDOM) SQL PASSWORD TTRSS_SELF_URL_PATH=https://ttrss.example.com/tt-rss HTTP_PORT=127.0.0.1:8280
So this means in my case I’ve created a subdomain ttrss.example.com which will then be used by traefik to set up the certificate etc.
Now we need to configure the docker compose file.
nano /opt/containers/ttrss-docker/docker-compose.yml
version: '3' services: db: image: postgres:12-alpine restart: always environment: - POSTGRES_USER=${TTRSS_DB_USER} - POSTGRES_PASSWORD=${TTRSS_DB_PASS} - POSTGRES_DB=${TTRSS_DB_NAME} volumes: - ./db:/var/lib/postgresql/data app: build: context: ./app restart: always env_file: - .env volumes: - ./app:/var/www/html - ./config.d:/opt/tt-rss/config.d:ro depends_on: - db backups: build: context: ./app restart: always env_file: - .env volumes: - ./backups:/backups - ./app:/var/www/html depends_on: - db command: /opt/tt-rss/dcron.sh -f updater: build: context: ./app restart: always env_file: - .env volumes: - ./app:/var/www/html - ./config.d:/opt/tt-rss/config.d:ro depends_on: - app command: /opt/tt-rss/updater.sh web-nginx: build: ./web-nginx restart: always ports: - ${HTTP_PORT}:80 volumes: - ./app:/var/www/html:ro depends_on: - app networks: - proxy - default labels: - "traefik.enable=true" - "traefik.docker.network=proxy" - "traefik.http.routers.ttrss.entrypoints=http" - "traefik.http.routers.ttrss.rule=Host(`ttrss.example.com`)" - "traefik.http.services.ttrss.loadbalancer.server.port=80" - "traefik.http.middlewares.ttrss-secured.redirectscheme.scheme=https" - "traefik.http.routers.ttrss-secured.rule=Host(`ttrss.example.com`)" - "traefik.http.routers.ttrss-secured.entrypoints=https" - "traefik.http.routers.ttrss-secured.tls.certresolver=production" volumes: db: app: certs: backups: networks: proxy: external: true
Publish the configuration file:
source .env
…and start the container:
docker compose up
Now the website should be reachable over https://ttrss.example.com/tt-rss/.