# Building and running CPS Temporal locally ## Building Java Archive only Following command builds Java executable jar to `target/cps-temporal-x.y.z-SNAPSHOT` JAR file without generating any docker images: ```bash mvn clean install ``` ## Building Java Archive and local Docker image Following command builds the JAR file and also generates the Docker image: ```bash mvn clean install -Pdocker -Ddocker.repository.push= ``` ## Running via Docker Compose `docker-compose.yml` file is provided to be run with `docker-compose` tool and local image previously built. It starts following services: * CPS Temporal service (cps-temporal) * Postgres Timescale database (timescaledb) * Kafka broker (zookeeper and kafka) Execute following command from project root folder to start all services: ```bash docker-compose up ``` Then, use `kafkacat` tool to produce a data updated event into the Kafka topic: ```bash docker run -i --rm --network=host edenhill/kafkacat:1.6.0 -b localhost:19092 -t cps.data-updated-events -D/ -P </swagger-ui.html`