judge0 / ide

✨ Simple, free and open-source online code editor.
https://ide.judge0.com
MIT License
818 stars 256 forks source link

Added Dockerfile and entrypoint script to configure API Urls #76

Open darthcircuit opened 1 year ago

darthcircuit commented 1 year ago

I've created a basic Dockerfile that will allow people that are self-hosting the API to also spin up the IDE easily and configure the API URL setting by specifying an environment variable called API_URL

Build the image: docker build -t judge0-ide .

Run Locally: docker run -d -p 8080:80 --name judge0-ide -e API_URL="https://api.example.com" judge0-ide

darthcircuit commented 10 months ago

I'll update that tonight. Thanks!

darthcircuit commented 10 months ago

I've updated my code to remove all references to defaultUrl and put the contents into apiUrl directly. I also changed my const to a var to match your request.

When i get more time, i'll add some changes to allow an environment variable to update the extraApiUrl