aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christopher Baklid <[email protected]>2018-05-22 23:05:41 +0200
committerGravatar Christopher Baklid <[email protected]>2018-05-22 23:05:41 +0200
commit4987fb431cfe5d25f8072455162d03b5a99ba2fc (patch)
treed0af5cfa12dbaaebd966f940e190da2e1c2e01ef
parentputs the webapp in a docker container and puts it in docker-compose (diff)
update readme
-rw-r--r--README.md25
1 files changed, 20 insertions, 5 deletions
diff --git a/README.md b/README.md
index bd1278a..b0b8196 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,20 @@
# snekbox
-Python sandbox runners for executing code in isolation
+Python sandbox runners for executing code in isolation aka snekbox
+
+The user sends a piece of python code to a snekbox, the snekbox executes the code and sends the result back to the users.
+As of 2018-05-22 (yyyy-mm-dd) it does not return the result, it simply outputs it to stdout.
+
+```
+user ->
+ website ->
+ <- websocket ->
+ <- webserver ->
+ <- rabbitmq ->
+ <- snekbox ->
+ <- <executes python code>
+
+```
+
# Dependencies
@@ -25,7 +40,7 @@ Start a rabbitmq instance and get the container IP
docker run --name rmq -d rabbitmq:3.7.5-alpine
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' rmq
# expected output with default setting: 172.17.0.2
-# If not, change the runner/config.py file to match
+# If not, change the snekbox/config.py file to match
```
## Test the code
@@ -34,10 +49,10 @@ use two terminals!
```bash
#terminal 1
-pipenv run python runner/consume.py
+pipenv run python snekbox/consume.py
#terminal 2
-pipenv run python runner/publish.py
+pipenv run python snekbox/publish.py
```
The publish will put a message on the message queue
@@ -53,7 +68,7 @@ docker run --name snekbox -d snekbox:latest
docker logs snekbox -f
#terminal 2
-pipenv run python runner/publish.py
+pipenv run python snekbox/publish.py
```
## Docker compose