This is an example to show how to deploy an application using the Java Tomcat application with DB (MySQL) stack template in Bitnami Stacksmith
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
stacksmith/user-scripts
LICENSE
README.md
build-managed-db.sh

README.md

Java Tomcat Application with DB (MySQL): Customerapp

This is an example to show how to deploy an application using the Java Tomcat application with DB (MySQL) stack template in Bitnami Stacksmith.

Package and deploy with Stacksmith

  1. Go to stacksmith.bitnami.com
  2. Create a new application and select the Java Tomcat application with DB (MySQL) stack template.
  3. Select the targets you are interested in (AWS, Kubernetes, ...)
  4. Upload the customerapp-1.0.0.war file (which can be found in releases for the project.
  5. Upload the boot.sh script from the stacksmith/user-scripts/ folder.
  6. Click the Create button.
  7. Launch it in AWS or download the helm chart to run it in Kubernetes
  8. Access your application: http://${IP} for AWS or http://${IP}:8080 for Kubernetes and Azure respectively

Scripts

The application requires a boot script that performs application specific initialization.

boot.sh

This script takes care of initializing the database and configuring the application.

When the application is first run, it finds the folder where the application was deploed and then creates an application.yml file with database configuration settings.

Packaging the application from source code

The customerapp-1.0.0.war file can also be created by building the application in the app/ folder.

Simply run the following command in the app/ folder:

mvn package

The command sets up all required dependencies, builds and packages the application inside the target folder.

It can also be built using Docker by running:

$ ./build-with-docker.sh

This will pull an image of Maven and JDK 8 and perform build of the application.