Skip to content

shubhamv108/spring-boot-jwt-demo

Repository files navigation

To run the application, execute following command in terminal -

cd app-parking-lot

mvn clean install

java -jar -Dspring.profiles.active=<dev/prod> -Dspring.datasource.url=jdbc:mysql://:/<db_name>?useSSL=false -Dspring.datasource.username=root -Dspring.datasource.password=root .jar

After successfully execution, open browser and check following url -

http://:/api/public/health

For depolying with an Nginx Rverse proxy by replacing text in between <> :

cd app-parking-lot

mvn clean install

cp parking-lot.service /etc/systemd/system/

sudo vi /etc/system/system/parking-lot.serivce

Provide correct file path in ExecStart

ExecStart=/usr/bin/java -jar <DIR_PATH>/parking-lot/app-parking-lot/target/parking-lot.jar

sudo systemctl start parking-lot

cp parking-lot.conf /etc/nginx/conf.d/

sudo systemctl start nginx

Application shall be accessible at http://localhost:8080/parking-lot/...

Build & Run application using Docker

docker build -f Dockerfile-DEV -t shubhamv/parking-lot . docker run --network="host" -e JAR=parking-lot.jar -t shubhamv/parking-lot:latest .

Releases

No releases published

Packages

No packages published