Coder Social home page Coder Social logo

od-compiler-bot's Introduction

CI

Requirements:

  1. Python 3.11
  2. Poetry (Recommended)
  3. Docker (Strongly recommended that this is ran in rootless mode)
  4. ~10GB of disk space

About:

A simple bot that takes arbitrary code and compiles/executes it within a Docker sandbox environment. The Docker containers lack network, compile/execute code as an unprivileged user, only have access to a read-only volume, and self destruct after 30-seconds. It is recommended that you pair this with a frontend, such as the Discord RedBot cog found here: https://github.com/OpenDreamProject/od-cogs

Whenever the OpenDream repository is updated, the server will build an updated Docker image on the next request. This garuntees that the code is always running on the latest version, but, it can also take a few minutes depending on your network speed and hardware.

Install:

Setup the python environment and install the required dependencies. If you have poetry, simply run poetry install --only main within the base directory.

Running

To start an active server, run using gunicorn. You can specify the number of workers and the log level using the below command.

gunicorn -b 127.0.0.1:5000 wsgi:app --log-level info --workers 1 --timeout 200

Alternatively, you can start the application directly in developer debug mode with

python wsgi.py

Development

Setup the python environment with poetry install, activate the environment with poetry shell, install the pre-commit hooks with pre-commit install

od-compiler-bot's People

Contributors

crossedfall avatar dependabot[bot] avatar pjb3005 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.