Skip to main content
Version: v11.9.4

Deployment to Heroku

Heroku is a platform as a service (PaaS) that enables developers to build, run, and manage applications entirely in the cloud. Developers can setup a Continuous Integration pipeline for a wide range of technologies.

This post demonstrates how you can deploy a WaveMaker app to Heroku. You can also setup auto deploy from an associated GitHub account.

The process can be divided into following three steps:

  1. Configuring WaveMaker App for Heroku - which includes
    • configuring Heroku's webapp-runner plugin
    • adding Heroku's Procfile
    • setting app in external repo
  2. Creating and Configuring Heroku App including
    • creating Heroku app
    • connecting it to the external repo
  3. Deploy and Run the App

Pre-requisites

App Configuration Setup for Heroku

  1. Open the WavaMaker App you want to deploy to Heroku.

  2. Configure Heroku’s webapp-runner plugin - Open pom.xml and add the following (as mentioned in the section “Configure Maven to download Webapp Runner” of  this article.).

       <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-dependency-plugin</artifactId>
    <version>2.3</version>
    <executions>
    <execution>
    <phase>package</phase>
    <goals><goal>copy</goal></goals>
    <configuration>
    <artifactItems>
    <artifactItem>
    <groupId>com.github.jsimone</groupId>
    <artifactId>webapp-runner</artifactId>
    <version>8.0.30.2</version>
    <destFileName>webapp-runner.jar</destFileName>
    </artifactItem>
    </artifactItems>
    </configuration>
    </execution>
    </executions>
    </plugin>

    heroku_pom

  3. Add a Heroku’s Procfile to WaveMaker App

    1. Using the instructions at Deploy your application to Heroku→ Create Procfile create the Procfile as a local file on your machine
    2. Upload it to the root of WaveMaker project using the Import -> Resource menu heroku_import_resource1 heroku_import_resource2
  4. Set up app in External Github Repository

    1. Push your application to External Repository heroku_git_repo1
    2. Push changes if prompted heroku_git_repo2
    3. Provide your GitHub credentials and a new repository name. heroku_git_repo3
    4. The repository will be created and code will be pushed to your GitHub account. heroku_git_repo4

Create and Configure Heroku application

  1. Create a new application in Heroku. heroku_create_app
  2. Connect Heroku application to GitHub. heroku_connect_app1
  3. Provide GitHub project name and connect. heroku_connect_app2
  4. From Settings Add buildpack heroku_buildpack
  5. Select Java and Save changes heroku_buildpack2

Deploy and run the application

  1. From the Deploy tab, Deploy Manually. heroku_deploy1
  2. Open Heroku application after the deployment is done. heroku_deploy2
  3. Your app is now running in Heroku
  4. Finally, enable auto deployment. Any push to GitHub repository will automatically deploy your application now. heroku_deploy3

Deployment to Heroku