Closed mikaelGusse closed 3 months ago
Hi @mikaelGusse!
The VITE_API_URL
environment variable should be present in the dolos-web
container at build time. I think you can change this manually by changing this line: https://github.com/dodona-edu/dolos/blob/7e4bc1faf8c4f78034aeba1aed7465ca1211af7f/web/Dockerfile#L13
I understand this is not ideal however. I'll try to think of a better way on how the Web UI could automatically use the correct report location.
Hello, I have now had time to try with this change but it still seems to try to go through http. Is there some additional place I could check for this variable?
I will need some more information: does it always try to access the API through http, or only the reports? Can you expect whether the url's in the API json's use http or https?
If the API is responding with http, you could set DOLOS_API_DISABLE_FORCE_SSL: false
in the docker-compose.yml
. With this environment variable set to false
it will force all URL's to use https and also enforce other SSL security settings like secure cookies and so on.
We do have that flag set in the docker-compose but for some reason these specific ones are going through http. In the browser it gives me the following error when i try to open a report that has allegedly succeeded. On the right it seems to try to load some metadata.csv with http.
Strange. I'll try to reproduce this issue locally to find out what could be causing this.
I've drafted a fix for your issue, can you try out if #1522 solves this problem? You will need to build the API docker image manually as well, since that docker image isn't published yet.
Apologies for the delay but it looks like I was now able to get it to work! In addition to pulling the fixes from this #1522 I had to also change the VITE_API_URL variable in web/package.json to correspond to the corrrect one to get it to work.
Thanks for the help!
Great to hear!
Which component(s) is your question about? Self-hosting Dolos web app
What is your question? Hello! We here at Aalto are having some difficulties hosting Dolos on our own servers at the moment. We are trying to use the docker-compose method to host it. We are using nginx as well for this setup. Currently we are able to open up the web front end and submit a file for analysis. It manages to complete the analysis succesfully (most of the time) but when we try to open up the report it tries to fetch the report from the wrong place for some reason. Instead of going through https://DOLOS_URL/api/reports it tries to get the report from http://DOLOS_URL/reports. This happens despite us settings the VITE_API_URL to the https.
Our current nginx.conf looks like this:
And our current docker-compose looks like this