Tiny Tiny RSS setup with docker-compose in 2 minutes
a single command setup for tiny tiny rss
How can I setup and run my own tt-rss instance with docker-compose within 2 minutes?
TL;DR
Here comes the little longer story ... not much longer ... only more prose.
Intro
This example is about installing tt-rss from scratch with its requires database server (I took postgres) with docker and docker-compose.
Why?
I like to have some easy reproducible installation procedures for wanna-be-complex setups. I took docker as my favourite virtualization technique.
What is ...?
- tt-rss: it is an open source web based rss feed reader similiar to former google reader.
- docker: Docker containers wrap up a piece of software in a complete filesystem that contains everything it needs to run: code, runtime, system tools, system libraries – anything you can install on a server. This guarantees that it will always run the same, regardless of the environment it is running in.(cite from here)
- docker-compose: Compose is a tool for defining and running multi-container applications with Docker. With Compose, you define a multi-container application in a single file, then spin your application up in a single command which does everything that needs to be done to get it running.(cite from here).
how?
(I explain here only the
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# https://hub.docker.com/_/postgres/
pgdb:
container_name: pgdb
image: postgres
environment:
- POSTGRES_PASSWORD=mysecretpassword
- PGDATA=/pgdata
volumes:
- ./volumes/pgdb_pgdata:/pgdata
ttrss:
container_name: ttrss
build: setup_data
links:
- pgdb:db
volumes:
- ./tt-rss_:/var/www/html:rw
ports:
- 9108:80
- line 2 and 11: two services called
pgdb (postgres database) andttrss (feed reader), can be later called fromdocker-compose separatly - line 3: docker container name is pgdb
- line 4: service bases on docker image pgdb(:latest)
- line 8: saves the database outside in the local directory
./volumes/pgdb_pgdata and mounts into container under/pgdata - line 13: looks for a
Dockerfile in the directory namedsetup_data - line 14: links container
pgdb with aliasdb , so inside of this container the database is addressable viadb , (imagine a call ofping db ) - line 19: exposes container port 80 to local 9108 (http://localhost:9108 should get the reader)
Build the setup with
You watch a complete a shell recording here.
Disclaimer 1: For simplicity reasons I deployed the db ... no I let it to you, to find this little nasty thing ;).
Disclaimer 2: Maybe the downloads take longer than while my tests.