-
Notifications
You must be signed in to change notification settings - Fork 41
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
White page solution / Weiße Seite Lösung (reverse proxy nginx caddy) #61
Comments
This HotFix helped me and now Metasfresh is working in Docker with Traefik as a proxy. |
503 means service unavailable. Check "docker ps" whether all containers are up and running, especially the API one. Secondly you might wanna check the docker-compose.yml for correct config. In the meantime I stopped using this project and started using another one (hint: name has 4 letters, 3 of which are an o) You might wanna check that out it's much easier to set up and use |
Haha thanks @sutidor, I actually probed around that one with the three o's ;) and decided to give metasfresh a spin because it doesn't come with accounting features in the community edition. It does seem like metasfresh is harder to set up and not as intuitive. |
@csaeum
Meine docker-compose.yml
|
Evaluating ERP software, with docker install as a requirement, and ran headlong into this while trying to reverse proxy w/traefik for mTLS. I'm a bit surprised that this isn't fixed (along with using docker secrets). @l4b4r4b4b4 Use "traefik.http.services.webui.loadbalancer.server.port=80" |
Thank you for the great ERP system. While I got a problem when I installed it. When I visit the local IP address: 192.168.79.151 on my browser, I got a blank page and some errors as blow. |
@Henry17888 you should try to configure the webui config at |
@Aldiwildan77 thank you. here is the config.js content. while I don't know how to config it. please kindly help advise how to set it. thank you so much! |
Well it should match the containers hostname. So my guess would be that in your setting you have to make sure, the IP in config.js matches the IP of your containers. Since docker assigns random available IP addresses to containers in the (virtual) docker networks they participate in. Or as you can see here:
Though in the end I though, that the Dockerfile assigns the right address in the context of a local installation... |
Is this a bug or feature request?
Bug
What is the current behavior?
When using a (nginx) reverse proxy and passing WEBAPI_URL=https://metasfresh.domain.tld through docker-compose.yml,
start_webui.sh replaces https to http and thus provokes a mixed content issue.
File in question:
https://github.com/metasfresh/metasfresh-docker/blob/master/docker-src/webui/sources/start_webui.sh
after else, line
sed -i 's/\https\b/http/g' /opt/metasfresh-webui-frontend/dist/config.js
Which are the steps to reproduce?
Run metasfresh docker using the example docker-compose file without certificates and then reverse proxy it.
What is the expected or desired behavior?
Assume that the input in WEBAPI_URL is correct including the protocol and write it as is into the config.js file.
Alternative: Provide an option for reverse proxy.
Hotfix
bash into your container
docker exec -it metasfresh_docker_webui_1 /bin/bash
install editor nano, vi..
apt-get install nano
edit files
nano start_webui.sh
comment out the line like so
#sed -i 's/\https\b/http/g' /opt/metasfresh-webui-frontend/dist/config.js
or remove itctrl / strg+x, y to exit nano
nano /opt/metasfresh-webui-frontend/dist/config.js
replace http with https again
(you can also add the ports if you have a different one like
https://metasfresh.domain.tld:8443
)ctrl / strg+x, y to exit nano
you dont need to restart anything, because the config is read as the site is accessed. Changing the start script start_webui.sh makes sure it stays that way even after restarting.
Hotfix 2
I created a start_webui.sh in the sources folder path/metasfresh-docker/webui/sources/
with the line
#sed -i 's/\https\b/http/g' /opt/metasfresh-webui-frontend/dist/config.js
and changed the Dockerfile in path/metasfresh-docker/webui/ as follows:
after
COPY sources/configs/config.js /opt/metasfresh-webui-frontend/dist/
add 2 lines:
The text was updated successfully, but these errors were encountered: