Hello - thanks for setting this up using Docker Compose. Not only was it simpler than the old way of doing things, it was also my first introduction to docker.
I have this working well behind a caddy (version 2) reverse proxy, installed directly (via sudo apt install) on Ubuntu Server 20.04. In case anyone comes googling for this, I’ve pasted the Caddyfile below, with a few tips “for dummies” (like me).
As just indicated - I run my caddy reverse proxy directly on the host (“bare metal” ?), and would like to also Dockerise it. This won’t work if you just mount the same Caddyfile (pasted below) into the dockerised version of caddy. I think that’s because once it’s within the container, the addresses “localhost” or “127.0.0.1” (i.e. what the reverse proxy sends traffic to) will now refer to the container itself - not your physical host machine. My (n00b) understanding is that I should somehow link revrese proxy and tt-rss containers, or create a shared (virtual) network that bridges them.
Assuming that’s right, my question is: What’s best practice here - do I edit tt-rss’s docker-compose.yml file to define a specific network, and then also pass network that as an option when spinning up the reverse proxy container? And if so, do all four of the containers created by tt-rss (web, app, db, updater) need to have that custom network (or some other, internal network) defined for them? Also, is there anything to be done in respect of the ports exposed by the various containers?
(Notes for people wondering how to set up caddy, as a reverse proxy to tt-rss, without using Docker:
It was as simple (on ubuntu) as:
- adding the repository to apt and then running sudo apt install caddy (follow the instructions on the Caddy website), -
- using the Caddyfile below (which should live at /etc/caddy/Caddyfile), and then
- enabling / reloading the service via sudo systemctl enable caddy (or “restart” rather than “enable”).
Make sure ufw (firewall) rules also allow TCP traffic on those ports. Finally, if your server is behind your own router/gateway (e.g. at home), sure you have your router/gateway forwarding ports 80 and 443 to the server your reverse proxy lives on.
Caddyfile:
example.org # Add your domain name here, including the subdomain if appropriate. If you omit http:// or a port, caddy will set up HTTPS for you automatically - including fetching certificates for the domain/subdomain.
reverse_proxy /tt-rss/* 127.0.0.1:8280