codeapp icon indicating copy to clipboard operation
codeapp copied to clipboard

Server-side execution on my on server?

Open carstenf opened this issue 2 years ago • 5 comments

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.

carstenf avatar Aug 16 '23 09:08 carstenf

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

bummoblizard avatar Aug 16 '23 09:08 bummoblizard

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?

carstenf avatar Aug 17 '23 10:08 carstenf

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

bummoblizard avatar Aug 18 '23 16:08 bummoblizard

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.

carstenf avatar Aug 21 '23 22:08 carstenf

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:

  • Run Judge0 on a server that is accessible from your phone
  • Clone this repository and change the file I mentioned and point it to your own server
  • Download Xcode and build the app on your phone

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.

bummoblizard avatar Aug 22 '23 01:08 bummoblizard