Build & Run

How to Run

Pre-requisites

  • Java 21
  • Cardano Node or connect to a remote Cardano node
  • PostgreSQL DB

Build Jar

./gradlew clean build -x test

Update databse details

  1. Edit config/application.properties to add datasource url, username & password.
spring.datasource.url=jdbc:postgresql://localhost:5432/<db>

spring.datasource.username=user

spring.datasource.password=
  1. Run
java -jar application/build/libs/ledger-sync-application-<version>-SNAPSHOT.jar

Docker Build & Run

Build the jar file first

./gradlew clean build -x test

Build docker image

docker build  --target ledger-sync -t cardanofoundation/ledger-sync:<version> .

Docker Run

Copy env.example to env

Edit env file with database and network details

docker run -p 8080:8080 --env-file env cardanofoundation/ledger-sync:<version>