Home

vaadineo as docker-compose application

It is possible to run vaadineo as docker-compose application.

prerequisites

you need to install docker and docker-compose. You can do this on a linux system or also inside a windows pc

This was only tested on a linux machine, should also work under windows. all following commands are described for linux.

download and create the dockerfile

goto a defined directory

1) download the file

2) unzip the file

it looks like this:

ab16@knecht:~/Downloads/tmp$ unzip docker_compose.zip
Archive:  docker_compose.zip
  inflating: Dockerfile
  inflating: target/lms-neo4j-vaadin.jar
  inflating: docker-compose.yml
  inflating: entrypoint.sh
ab16@knecht:~/Downloads/tmp$ ls -al
insgesamt 81064
drwxrwxr-x 3 ab16 ab16     4096 Okt 10 18:50 .
drwxr-xr-x 6 ab16 ab16     4096 Okt 10 18:49 ..
-rw-rw-r-- 1 ab16 ab16      556 Okt 10 18:11 docker-compose.yml
-rw-rw-r-- 1 ab16 ab16 82979365 Okt 10 18:49 docker_compose.zip
-rw-rw-r-- 1 ab16 ab16      372 Okt  2 23:01 Dockerfile
-rwxrwxr-x 1 ab16 ab16      237 Okt  2 21:44 entrypoint.sh
drwxrwxr-x 2 ab16 ab16     4096 Okt 10 18:50 target

build the docker image

I do not want to push the docker-image for vaadineo into a public docker repository. So you need to build the docker image by your self.

docker build -t vaadineo:latest .

check the docker-compose file and change the password if you want.

Important
The volume definition has to be to changed for your needs. The PLATFORM_BASE_URI Env var has to be changed to your needs, if you want to reach vaadineo from other hosts. the DYNREG_STARTURI has to be changed for your needs

check username neo4j and password vaadineo in vaadineo section and in db section (defining neo4j) !

If you are running the application in the internet and you use a other name as localhost:9080 then you have to change the system Environment Variable PLATFORM_BASE_URI=http://localhost:9080/ Change also from http to https

For future use we need a directory to store files. This directory is defined in the ENV Variable VAADINEO_FILE_DIR and has to be defined as Volume mounted outside from docker. This directory can be reached from inside the docker container and from outside the docker container. YOUR_PATH_FOR_VAADINEO_FILES has to be adjusted for your needs.

Example for a volume definition in docker-compose.yml file

   :
volumes:
      - /home/ab/vaadineoOnMyMachine/vaadineo:/var/vaadineo/
   :

that /home/ab/vaadineoOnMyMachine/vaadineo is the directory outside docker and /var/vaadineo inside docker

DYNREG_STARTURL defines a value for the LTI dynamic registration start url. You can leave this value empty or replace it with the start url for dynamic registration of your favorite LTI tool. You can change this value always, if you start in the tool section Button "dyn. Reg" (dynamic registration).

The DYNREG_STARTURL in the example works only on my local machine had has to be changed.

Important
Port and volume definitions can not be changed, if the docker container has been started. Also, a restart with changed parameters does not solve the problem ! You have to prune container and image and start docker-compose again. Your former container does not exist anymore.

Docker commands for pruning images and container.

docker container prune;
docker image prune;

Example docker-compose file

services:
  vaadineo:
    build: .
    container_name: vaadineo
    image: vaadineo:latest
    environment:
      - NEO4J_BOLT_URI=bolt://db:7687
      - NEO4J_HTTP_URI=http://db:7474
      - NEO4J_USER=neo4j
      - NEO4J_PASSWORD=vaadineo
      - PLATFORM_BASE_URI=http://localhost:9080/
      - VAADINEO_FILE_DIR=/var/vaadineo
      - DYNREG_STARTURL=http://192.168.2.206:7080/ltitool/api/v13/lti/registration/
    depends_on:
      - db
    entrypoint: ["sh","/entrypoint.sh"]
    ports:
      - "9080:9080"
    volumes:
      - /<YOUR_PATH_FOR_VAADINEO_FILES>/vaadineo:/var/vaadineo/
  db:
    image: neo4j
    container_name: neo4j-db
    ports:
      - "7474:7474"
      - "7687:7687"
    environment:
      - NEO4J_AUTH=neo4j/vaadineo
    volumes:
      - neo4j_data:/data
volumes:
neo4j_data:

start the application

docker-compose up

or

docker-compose -d up

logs from startup

b16@knecht:~/NEO/lms-neo4J-vaadin$ docker-compose up
Creating neo4j-db ... done
Creating vaadineo ... done
Attaching to neo4j-db, vaadineo
vaadineo    | + echo 'starting vaadineo '
vaadineo    | + starting vaadineo
vaadineo    | java -jar -Xms1g -Xmx1G -server '-Dspring.profiles.active=docker' '-Dfeature.lti13.enabled=true' -jar lms-neo4j-vaadin.jar
vaadineo    |
vaadineo    |   .   ____          _            __ _ _
vaadineo    |  /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
vaadineo    | ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
vaadineo    |  \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
vaadineo    |   '  |____| .__|_| |_|_| |_\__, | / / / /
vaadineo    |  =========|_|==============|___/=/_/_/_/
vaadineo    |
vaadineo    |  :: Spring Boot ::                (v3.4.1)
vaadineo    |
vaadineo    | [main] 2025-10-10 19:35:52.305 DEBUG o.springframework.boot.SpringApplication#load - Loading source class de.mahlsdorf.groupservice.Neo4jWithUIApplication
vaadineo    | [main] 2025-10-10 19:35:52.394 DEBUG o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext#prepareRefresh - Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@45e37a7e

access the application

if you want to use LTI

Important
If you want to use LTI, then vaadineo should be reachable from outside (if you want to use a external LTI TOOL), or the tool must run on the same machine. Also you must call vaadineo with a browser from the same machine. This is not really a option, it is only usefully for development and testing. The reason is, that the browser, vaadineo and the LTI tool must communicate with each other.

To make vaadineo reachable, you can put vaadineo behind a webserver. (see next section.) Then only the webserver has to be reachable from the internet.

behind a webserver

The goal is, that you have a webserver with an valid certificate for https and run your application with http behind a webserver. So is neo4j not accessible from outside your server.

If you want to have more vaadineo instances accessing one neo4j server, then all in one docker-compose approach is not the right one. you can use the docker image, you created before and a neo4j docker image. You put both behind a webserver. You must also open the prots for neo4j.

Important
If you use the Docker (vaadineo) and docker (neo4j) variant, than it is important to allow access to the neo4j ports only from your vaadineo server. Apache 2 Webservers offers also a loadbalancer option , so that you can hide all your instances behind one webserver.