scalacenter / scastie

An interactive playground for Scala
https://scastie.scala-lang.org
Apache License 2.0
431 stars 103 forks source link

Self-hosted Installations #536

Open tarmath opened 2 years ago

tarmath commented 2 years ago

Hello!

There's some interest here in hosting our own scastie installation at work. Such a setup would be advantageous in many ways, such as:

But to do that some work would be required, such as un-hardcoding the github api url (https://api.github.com) and so on...

Moreover, some documentation/instructions on how to deploy scastie in this way would also go a long way in increasing adoption.

Regardless, thanks for a great tool!

vincenzobaz commented 2 years ago

Hello @tarmath, it is interesting to hear about self-hosting Scastie!

But to do that some work would be required, such as un-hardcoding the github api url (https://api.github.com) and so on...

Besides configuration modularization, do you think any functionality would be affected? I would suggest to open self-contained issues so that we can discuss and address them individually.

Moreover, some documentation/instructions on how to deploy Scastie in this way would also go a long way in increasing adoption

Feel free to open issues with the documentation label, The CONTRIBUTING file explains the overall structure of the project and how to run it. You can get a better idea looking at run.sh and the deployment directory as well.

tarmath commented 2 years ago

Cool! I did look into those already, and thought about filing separate issues as well, but before doing that, opted to file this overarching question with minimal context in order to know if such changes would be welcome.

If you think this isn't necessary, please do feel free to close!

vincenzobaz commented 2 years ago

I think it is an interesting opportunity for Scastie to be hosted and customized by other organization.

We could imagine schools or universities having their instances for students including grading tooling or companies wanting to keep data confidential or include evaluation for code reviews.

soronpo commented 4 months ago

I'm interested in this too. To host a more dedicated faster scastie that also has access to additional tools. Additionally, scastie can change and cause its embedding in my documentation to break. If I self-host it, I can always guarantee it doesn't change unless I choose to.

rochala commented 4 months ago

Hey, so this is a very nice topic, but at the moment it is not possible for us to allocate resources for that initiative.

If you have your documentation self-hosted, you can just clone the repo, adjust the configuration, and it should work kinda work. As of hardcoding the URI's, that is something that could be improved, as of today it seems like treesitter syntax highlight is hardcoded along with source map adjustment in OutputExtractor.

Those can be adjusted to be more generic. If I find some time to do this I'll change it.