Here comes the little longer story ... not much longer ... only more prose.
This example is about installing tt-rss from scratch with its requires database server (I took postgres) with docker and docker-compose.
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).
(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) and ttrss(feed reader), can be later called from docker-composeseparatly
- 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_pgdataand mounts into container under /pgdata
- line 13: looks for a
Dockerfilein the directory named setup_data
- line 14: links container
pgdbwith alias db, so inside of this container the database is addressable via db, (imagine a call of ping 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.