thebaselab / codeapp

Building a full-fledged code editor for iPad
https://code.thebaselab.com
MIT License
2.95k stars 202 forks source link

Server-side execution on my on server? #913

Open carstenf opened 1 year ago

carstenf commented 1 year ago

I would like to use an external server (AWS EC2, Azure..) to install Python and run the code on that instance. As you are mention, you use Server-side execution. Theoretically this should be already available.

bummoblizard commented 1 year ago

You can do this by connecting to the SSH instances you have. To learn more about this: https://code.thebaselab.com/guides/connecting-to-a-remote-server-ssh-ftp

carstenf commented 1 year ago

Yes, that I did, but if I run a python code stored in my document folder, it picks up the pre installed python Version from your app. How can I change the settings, that the python version installed on my AWS EC2 is used?

bummoblizard commented 1 year ago

Code App uses an open-source code-execution server called Judge0. You could host one yourself on your instance and point Code App to it. Here's the configuration you need to change: https://github.com/thebaselab/codeapp/blob/25c470c8a33f892a4a013c01acb545437facf3ef/CodeApp/Constants/Secrets.swift#L1

carstenf commented 1 year ago

Thanks I looked into it, but I believe I’m not able to get that running. Is there an option that this could be included in the app? -> run code in the server which is actually connected.

bummoblizard commented 1 year ago

Thanks

I looked into it, but I believe I’m not able to get that running.

Is there an option that this could be included in the app?

-> run code in the server which is actually connected.

Here the steps you need to do:

Having the server configurable in app is possible too but is not currently available. If this is too much hassle, I'd suggest you to use the SSH feature instead.