Skip to content

HSLdevcom/transitlog-hfp-split-sink

Repository files navigation

Build Status

Description

Application for inserting HFP data to PostgreSQL TimescaleDB.

Building

Dependencies

This project depends on transitdata-common project.

Either use released versions from public maven repository or build your own and install to local maven repository:

  • cd transitdata-common && mvn install

Locally

  • mvn compile
  • mvn package

Docker image

Running

Requirements:

  • Pulsar Cluster
    • By default uses localhost, override host in PULSAR_HOST if needed.
      • Tip: f.ex if running inside Docker in OSX set PULSAR_HOST=host.docker.internal to connect to the parent machine
    • You can use this script to launch it as Docker container
  • Connection string to Transitlog database is read from file.
    • Set filepath via env variable FILEPATH_CONNECTION_STRING, default is /run/secrets/db_conn_string
    • Format of connection string is jdbc:postgresql://localhost:5432/vehicles?user=hfp_writer&password=hfp_writer

All other configuration options are configured in the config file which can also be configured externally via env variable CONFIG_PATH