Graphileon Docker installation

Docker

Before proceeding with the installation, please install the Docker engine on the system. Instructions on how to install Docker can be found on the official Docker website. The Graphileon Docker image was built with Docker version 3.3 and should be compatible with all later versions.

After installing and running Docker, get the Graphileon Docker image from Docker Hub:

docker pull graphileon/graphileon

Start Graphileon

Graphileon is then started with the following command:

docker run -dt \
-p $HTTP_HOST_PORT:$HTTP_DOCKER_PORT \
#OPTIONAL -p $HTTPS_HOST_PORT:$HTTPS_DOCKER_PORT \
#OPTIONAL -v $PERSISTENT:/persistent \
--name graphileon
$GRAPHILEON

Where:

  • $HTTP_HOST_PORT refers to the port on the host machine that is used to connect to Graphileon.
  • $HTTPS_HOST_PORT [OPTIONAL] refers to the port on the host machine that is used to connect to Graphileon with secure connections.
  • $HTTP_DOCKER_PORT is the port on the Docker machine that Graphileon listens to for HTTP requests. You can set this in config.json. Default 3000
  • $HTTPS_DOCKER_PORT [OPTIONAL] is the port on the Docker machine that Graphileon listens to for HTTPS requests. You can set this in config.json. Default 3001
  • $PERSISTENT: [STRONGLY RECOMMENDED] path to a folder on the host machine where Graphileon will store uploaded files. If it is not set, a Docker-managed directory will be used instead. Mapping the persistent volume to a local directory on the host machine makes it significantly easier to update Graphileon or change the Graphileon configuration file.
  • $GRAPHILEON: graphileon for any Server Edition, graphileon/graphileon-personal-edition for Personal Edition.

Example Run:

docker run -dt \
-p 3000:3000 \
-v /path/to/persistent:/persistent
--name graphileon
graphileon

On success, expect to see output similar to the following:

<info> logger initialized (in graphileon-server.js:47)
<log> app listening on port 3000 (in graphileon-server.js:47)

Stop Graphileon

To stop Graphileon, run:

docker kill graphileon

Configuration

You can find the configuration file config.json in the $CONFIG folder.

You should set:

  • port: the $HTTP_DOCKER_PORT port Graphileon server will listen to (inside docker container / vm)

  • https port: the $HTTPS_DOCKER_PORT port Graphileon server will listen to, for example:

      "https" {
      	"port": 3001
      }
    
  • allowedDomains: a list of requesting domains the server is allowed to respond to. Add here http://$SERVER_ADDRESS:$HTTP_HOST_PORT and https://$SERVER_ADDRESS:$HTTPS_HOST_PORT (where $SERVER_ADDRESS is the domain and/or port of the host machine)

The Graphileon Docker container should be restarted after changing the configuration. Stop and rerun as described above.

Set up Graphileon

Graphileon is now ready to be set up. To access Graphileon, point your browser to

https://$SERVER_ADDRESS:$HTTPS_HOST_PORT or http://$SERVER_ADDRESS:$HTTP_HOST_PORT where $SERVER_ADDRESS is the ip or domain name of the host machine and $HTTP_HOST_PORT or $HTTPS_HOST_PORT are the ports configured earlier.

Using a local database

In order to use Graphileon with a local database, you will need to find the IP address that, within the Docker container, refers to your local machine.

If your database runs on the same machine as your Docker instance, the ip address you need enter as database host may differ from machine to machine. Below are the default IP addresses for the most common operation systems and Docker versions:

Configuration IP Address How to find it
Linux/MacOS & Docker Native 172.17.0.2 Run docker inspect, and find "Gateway" under "NetworkSettings" > "Networks" > "bridge" in the output.
Windows & Docker Native 10.0.75.1 In PowerShell (or Command Prompt), run ipconfig and look for "Ethernet adapter vEthernet (DockerNAT)".
MacOS & Docker Toolbox 10.0.2.2 This is the IP address VirtualBox uses to address the host machine from a virtual machine.