diff --git a/README.md b/README.md index 60fe2c3..bf044ea 100644 --- a/README.md +++ b/README.md @@ -92,8 +92,20 @@ The container is locked down, so there is no networking, limited memory and CPU ## Setup -0. Install Docker -0. Install Node +0. Install Docker 18+ +0. Install Node 10+ 0. Run `npm i` 0. Fill out `config.json` + - `owner` - The owner(s) of the bot. + Use an array for multiple owners. + - `token` - The bot token. + - `languages` Languages to use. + The language names here are different from the user-facing ones. + Check the folders in ./docker/ for the language names. + Change to null to enable all languages. + - `memory` Max memory usage of a container. + - `cpu` Max CPU usage of a container. + - `timeout` Time limit for code in milliseconds. + - `prepare` Whether to run containers on setup. + Setting to true will speed up the first eval, but that language might not be used. 0. Run `node .` diff --git a/config.example.json b/config.example.json index 6f66d90..0110d99 100644 --- a/config.example.json +++ b/config.example.json @@ -1,13 +1,10 @@ { - "owner": "Discord ID of the bot owner(s)", - "token": "Bot token", + "owner": "12345678901234", + "token": "MTU1fdsYNTRb2RT.FcD2l1ig.jIuKqwertyd432RROhF5A", "languages": [ - "Language whitelist, e.g.", "haskell", "python", - "The language names here are different from the user-facing ones.", - "Check the folders in docker/ for the language names.", - "Change to null to enable all languages." + "javascript" ], "memory": "128m", "cpus": "0.5",