docker-ttrss icon indicating copy to clipboard operation
docker-ttrss copied to clipboard

SELF_URL_PATH is not recognized as environment variable

Open jcnoir opened this issue 7 years ago • 16 comments

Hi, Thank you for this nice docker image. I use it with the letsencrypt nginx proxy. With the default configuration I cannot access the web page and I get an error with incorrect SELF_URL_PATH. I tried to set SELF_URL_PATH as an environment variable but it is not used. I did workaround by passing these environment variables:

  • TTRSS_URL=mysubdomain.mydomain.com
  • TTRSS_PROTO=https Setting the TTRSS_PORT as 443 does not work, I had to omit the value (even if it is 443).

I don't know if it is a bug but it should be at least documented to avoid debugging ...

Thanks.

jcnoir avatar Jul 14 '17 13:07 jcnoir

@x86dev

Another -e issue? I wonder if this is linked to my problem passing variables.

On Fri, Jul 14, 2017, 9:49 AM jcnoir [email protected] wrote:

Hi, Thank you for this nice docker image. I use it with the letsencrypt nginx proxy. With the default configuration I cannot access the web page and I get an error with incorrect SELF_URL_PATH. I tried to set SELF_URL_PATH as an environment variable but it is not used. I did workaround by passing these environment variables:

  • TTRSS_URL=mysubdomain.mydomain.com
  • TTRSS_PROTO=https Setting the TTRSS_PORT as 443 does not work, I had to omit the value (even if it is 443).

I don't know if it is a bug but it should be at least documented to avoid debugging ...

Thanks.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/x86dev/docker-ttrss/issues/11, or mute the thread https://github.com/notifications/unsubscribe-auth/ABzd_KYq7HthoWEyYKwEtKt-mLuJJnebks5sN3HFgaJpZM4OYRqm .

bobberb avatar Jul 14 '17 16:07 bobberb

Same problem here!

xaf avatar Jul 24 '17 02:07 xaf

Hey @XaF Just use -e TTRSS_URL=url and -e TTRSS_PROTO=https as @jcnoir did.

thiesschneider avatar Jul 24 '17 05:07 thiesschneider

Some of the latest commits to TT-RSS contained some changes to SELF_URL_PATH. That was the reason why I extended / fixed the SELF_URL_PATH generation in the startup phase.

For making this to work with e.g. https://github.com/jwilder/nginx-proxy, you also have to use -e VIRTUAL_HOST=<sub.yourdomain.tld>

Just to be sure: You pulled the latest Docker image, right?

x86dev avatar Jul 25 '17 20:07 x86dev

To be sure I just pulled the latest version from the docker hub. Same results:

  • Defining SELF_URL_PATH as env variable does not work (incorrect SELF_URL_PATH)
  • Defining TTRSS_PORT=443 as env variable does not work (incorrect SELF_URL_PATH). You have to omit this variable.

jcnoir avatar Jul 25 '17 20:07 jcnoir

I'll have a look.

x86dev avatar Aug 01 '17 08:08 x86dev

I have the same problem (incorrect SELF_URL_PATH) !

clx81 avatar Aug 04 '17 11:08 clx81

The solution is to set the two env. variables to : TTRSS_SELF_URL = http://host_ip:port/ and SELF_URL_PATH = http://host_ip:port/ Two times the same value. It's work well for me. When I found a few minutes, I will modify the script : setup-ttrss.sh

clx81 avatar Aug 21 '17 18:08 clx81

Note: there's also an issue with TTRSS_PORT that you could also solve. It get's a double colon in lines 81 and 97.

agampe avatar Sep 03 '17 03:09 agampe

A quick note is that it seems like the request url must match exactly how the SELF_URL_PATH is set up. browser request url = http://rss.domain.com SELF_URL_PATH = http://rss.domain.com:80 therefore http://rss.domain.com == http://rss.domain.com:80 = false Same thing happens with SSL on port 443 as that request url will be https://rss.domain.com. My lazy solution is just editing setup.sh to have the static variable without ports. This problem still persist for native http ports where browsers remove port context.

madsprite avatar Sep 20 '17 20:09 madsprite

I just wanted to throw in my 2 cents into this problem. I have the same problem. Neither -e SELF_URL_PATH=http://rss.domain.com or -e TTRSS_URL=url works for me.

How did you workaround this problem?

TheLux83 avatar Oct 12 '17 15:10 TheLux83

try to add these ENVs:

  -e SELF_URL_PATH=https://domain.com/ \
  -e TTRSS_SELF_URL=https://domain.com/ \
  -e TTRSS_PROTO=https \
  -e TTRSS_URL=domain.com \

its working for me this way

thiesschneider avatar Oct 12 '17 16:10 thiesschneider

Thank you very much @thiesschneider This works like a charm :)

TheLux83 avatar Oct 12 '17 17:10 TheLux83

Looks like this is solved -- can we close this? Thanks for the help, @thiesschneider.

x86dev avatar Nov 08 '17 23:11 x86dev

Please adjust documentation before closing?

On Wed, Nov 8, 2017 at 6:23 PM, x86dev [email protected] wrote:

Looks like this is solved -- can we close this? Thanks for the help, @thiesschneider https://github.com/thiesschneider.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/x86dev/docker-ttrss/issues/11#issuecomment-342995205, or mute the thread https://github.com/notifications/unsubscribe-auth/ABzd_LBsGekI4w0KMc_Kt1LJ3QEbNRPlks5s0jfegaJpZM4OYRqm .

bobberb avatar Nov 10 '17 20:11 bobberb

Hi, its working for me this way. This is an example.

SSL:

        environment:
           TTRSS_WITH_SELFSIGNED_CERT: "1"
           TTRSS_PROTO: "https"
           TTRSS_URL: "192.168.1.124"
#           TTRSS_PORT: "8080"
           TTRSS_SELF_URL: "https://192.168.1.124/"
           SELF_URL_PATH: "https://192.168.1.124/"
           ....
        ports:
            - 443:4443

URL to open: https://192.168.1.124/


Non SSL:

        environment:
#            TTRSS_WITH_SELFSIGNED_CERT: "1"
#            TTRSS_PROTO: "http"
            TTRSS_URL: "192.168.1.124"
            TTRSS_PORT: "8080"
            TTRSS_SELF_URL: "http://192.168.1.124:8080/"
            SELF_URL_PATH: "http://192.168.1.124:8080/"
            ...
        ports:
            - 8080:8080

URL to open: http://192.168.1.124:8080/

wicope avatar Jan 30 '18 15:01 wicope