Hello I am using the guide provided here to install TTRSS on my raspberry pi Git repository browser
And apparently now my service is working but if I go to my local IP address via the local WIFI network (aka raspberry’s IP address on my router) and go something like 192.168.1.x:8280/ttrss it gives me an empty apache server page (probably my own apache server running on raspberry pi!) Someone please help?
UPDATE
Soo looks like this does work but apparently the app cannot be accessed through my router via local IP address… I just need help with that now
Docker compose
version: '3'
# set database password in .env
# please don't use quote (') or (") symbols in variables
services:
db:
image: postgres:12-alpine
restart: unless-stopped
volumes:
- db:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_USER=${POSTGRES_USER}
app:
build:
context:
./app
restart: unless-stopped
environment:
- DB_TYPE=pgsql
- DB_HOST=db
- DB_NAME=${POSTGRES_USER}
- DB_USER=${POSTGRES_USER}
- DB_PASS=${POSTGRES_PASSWORD}
- OWNER_UID=${OWNER_UID}
- OWNER_GID=${OWNER_GID}
- SELF_URL_PATH=${SELF_URL_PATH}
volumes:
- app:/var/www/html
depends_on:
- db
backups:
build:
context:
./app
restart: unless-stopped
environment:
- DB_TYPE=pgsql
- DB_HOST=db
- DB_NAME=${POSTGRES_USER}
- DB_USER=${POSTGRES_USER}
- DB_PASS=${POSTGRES_PASSWORD}
- OWNER_UID=${OWNER_UID}
- OWNER_GID=${OWNER_GID}
volumes:
- backups:/backups
- app:/var/www/html
depends_on:
- db
command: /dcron.sh -f
updater:
build:
context:
./app
restart: unless-stopped
environment:
- DB_TYPE=pgsql
- DB_HOST=db
- DB_NAME=${POSTGRES_USER}
- DB_USER=${POSTGRES_USER}
- DB_PASS=${POSTGRES_PASSWORD}
- OWNER_UID=${OWNER_UID}
- OWNER_GID=${OWNER_GID}
- SELF_URL_PATH=${SELF_URL_PATH}
volumes:
- app:/var/www/html
depends_on:
- app
command: /updater.sh
# web:
# build: ./web
# restart: unless-stopped
# ports:
# - ${HTTP_PORT}:2015
# volumes:
# - app:/var/www/html:ro
# depends_on:
# - app
# web-ssl:
# build: ./web-ssl
# restart: unless-stopped
# environment:
# - CADDYPATH=/certs
# - HTTP_HOST=${HTTP_HOST}
# ports:
# - 80:80
# - 443:443
# volumes:
# - app:/var/www/html:ro
# - certs:/certs
# depends_on:
# - app
web-nginx:
build: ./web-nginx
restart: unless-stopped
ports:
- ${HTTP_PORT}:80
volumes:
- app:/var/www/html:ro
depends_on:
- app
volumes:
db:
app:
certs:
backups:
Environment variable
# Copy this file to .env before building the container.
# Put any local modifications here.
POSTGRES_USER=postgres
POSTGRES_PASSWORD=password
OWNER_UID=1000
OWNER_GID=1000
# You can keep this as localhost unless you want to use the ssl sidecar
# container (I suggest terminating ssl on the reverse proxy instead).
HTTP_HOST=localhost
# You will likely need to set this to the correct value, see README.md
# for more information.
SELF_URL_PATH=http://localhost:8280/tt-rss
# bind exposed port to 127.0.0.1 by default in case reverse proxy is used.
# if you plan to run the container standalone and need origin port exposed
# use next HTTP_PORT definition (or remove "127.0.0.1:").
HTTP_PORT=127.0.0.1:8280
#HTTP_PORT=8280
fox
2
HTTP_PORT=127.0.0.1:8280
you’re binding the container to localhost. this is a good practice but you won’t be able to access it over the network directly, you’ll need some kind of reverse proxy. normally this proxy also deals with SSL termination.
README should have configuration examples for this.
if you just want to test things you can remove 127.0.0.1: and try it like that. this has security implications though.
Im not really hosting this anywhere… This will just be in my home and only accessible at my home… do you think it’s secure that way?
Also @fox I tried doing what you said it apparently theres an nginx gateway error now
fox
4
main issue here is that docker (by default) goes around whatever firewall you might have configured on your server, implicitly allowing access to the forwarded container port, which might be a bad idea if the server is accessible from the internet.
for a local machine on a home network it’s not a big deal, especially if you don’t need SSL.
Also @fox I tried doing what you said it apparently theres an nginx gateway error now
hard to say without logs and docker-compose ps.
i guess you’re not using the docker hub version because it’s not available for ARM, you need to check if app container managed to get tt-rss source from tt-rss.org and initialize things properly. docker-compose logs etc.
Here’s the logs
and also the output of docker compose ps
Name Command State Ports
------------------------------------------------------------------------------------------
ttrss-docker_app_1 /bin/sh -c /startup.sh Up 9000/tcp
ttrss-docker_backups_1 /dcron.sh -f Up 9000/tcp
ttrss-docker_db_1 docker-entrypoint.sh postgres Up 5432/tcp
ttrss-docker_updater_1 /updater.sh Up 9000/tcp
ttrss-docker_web-nginx_1 /docker-entrypoint.sh ngin ... Up 127.0.0.1:8280->80/tcp
I also dont have any extra firewalls… this is a simple raspbian install…
fox
7
not sure what to tell you, if the app container is working and php-fpm is running[1], it should work. the only possible problem is something with docker networking preventing containers from communicating.
try entering shell on web-nginx (
docker-compose exec web-nginx /bin/sh) and pinging app.
-
$ docker-compose exec app ps
PID USER TIME COMMAND
1 root 0:00 {startup.sh} /bin/sh -e /startup.sh
54 app 0:00 {php-fpm7} php-fpm: master process (/etc/php7/php-fpm.conf
55 app 0:00 {php-fpm7} php-fpm: pool www
56 app 0:00 {php-fpm7} php-fpm: pool www
PID USER TIME COMMAND
1 root 0:00 {startup.sh} /bin/sh -e /startup.sh
55 app 0:00 {php-fpm7} php-fpm: master process (/etc/php7/php-fpm.conf
56 app 0:00 {php-fpm7} php-fpm: pool www
57 app 0:00 {php-fpm7} php-fpm: pool www
63 root 0:00 ps
This is what I get… so looks like php is working… so im not sure whats wrong…
fox
9
web-nginx_1 | 2020-12-02T12:15:35.281947038Z 2020/12/02 12:15:35 [error] 23#23: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 172.18.0.1, server: , request: "GET /tt-rss/ HTTP/1.1", upstream: "fastcgi://172.18.0.4:9000", host: "localhost:8280"
this is the important part. it can’t connect to app port 9000 but why?
Do you think this is because of the apache server I might be running?
Just checkd the port 9000 and nothing is running on my raspberry pi on 9000
fox
11
you really need to go look up docker documentation or something because you don’t understand how any of this works and it shows. this is quickly going beyond the scope of this forum.
that said,
- app container has FPM listening on port 9000 inside the container. it’s not accessible from the outside of this particular docker network which binds app, web, updater, etc
- your apache is not in any way related to this
- i don’t use docker on SBCs so i can’t tell you if there is anything specific about raspbian which might prevent docker from allowing inter-container communucation, normally this just works via an auto-created bridge. maybe you need to configure something docker-related, no idea.
- i told you to ping app from web-nginx but you didn’t.
hermann
12
Change your config:
SELF_URL_PATH=http://localhost:8280/tt-rss
causes a loop. This should be the “public” address of the pi, that is the name under wich you invoke tt-rss in your browser (http://ip-address-of-your-pi:8080/tt-rss)
fox
13
this setting is wrong but I doubt it could cause a 502, you’ll get a fatal tt-rss error on a red background instead.
he can’t even access fpm so things don’t go as far as failing on SELF_URL_PATH imo.