Table of Contents
Graphlytic can be easily installed using our docker image published in the docker registry.
Get the Dockerfile and basic structure
As a first step, you need to create a directory structure where the docker image will be built.
Go to the directory where you want to place the application files and run:
git clone https://github.com/demtec/graphlytic-docker.gitIf you haven't installed git, you can download the files directly from Github as a zip file using this link: https://github.com/demtec/graphlytic-docker/archive/master.zip
Unzip the file in a dedicated folder and continue with the next steps.
Configure the application using environment variables in the Dockerfile (optional)
Configure Neo4j connection
This is an optional step that can be used when you want to set some of the application configurations prior to running the container. It's used mainly in automated environments. For the list of all configurations that can be set this way please refer to Configuration.
For instance to set the Neo4j connection go to graphlytic-docker directory and edit the Dockerfile file (you can set the connection also later, in the application's Setting section). There are several properties regarding the Neo4j connection. Please change these values according to your Neo4j location:
ENV NEO4J_CONNECTOR_BOLT=bolt://localhost:7687ENV NEO4J_CONNECTOR_USERNAME=neo4jENV NEO4J_CONNECTOR_PASSWORD=neo4jENV NEO4J_CONNECTOR_ENCRYPTED=falseIf the Neo4j database is running on your machine together with the Graphlytic docker container, try to set NEO4J_CONNECTOR_BOLT to:
- bolt://172.17.0.1:7687 on Linux
- bolt://host.docker.internal:7687 on Windows or Mac
Configure custom SSL keystore
Firstly make sure, you have a keystore file containing the desired certificate (e.g. ./keystore/graphlytic-keystore.jks). More information about adding a certificate to a keystore can be found here: How to install HTTPS Certificate.
It is possible to configure SSL context with these environment variables (examples below):
ENV SERVER_SSL_KEYSTORE=/usr/share/graphlytic/keystore/graphlytic-keystore.jksENV SERVER_SSL_KEYSTOREPASSWORD=SomePassENV SERVER_SSL_KEYSTORETYPE=JKSENV SERVER_SSL_TRUSTSTORE=/usr/share/graphlytic/keystore/graphlytic-keystore.jksENV SERVER_SSL_TRUSTSTOREPASSWORD=SomePassENV SERVER_SSL_TRUSTSTORETYPE=JKSENV SERVER_SSL_CLIENTAUTH=noneIn order to use a custom keystore, it needs to be mounted in a volume. To achieve this, use the docker command -v, for example:
docker run -tid --name graphlytic -v "%cd%"/keystore/:/usr/share/graphlytic/keystore -v "%cd%"/volume/:/usr/share/graphlytic/volume -p 8080:8080 -p 8443:8443 graphlyticwhich mounts ./keystore folder into /usr/share/graphlytic/keystore, which contains our graphlytic-keystore.jks, mentioned in the environment variables above.
Build the docker image
Fetch the latest GL version:
docker pull demtec/graphlytic:latestBuild your local image with this command:
docker build -t graphlytic .Run the docker container
Run in CMD console
docker run -tid --name graphlytic -v "%cd%"/volume/:/usr/share/graphlytic/volume -p 8080:8080 graphlyticStop the docker container
docker stop graphlyticStart the docker container
docker start graphlyticLog into the application
When the application is fully started you should be able to log in using the Login with default user manual.