Skip to content

ownerofglory/hillel-trip-planner-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hillel Trip Planner backend

Application that enable users to plan and book various aspects of their trip, including hotels, car rentals, flights, restaurants, and sightseeing activities.

Tomcat Deployment Pipeline Status

Coverage

Prerequisites

  • Java Development Kit (JDK) version 17.
  • Apache Maven version 4.0.
  • MySQL DB version 8.X.XX

Tools Used

  • Spring Framework version 6.X.X or higher
  • Spring Boot version 3.2.X
  • Hibernate ORM version 6.1.X.
  • Apache Tomcat version 10

Local Development

Build

To build the project, execute the following command:

./mvnw --batch-mode clean package 

Testing

To run tests, execute the following command:

./mvnw --batch-mode test

Running

Environment variables

MYSQL_DRIVER=com.mysql.cj.jdbc.Driver
MYSQL_URL=jdbc:mysql://<host>:<port>/<database>
MYSQL_USER=<username>
MYSQL_PASSWORD=<password>
AUTH_ERROR_REDIRECT_URL=<url>
AUTH_SUCCESS_REDIRECT_URL=<url>
GOOGLE_CLIENT_ID=<url>
GOOGLE_CLIENT_SECRET=<url>
GOOGLE_TOKEN_URL=<url>
GOOGLE_AUTH_GRANT_TYPE=<grant>
JWT_SECRET=<256-bit-secret>

Building the docker image

  • Uncomment the lines for the local deployment and comment the prod instructions

Run the app with docker compose

Run docker-compose command

  • Replace env variable values with relevant values
  docker-compose up -d

Deployment local

Using Tomcat Smart Plugin for IntelliJ IDEA

Consider using the Tomcat Smart Plugin for IntelliJ IDEA to simplify the local deployment process. This plugin allows you to manage and deploy applications to Tomcat directly from your IDE, saving you time and effort.

Сan also be done manually:

  • Build the WAR file using the command mentioned above.
  • Copy the generated WAR file (usually found in the target folder) to the webapps directory of your Tomcat installation.
  • Start the Tomcat server by executing the startup script (./bin/startup.sh for Unix or ./bin/startup.bat for Windows).
  • Access the application at http://localhost:8080/hillel-trip-planner-web in your web browser, where hillel-trip-planner-web is the name of the WAR file.

Deployment to AWS ECS Fargate

ECS Fargate architecture

Recommendation: make yourself familiar with Official AWS guide ECS Fargate

Deployment remote Tomcat (prior to SpringBoot migration)

To deploy your application remotely, use the following command:

./mvnw --batch-mode --update-snapshots package cargo:deploy \
-Dtomcat.host=<TOMCAT_HOST> \
-Dtomcat.user=<TOMCAT_USER> \
-Dtomcat.password=<TOMCAT_PASSWORD> \
-Dtomcat.managerUrl=<TOMCAT_MANAGER_URL>

About

Hillel Trip Planner application backend service

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •