dodona-edu / dolos

:detective: Source code plagiarism detection
https://dolos.ugent.be
MIT License
248 stars 31 forks source link

Problem with VITE_API_URL enviroment variable in docker-compose.yml #1575

Open eloymg opened 2 months ago

eloymg commented 2 months ago

Describe the bug

There is an environment variable named VITE_API_URL in the docker-compose.yml file under the web section, but this variable doesn't work as expected. The VITE_API_URL variable is also defined in the web Dockerfile, where it works correctly during the build time but not at runtime.

To Reproduce Steps to reproduce the behavior: 1- Change the VITE_API_URL in the docker-compose.yml file. 2- Run docker-compose up. 3- Submit a file and observe that the web application makes a request to http://localhost:3000, ignoring the environment variable.

How I solved the problem To solve this problem, I modified the docker-compose.yml file to use the web Dockerfile and updated the VITE_API_URL variable in the Dockerfile.

Your environment (please complete the following information):

rien commented 2 months ago

Hi @eloymg, you're right. That environment variable in the docker-compose does indeed have no effect. I'll remove it and add a comment where to change the API URL if needed.

Thanks for bringing this up!