Train Handler server component of the FAIR Data Train
Train Handler is intended to be used together with client via Docker (unless for development purposes).
The intended use is via Docker and Docker Compose, configured via envvars:
trainhandler-server:
image: fairdata/trainhandler-server:latest
restart: unless-stopped
# volumes:
# - ${PROJECT_ROOT}/application.yml:/app/application.yml:ro
environment:
FDT_DISPATCH_ROOT: ${API_URL}
FDT_DISPATCH_INTERVAL: PT60S
FDT_POSTGRES_DB: ${POSTGRES_DB}
FDT_POSTGRES_USERNAME: ${POSTGRES_USER}
FDT_POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
FDT_KEYCLOAK_ENABLED: true
FDT_KEYCLOAK_URL: ${KEYCLOAK_URL}
FDT_KEYCLOAK_REALM: ${KEYCLOAK_REALM}
FDT_KEYCLOAK_RESOURCE: ${KEYCLOAK_CLIENT_API}
To run the application, a PostgreSQL database is required to be running. To configure the MongoDB with standard
connection (postgresql://localhost:5432/train-handler
), simply instruct Spring Boot to use the dev
profile. Then run:
$ mvn spring-boot:run -Dspring-boot.run.profiles=dev
Alternatively, set the dev
profile in your IDE that is used to launch the application.
Run from the root of the project:
$ mvn test
Run from the root of the project:
$ mvn package
You do not have to install Java and IDE locally, we supply multistage Dockerfile that first
build jar
file and then creates the image for deploying Train Handler:
$ docker build -t trainhandler-server:local .
We maintain a CHANGELOG, you should also take a look at our Contributing Guidelines and Security Policy.
This project is licensed under the MIT License - see the LICENSE file for more details.