1
0
Fork 0
mirror of https://git.tt-rss.org/fox/ttrss-docker-compose synced 2025-07-11 08:09:53 +02:00
ttrss-docker-compose/README.md

81 lines
3.2 KiB
Markdown
Raw Normal View History

2020-01-24 09:19:14 +03:00
# Dockerized tt-rss using docker-compose
2019-11-15 15:51:55 +03:00
2019-11-16 11:20:54 +00:00
The idea is to provide tt-rss working (and updating) out of the box with minimal fuss.
2019-11-15 17:08:40 +03:00
2020-01-23 08:04:27 +03:00
This setup is still WIP. Some features may be unimplemented or broken. Check the following
before deploying:
2019-11-15 15:51:55 +03:00
2020-01-23 08:04:27 +03:00
- [TODO](https://git.tt-rss.org/fox/ttrss-docker-compose/wiki/TODO)
- [FAQ](https://git.tt-rss.org/fox/ttrss-docker-compose/wiki#faq)
2020-01-24 09:12:41 +03:00
**EXPERIMENTAL, DON'T USE IN PRODUCTION**
2020-01-23 13:59:57 +03:00
2020-01-24 09:18:11 +03:00
**This is an alternative version which uses prebuilt images from Docker Hub.**
2020-01-23 08:04:27 +03:00
General outline of the configuration is as follows:
2019-11-15 15:51:55 +03:00
2020-01-22 16:41:31 +03:00
- separate containers (frontend: caddy, database: pgsql, app and updater: php/fpm)
2020-01-23 13:59:57 +03:00
- tt-rss latest git master source baked into container on build
2020-01-24 09:12:41 +03:00
- images are pulled from Docker Hub (automatically published on tt-rss master source update)
2020-01-23 13:59:57 +03:00
- working copy is stored on (and rsynced over on restart) a persistent volume so plugins, etc. could be easily added
2020-01-23 08:04:27 +03:00
- ``config.php`` is generated if it is missing
- database schema is installed automatically if it is missing
- Caddy has its http port exposed to the outside
- optional SSL support via Caddy w/ automatic letsencrypt certificates
2020-01-22 16:40:31 +03:00
- feed updates are handled via update daemon started in a separate container (updater)
2019-11-15 15:51:55 +03:00
2019-11-15 21:30:50 +03:00
### Installation
2020-01-24 09:12:41 +03:00
#### Get ``docker-compose.yml`` and ``.env-dist``
2019-11-15 21:30:50 +03:00
2020-01-23 08:10:40 +03:00
```sh
2020-01-23 13:59:57 +03:00
git clone https://git.tt-rss.org/fox/ttrss-docker-compose.git ttrss-docker
cd ttrss-docker
2020-01-24 09:12:41 +03:00
git checkout static-dockerhub
2019-11-15 21:30:50 +03:00
```
2020-01-24 09:12:41 +03:00
You're interested in ``docker-compose.yml`` stored in root directory, as opposed to ``src``.
Latter directory is used to build images for publishing on Docker Hub. Use it if you
want to build your own containers.
#### Edit configuration files:
2019-11-15 21:30:50 +03:00
Copy ``.env-dist`` to ``.env`` and edit any relevant variables you need changed.
* You will likely have to change ``SELF_URL_PATH`` which should equal fully qualified tt-rss
2019-11-15 21:30:50 +03:00
URL as seen when opening it in your web browser. If this field is set incorrectly, you will
likely see the correct value in the tt-rss fatal error message.
Note: ``SELF_URL_PATH`` is updated in generated tt-rss ``config.php`` automatically on container
restart. You don't need to modify ``config.php`` manually for this.
* By default, container binds to **localhost** port **8280**. If you want the container to be
accessible on the net, without using a reverse proxy sharing same host, you will need to
remove ``127.0.0.1:`` from ``HTTP_PORT`` variable in ``.env``.
2020-01-24 09:12:41 +03:00
#### Pull and start the container
2019-11-15 18:50:21 +00:00
2020-01-23 08:10:40 +03:00
```sh
2020-01-24 09:12:41 +03:00
docker-compose pull && docker-compose up
2020-01-23 08:10:40 +03:00
```
2019-11-15 21:30:50 +03:00
2020-01-24 09:12:41 +03:00
See ``docker-compose`` documentation for more information and available options.
2019-11-15 21:30:50 +03:00
### Updating
2020-01-24 09:12:41 +03:00
You will need to pull a fresh image from Docker Hub to update tt-rss source code. Working copy
2020-01-23 13:59:57 +03:00
will be synchronized on startup.
If database needs to be updated, tt-rss will prompt you to do so on next page refresh.
2019-11-15 21:30:50 +03:00
2019-11-16 11:23:43 +00:00
#### Updating container scripts
1. Stop the containers: ``docker-compose down && docker-compose rm``
2019-11-16 11:24:26 +00:00
2. Update scripts from git: ``git pull origin master`` and apply any necessary modifications to ``.env``, etc.
2020-01-24 09:12:41 +03:00
3. Pull fresh images and start the containers: ``docker-compose pull && docker-compose up``
2019-11-16 11:23:43 +00:00
2019-11-15 19:03:11 +00:00
### Suggestions / bug reports
2019-11-15 21:33:02 +03:00
2019-11-16 10:19:36 +00:00
- [Forum thread](https://community.tt-rss.org/t/docker-compose-tt-rss/2894)