- Java 17
- PostgreSQL 15
- Docker (if running Docker image)
- Start PostgreSQL server and create a database
- Build docker image
docker build -t cse-mosip/bookingservice .
- 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
- Server is now running at http://localhost:8080
-
Start PostgreSQL server and create a database
-
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"
-
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
-
Run the backend
./mvnw spring-boot:run