This directory contains the Redex backend for the server
run.sh
should be called with 5 arguments:
- "
EchoServer
" - "
run-echo
" - The base language file (likely something with filename PLTGraphRedex.rkt)
language._key
- Depth limit
The default mode of operation is execution in the current environment. Alternatively the program can also be run in a docker container.
To run in a docker container, set the environment variable GRAPHREDEX_DOCKER
to 1
.
Hint:This can also be done when executing the API server.
The docker image is assumed to be named graphredex/racket
docker build -t graphredex/racket -f=racket.DockerFile .
- ARANGO_SERVER="172.17.0.1"
- ! set
endpoint = tcp://0.0.0.0:8529
in/etc/arangodb3/arangod.conf
ARANGO_SERVER
The IP adress of the server, as accesible when running- Whitin docker this is likely
172.17.0.1
- Default:
127.0.0.1
- Whitin docker this is likely
ARANGO_PORT
port aranogoDB is running on- Default:
8529
- Default:
GRAPHREDEX_UNSAFE
set to1
to automaticly log in withdemo:demo
- Default: ``
The docker only needs to acces port 8529 on the machine that is running it.
The following iptables
rules can be used to restrict docker.
Replace 172.17.0.1/16
with the bip
in /etc/docker/daemon.json
sudo iptables -A INPUT -i docker0 -p tcp -d 172.17.0.1/16 --dport 8529 -j ACCEPT
sudo iptables -A INPUT -i docker0 -j DROP
ProTip: to remove these iptable
rules, repalce -A
with -D
.