Deploy using Docker - rhizomik/rhizomerAPI GitHub Wiki

Docker images for the Rhizomer frontend (RhizomerEye) and backend (RhizomerAPI) are automatically built and deployed to Docker Hub. The latest versions are always available from:

To deploy using Docker, install it first for Mac, Windows or Linux from: https://docs.docker.com/get-docker

Deploy using Docker CLI

To deploy Rhizomer's frontend and backend using the command-line tool for Docker (Docker CLI), use the following commands:

  • Backend: pull the rhizomer-api image, publishing port 8080, setting the default password for user admin and allowing requests from localhost
docker run -d -p 8080:8080 \
   -e RHIZOMER_DEFAULT_PASSWORD=password \
   -e ALLOWED_ORIGINS=http://localhost \
   rhizomik/rhizomer-api
  • Frontend: pull the rhizomer-eye image, publish port 80 and consume the API from localhost:8080
docker run -d -p 80:80 \
   -e API_URL=http://localhost:8080 \
   rhizomik/rhizomer-eye

After the images are pulled and the containers started, the Rhizomer fronted is available from http://localhost and the user can log in using user admin and password password. After logging in, you can create a new dataset and configure it to access the SPARQL endpoint with the data to be explored.

Deploy using Docker Compose

For more sophisticated deployment, docker-compose is recommended. With docker-compose, YAML files like the ones presented next can be used to configure Rhizomer deployment prepared for production, which might include a database for datasets configuration persistence.

The simplest docker-compose YAML file, presented next, provides a simple deployment including the fronted available from localhost and connecting to a backend deployed at localhost:8080. The default user is admin with the default password password. The default values for the password or the deployment locations can be edited or configured by setting the corresponding environment variables.

version: '3'
services:
  rhizomer:
    image: rhizomik/rhizomer-eye
    container_name: rhizomer
    ports:
      - "80:80"
    environment:
      - API_URL=${API_URL:-http://localhost:8080}
  rhizomer-api:
    image: rhizomik/rhizomer-api
    container_name: rhizomer-api
    ports:
      - "8080:8080"
    environment:
      - ALLOWED_ORIGINS=${CLIENT_URL:-http://localhost}
      - RHIZOMER_DEFAULT_PASSWORD=password

The datasets configuration in RhizomerAPI is stored in memory by default. Consequently, it is lost if the backend is restarted. To enable backend persistence, the environment variable SPRING_PROFILES_ACTIVE should be set to production together with DATABASE_URL, DATABASE_USERNAME and DATABASE_PASSWORD, which enable the connection to the database providing persistence.

It is also possible to use docker-compose to start the database service to be used by the Rhizomer API, for instance MariaDB like in the following docker-compose YAML file:

version: '3'
services:
  rhizomer:
    image: rhizomik/rhizomer-eye
    container_name: rhizomer
    ports:
      - "80:80"
    environment:
      - API_URL=${API_URL:-http://localhost:8080}
  rhizomer-api:
    image: rhizomik/rhizomer-api
    container_name: rhizomer-api
    ports:
      - "8080:8080"
    environment:
      - ALLOWED_ORIGINS=${CLIENT_URL:-http://localhost}
      - RHIZOMER_DEFAULT_PASSWORD=password
      - SPRING_PROFILES_ACTIVE=production
      - DATABASE_URL=jdbc:mysql://database:3306/rhizomer
      - DATABASE_USERNAME=rhizomer
      - DATABASE_PASSWORD=password
    depends_on:
      - database
    restart: on-failure
  database:
    image: mariadb:latest
    container_name: database
    environment:
      - MYSQL_DATABASE=rhizomer
      - MYSQL_USER=rhizomer
      - MYSQL_PASSWORD=password
      - MYSQL_ROOT_PASSWORD=password
    expose:
      - "3306"

After the images are pulled and the containers started, the Rhizomer fronted is available from http://localhost/ and the user can log in using user admin and password password. After logging in, you can create a new dataset and configure it to access the SPARQL endpoint with the data to be explored.