Run codejail (sandboxed Python execution) as a service. This implements the custom Python problems in courses, and is a thin wrapper around the codejail library.
This service is configured with an in-memory database simply to make Django happy. The service itself effectively does not have a database, and should not rely on any database-dependent features such as waffle-based toggles.
This is intended to be run as a fully internal service with no database or admin frontend, with the LMS and CMS making calls to it unauthenticated. It should not be callable directly from the internet.
While the service uses AppArmor as a first (and really, only) line of defense, it should also be deployed in a way that does not allow direct connections to other IDAs or internal services within the Open edX deployment. In the ideal situation, networking would be set up to only allow outbound connections to a predetermined set of IPs or domains.
Please see the Open edX documentation for guidance on Python development in this repo.
The service may be started using gunicorn with a command like this:
export DJANGO_SETTINGS_MODULE=codejail_service.settings.production gunicorn -c codejail_service/docker_gunicorn_configuration.py \ --bind '0.0.0.0:8080' --workers=10 --max-requests=1000 --name codejail \ codejail_service.wsgi:application
There is a healthcheck endpoint at /health/
which responds to a
GET with 200 OK
if the service is running and healthy.
TODO (#3)
TODO (#3)
If you're having trouble, we have discussion forums at https://discuss.openedx.org where you can connect with others in the community.
Our real-time conversations are on Slack. You can request a Slack invitation, then join our community Slack workspace.
For anything non-trivial, the best path is to open an issue in this repository with as many details about the issue you are facing as you can provide.
https://github.com/openedx/codejail-service/issues
For more information about these options, see the Getting Help page.
The code in this repository is licensed under the Apache Software License 2.0 unless otherwise noted.
Please see LICENSE.txt for details.
Contributions are very welcome. Please read How To Contribute for details.
This project is currently accepting all types of contributions, bug fixes, security fixes, maintenance work, or new features. However, please make sure to discuss your new feature idea with the maintainers before beginning development to maximize the chances of your change being accepted. You can start a conversation by creating a new issue on this repo summarizing your idea.
All community members are expected to follow the Open edX Code of Conduct.
The assigned maintainers for this component and other project details may be
found in Backstage. Backstage pulls this data from the catalog-info.yaml
file in this repo.
Please do not report security issues in public. Please email [email protected].