If you prefer not to use Docker, then we could deploy the app with a production profile locally by completing the following steps:
- First, make sure that MySQL DB is running from the previous step; otherwise, start it using docker-compose -f src/main/docker/mysql.yml up -d.
- Now let's create an executable archive for the prod profile by running ./gradlew bootRepackage -Pprod.
- Once the build is successful, there will be two archives (WAR) created under build/libs. The store-0.0.1-SNAPSHOT.war file is an executable archive which can be run directly on a JVM, and the store-0.0.1-SNAPSHOT.war.original is a normal WAR file that can be deployed to a server such as JBoss or Tomcat.
- Let's use the executable ...