Skip to content

cse-mosip/booking-service

Repository files navigation

Booking Service

Running

Prerequisites

  • Java 17
  • PostgreSQL 15
  • Docker (if running Docker image)

Steps for Docker

  1. Start PostgreSQL server and create a database
  2. Build docker image
    docker build -t cse-mosip/bookingservice .
  3. Run docker image (change configuration values as necessary)
    docker run \
        -e SPRING_APPLICATION_JSON='{"mosip-auth-service-url": "https://auth-service.cse-mosip.com/upload", "mosip-user-verification-url": "https://registration-service.cse-mosip.com/api/public/verify", "spring": {"datasource": {"url": "jdbc:postgresql://host.docker.internal:5432/mosip_booking", "username": "mosip", "password": "mosip"}}}' \
        -p 8080:8080 \
        cse-mosip/booking-service
  4. Server is now running at http://localhost:8080

Steps for running manually

  1. Start PostgreSQL server and create a database

  2. Create a profile-specific configuration file, e.g. src/main/resources/application-local.yaml (modify values as necessary)

    spring:
       datasource:
          url: "jdbc:postgresql://localhost:5432/mosip_booking"
          username: "mosip"
          password: "mosip"
  3. Set the current profile in the SPRING_PROFILES_ACTIVE environment variable (run the command for your specific shell)

    Bash:

    export SPRING_PROFILES_ACTIVE=local

    Powershell:

    $env:SPRING_PROFILES_ACTIVE = 'local'

    CMD:

    set SPRING_PROFILES_ACTIVE=local
  4. Run the backend

    ./mvnw spring-boot:run

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages