Skip to content

Latest commit

 

History

History
52 lines (40 loc) · 1.22 KB

build-and-run.md

File metadata and controls

52 lines (40 loc) · 1.22 KB

Print Service Build and Run Guide

Pre-requisites

Following tools required to run the print service locally.

  1. Ngrok to expose local port to remote to communicate with websub
  2. Java 11.
  3. Config Server running in respective environment.

Build

  1. To build jars:
    $ cd print
    $ mvn clean install 
    
  2. To skip JUnit tests and Java Docs:
    $ mvn install -DskipTests=true -Dmaven.javadoc.skip=true
    
  3. To build Docker for a service:
    $ cd <service folder>
    $ docker build -f Dockerfile
    

The print project is a spring boot service.

Configuration

Refer to the configuration guide

Run

To run a Print service jar:

java -Dspring.profiles.active=<profile> -Dspring.cloud.config.uri=<config-url> -Dspring.cloud.config.label=<config-label> -jar <print-jar-name>.jar
    

Example:

    _profile_: `env` (extension used on configuration property files*)    
    _config_label_: `master` (git branch of config repo*)  
    _config-url_: `http://localhost:51000` (Url of the config server*)  

Docker

To run as Docker:

docker run -dp 3000:3000 <name of the image>