Skip to content

Commit

Permalink
Add a docker-compose command to start the server
Browse files Browse the repository at this point in the history
  • Loading branch information
trampgeek committed Jan 20, 2020
1 parent aa876f2 commit f4378fc
Showing 1 changed file with 36 additions and 9 deletions.
45 changes: 36 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,49 @@

The [Moodle CodeRunner question type plugin](https://moodle.org/plugins/qtype_coderunner) requires a [Jobe server](https://github.com/trampgeek) on which to run student-submitted jobs. [JobeInABox](https://hub.docker.com/r/trampgeek/jobeinabox/) is a Docker image that provides a basic Jobe server that runs all the standard languages but does not have a mysql server installed so cannot use API-key access. For normal use, that's not a problem - API-key access is relevant only to Jobe servers delivering services to multiple clients.

If you're looking for the ready to run Docker image itself, you'll find it [in the DockerHub repo](https://hub.docker.com/r/trampgeek/jobeinabox/). This GitHub repository is relevant only if you wish to build your own customised Docker image.
## Using jobeinabox

To build a docker image with docker-compose, make sure you have docker and docker-compose installed. Then pull this repo, cd into the jobeinabox directory and edit Dockerfile to suit your own needs. Then simply build the image with the command.
To run this ready-to-go image, you need to have docker installed on your machine.
Then just type the command

docker-compose build
docker run -p 4000:80 trampgeek/jobeinabox:latest

This will start a Jobe server on port 4000.

You can check it's running by browsing to

<servername>:4000/jobe/index.php/restapi/languages

and you should see a json-encoded list of languages supported by this particular
jobe server.

Assuming you are running Jobe
as a Moodle/CodeRunner server, you can then configure the CodeRunner plugin
to use this Jobe server by logging into Moodle as an administrator, going to

Dashboard > Site administration > Plugins > Question types > CodeRunner

and setting the *Jobe server* field to

To build a docker image with the docker command, make sure you have docker installed. Then pull this repo, cd into jobeinabox directory and edit Dockerfile to suit your own needs. Then simply build the image with the command.
<servername>:4000

docker build . -t test/jobeinabox

## Building your own image locally.

The docker image is autobuilt on [DockerHub]((https://hub.docker.com/r/trampgeek/jobeinabox/). If you wish to
build your own version locally, make sure you have docker and docker-compose installed. Then pull this repo from github, cd into the jobeinabox directory and edit docker-compose.yml to suit your own needs. Then simply build the image with the command

docker-compose build

Or with a different timezone:

docker build . -t test/jobeinabox --build-arg TZ="Europe/Amsterdam"
docker-compose build --build-arg TZ="Europe/Amsterdam"

And with a different root password (please do since the source is open):

docker-compose build --build-arg --build-arg TZ="Europe/Amsterdam" --build-arg ROOTPASS="complicated_password"



And with a different root password, and please do since the source is open:

docker build . -t test/jobeinabox --build-arg TZ="Europe/Amsterdam" --build-arg ROOTPASS="complicated_password"

Instructions for using the image are on [DockerHub](https://hub.docker.com/r/trampgeek/jobeinabox/)

0 comments on commit f4378fc

Please sign in to comment.