Hi,
I’m switching my setup over from pulling from git to using docker-compose. I’ve run in to a couple of niggly issues.
The docker-compose file is slightly modified, and is below:
# set database password in .env
# please don't use quote (') or (") symbols in variables
networks:
nginx:
external: true
services:
db:
container_name: ttrss_db
image: postgres:12-alpine
restart: unless-stopped
volumes:
- ./ttrss-db:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_USER=${POSTGRES_USER}
app:
container_name: ttrss_app
image: cthulhoo/ttrss-fpm-pgsql-static
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:
- ./ttrss-app:/var/www/html
depends_on:
- db
updater:
container_name: ttrss_updater
image: cthulhoo/ttrss-fpm-pgsql-static
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:
- ./ttrss-app:/var/www/html
depends_on:
- app
command: /updater.sh
web:
container_name: ttrss_web
image: cthulhoo/ttrss-web
restart: unless-stopped
ports:
- ${HTTP_PORT}:2015
volumes:
- ./ttrss-app:/var/www/html:ro
depends_on:
- app
networks:
- default
- nginx
# web-ssl:
# image: cthulhoo/ttrss-web-ssl
# restart: unless-stopped
# environment:
# - CADDYPATH=/certs
# - HTTP_HOST=${HTTP_HOST}
# ports:
# - 80:80
# - 443:443
# volumes:
# - ./ttrss-app:/var/www/html:ro
# - certs:/certs
# depends_on:
# - app
# web-nginx:
# image: cthulhoo/ttrss-web-nginx
# restart: unless-stopped
# ports:
# - ${HTTP_PORT}:80
# volumes:
# - ./ttrss-app:/var/www/html:ro
# depends_on:
# - app
volumes:
db:
app:
certs:
This is the .env file:
# Put any local modifications here.
BUILD_TAG=latest
POSTGRES_USER=postgres
POSTGRES_PASSWORD=redacted
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=xcp-dl.gently.org.uk
# You will likely need to set this to the correct value, see README.md
# for more information.
SELF_URL_PATH=https://xcp-dl.gently.org.uk/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
-
Is it possible to add arbritary parameters to config.php and have them persist? I’m thinking in particular of extending SESSION_COOKIE_LIFETIME to avoid having to log in too often.
-
I’m using my own nginx container as a frontend to provide ttrss over SSL. This is the nginx config:
server {
listen 8281 ssl;
server_name xcp-dl.gently.org.uk;
access_log /config/log/nginx/ttrss_access.log;
error_log /config/log/nginx/ttrss_error.log;
ssl_certificate /etc/letsencrypt/live/xcp-dl.gently.org.uk/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/xcp-dl.gently.org.uk/privkey.pem;
ssl_session_timeout 5m;
ssl_protocols TLSv1.1 TLSv1.2;
ssl_ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!3DES:!MD5:!PSK:!MD5:!DSS;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
location /tt-rss/ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://ttrss_web:2015/tt-rss/;
break;
}
}
As you can see, nginx is listening on port 8281, and forwarding the request to port 2015 on the appropriate container.
If I set the SELF_URL_PATH in .env to
SELF_URL_PATH=https://xcp-dl.gently.org.uk/tt-rss/
Then it pretty much works, with the exception that whenever ttrss needs to redirect to itself (after a login say) then it uses the URL without the port, and this obviously doesn’t work.
If I specify
SELF_URL_PATH=https://xcp-dl.gently.org.uk:8281/tt-rss/
then I get a warning at startup about SELF_URL_PATH being wrong.
Anyone got any suggestions regarding the above?
Thanks
Andy