[Gambas-user] gambas playground only runs in docker?
Adrien Prokopowicz
adrien.prokopowicz at ...626...
Fri Aug 25 10:37:34 CEST 2017
Le Fri, 25 Aug 2017 02:49:36 +0200, PICCORO McKAY Lenz
<mckaygerhard at ...626...> a écrit:
> https://gitlab.com/prokopyl/gambas-playground
>
> the playground seems only runs in docker.. before i try to runs at my own
> internal service for my job.. this its true?
The playground does indeed need docker to work (in order to provide
isolated
throw-away environments for each script), but everything is not run in a
docker
container.
The playground actually consists of three parts (the three directories in
the repo) :
- The Web interface (playground-web) : It's just a bunch of static
HTML/CSS/JS,
they make the UI in the browser, and can be served by any web server (I
use NGINX
for the version I host, but it can be anything).
- The Playground Server : It's a Gambas Web Application that exposes a
REST API,
which takes the source code as input and outputs the generated result.
It uses docker to create a container for each incoming request, and
returns
the stdout and stderr of the container. It also handles the timeouts and
cuts
the output if it is too long.
The Server actually stands by itself, as it is run as by gb.httpd
process, but
I made it managed by Systemd and with NGINX as a reverse proxy for HTTPS,
caching, gzip and some other things.
- The Runner : it's a very simple Gambas application that gathers its
standard
input, and then feeds it into the Gambas Scripter (gbs3).
The Runner is built and put into a docker image (see the Dockerfile in
the repo),
which serves as a base image for the containers ran by the Playground
Server.
So, for short, what you need is *access* to the Docker daemon, some
webserver
to serve the static files, and of course a recent version of Gambas.
--
Adrien Prokopowicz
More information about the User
mailing list