RoadBase consists of the following services that need to be deployed:
The frontend is an Ember application that runs in a docker container.
The RoadBase backend consists of multiple services:
- semtech/mu-identifier:1.9.1
- semtech/mu-dispatcher:2.0.0
- Mounted volumes: ./config/dispatcher:/config
- tenforce/virtuoso:virtuoso7.2.5
- Environment variables: SPARQL_UPDATE & DEFAULT_GRAPH
- Mounted volumes: ./data/db:/data and ./config/virtuoso.ini:/data/virtuoso.ini
- semtech/mu-cl-resources:1.20.0
- Mounted volumes: ./config/resources:/config
- semtech/mu-migrations-service:0.7.0
- Mounted volumes: ./config/migrations:/data/migrations
- Environment variables: BATCH_SIZE (Otherwise virtuoso will create pretty long SQL queries and keep retrying with a smaller batch size until it succeeds)
open source web server with automatic HTTPS written in Go. Also running in a docker container.
All docker images are build and pushed to docker hub using github actions (roadbase-main.yml).
If you want to change which docker hub repository the images are pushed to, change DOCKER_PASSWORD and DOCKER_USER in the github "secrets" settings:
To setup deployment on any server, a docker-compose.yml has been created in this folder. If the docker hub repository has changed, don't forget to edit the image links in this file as well.
Issue: Importing the accident database and migrating it to linked open data generates a huge load on the server which causes the docker compose to fail if not enough memory is available (at least 4gb of RAM is recommended). The current fix was to only migrate a small part of this dataset to prove technical viability.
The way this deployment is setup, no source code is needed on the server itself. The only file that is necessary is the docker-compose.yml file.
- Install docker on the server: Docker documentation
- Copy the docker-compose.yml file to the server and edit it to use the correct docker hub images.
- If the docker hub repository is private, don't forget to login using "docker login -u your_username -p your_password"
- Run the "docker-compose up" command in the directory on the server that contains the docker-compose.yml file. This will also spin up the Caddy server image so no nginx is needed.
- If desired, follow the watchtower documentation for automatic deployment to the server.
For the automatic deployment, watchtower will be used to automate the refresh of the images after they are pushed to docker hub.
Run the following command to start the watchtower docker container and pol for the change of images every 2 mins:
docker run -d \
--name watchtower \
-v /var/run/docker.sock:/var/run/docker.sock \
containrrr/watchtower \
--interval 120
This has also been added to the docker-compose file and will be setup automatically when running it.
164.90.192.163
roadbase.osoc.be
