-
-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Self Hosted Docker Compose Install - Blank Home Page #340
Comments
my compose file
|
Hi, Are you using a Mac? I have found many threads where Anyway, what is 192.168.11.75? a proxy? Requests to the app url succeed but those to assets (css/js/img files) failed. It could be a permissions problem with the |
I'm running this in a Ubuntu VM with docker compose 192.168.11.75 is the IP address of the VM i have a reverse proxy with caddy, but before i deploy wanted to check it internally |
It works fine, use port 80. Php files need to be refactored to include port from environment passed by docker. Alternatively you can setup an internal network using docker and pipe it through there in compose. |
Can you please give me an example of how to do this? |
version: "3.9"
services:
2fauth:
build:
context: .
dockerfile: 2fauth.dockerfile
args:
- ANY_BUILD_ARGS_HERE=${ANY_BUILD_ARGS_HERE:-default_value}
environment:
- ANY_RUNTIME_ENV_HERE=${ANY_RUNTIME_ENV_HERE:-default_value}
ports:
- "80:8000"
networks:
mynet:
ipv4_address: 172.66.0.10
networks:
mynet:
driver: bridge
ipam:
config:
- subnet: 172.66.0.0/24 Something like this. You need to fine tune it to your requirements. Make sure that the external (network) port 80 is mapped to the internal (container) port 8000, in this case. It would be nice if the original issues could be addressed and php instead would use the environment port as well in the libs responsible for manufacturing internal URLs. |
What's the difference between port 80 and 8000? About a year ago, I wasn't experiencing issues with the same configuration. I can't even go directly from local without a proxy, by the way. |
I am not an official maintainer for this project so I don't know what you are referring to. If I have spare time I might address the issues by making the appropriate changes to the php url templating. What do you mean about going from local w/o a proxy? If you use 80:8000 mapping in normal docker command it works with the internal network. Keep in mind, you'd have to access from https://localhost:80/ though (or omit the port entirely). For security and configuration matters I prefer mapping it to a virtual network subnet though. |
What I'm trying to say is that when I go to nas with cloudflared, I still go with localhost:port 8000 but with cloudflare proxy in between. |
Starting with v5.2, the NGINX docker image also listens to ipv6. Is it possible that this change impacts your configurations? |
Yes, when I use docker desktop on my local computer and set it to 80:8000 I can go to the homepage, what is the reason for this? Can't we use a port other than 80? I don't know what the difference between this image and yours is, but I was able to use 80 external ports with this image. https://hub.docker.com/r/easysoft/2fauth |
Does the v5.1 image run without issue? |
I tried with v5.1 and 5.0.3 image. I have the same problem. Edit: I have tried almost all images from old to new. It works fine up to v5.0.2. In v5.0.3 and later image versions I get the error “ERR_CONNECTION_REFUSED”. Whatever is happening happens between v5.0.2-v5.0.3 :) |
Thanks for all these tests.
Few things have changed between the two: v5.0.2...v5.0.3 Do you have |
No, it is not defined. I am sharing the exact compose file I use. version: "3" |
For the record: So, for your v5.0.3 compose file to work, I had to make 2 changes :
When targeting v5.0.4 or a higher image version, the configuration works as is, or without The weird part is the error type. On my test machine the error was |
hum, for me it's a proxy issue then (you previously said that there is a proxy in front of the nas) |
Yeah, probably because it's a proxy.. |
Struggling with blank screen. Not sure if it is how I have set up the Traefik labels (works for 50 other containers):
Get a blank screen if trying localhost:8340, and page not found if going via reverse proxy url (have tried changing app/asset url to 2fauth:8340, etc). Traefik reports all is good (see added screens), so not sure what is going on. Log doesn't really tell me much. 2fauth is latest release (5.2.0) |
@Lebowski89 Is there any error in browser devTools? Check the js files url in the Network tab, does the url domain match the domain visible in the browser address bar? |
I have the same issue, but ASSET_URL did not help.
I also tried the server's IP and its domain name (with and without I also added the port with I don't use a proxy. I created the container with Portainer inside a Proxmox VM with the default bridge network. I started with version 5.0.3. IIRC I had some problems with blank pages from the beginning, but I was able to overcome them somehow (page refresh?). Then eventually Watchtower hit and I got the latest version. The issue persists, no matter which address I go to:
with the ASSET_URL respectively changed. The files exist:
The browser tells this (e.g. with the IP approach): (I don't know why provisional headers are shown despite the cache being disabled) I think I've tried a few options and it's just a matter of finding the right combination. What do you think? Anything I can try? Some of your comments refered to previous versions. It would be nice if you could give some updated hints about the current version 5.2.0 only. Thank you for your time. |
Please do not set If the docker container is mapped to a specific port, then add it to the Once done, reload the 2FAuth index in your browser (use ctrl+F5 to force cache clearing). If you get the blank page, check the Network tab in Dev Tools: Is the domain of the In a nutshell:
... and so on. This is to avoid cors error. If the blank page persists despite this tuning then maybe |
Thanks, that worked! :) All I had to do was to add the port to I'd like to suggest that you add another note for APP_URL in the doc. Something like "Ensure you add |
Thanks for the suggestion, I've changed the documentation to reflect this, the website will be updated soon. edit 11/09: Web site updated |
Version
5.2.0
Details & Steps to reproduce
I created the server with docker compose with version 5.2.0 tag and default file as described and in both instances i only get a blank page when i browse to the URL
Expectation
Supposed to see a login page
attaching screen shot of web console from browser. it has some connection_refused issues.
Error & Logs
Docker compose console logs
Execution environment
No response
Containerization
Additional information
No response
The text was updated successfully, but these errors were encountered: