Using Gradle for Single Click Deployment


using gradle for single click deployment

As a software engineer, nothing demotivates me more than having to test a web application remotely. Just imagining having to stop the application, upload the new code, and rerun the app tires me out. Fortunately, this process can be easily automated with build tools. Here I will share how I've overcome this issue by using one of my favorite tools: Gradle.

We will be deploying a simple "Hello World" web app. The entire source used here can be found on GitHub.



  • Gradle
  • A remote Linux machine (we will be using a Docker container)
  • Basic command line knowledge

Project folder structure:


Step 1: Setting up our remote machine

Note: If you already have a Linux server that you can SSH into, then skip to Step 2.

Let's begin by creating a Docker image using a Dockerfile. Following the folder structure shown previously, save this to webapp/deploy/Dockerfile:


To execute:

  • Open command line in webapp/deploy/
  • Execute:
  • Then execute:

The first command will create a Linux Docker image with all the requirements and a user called webadmin with password "password".

The second command will create a Docker container with the Linux image. Note: It will map the SSH port to 8887. To continue with the other steps, download the rest of the article here.

Isaac Yousuf

Isaac Yousuf

Software Engineer III

Isaac Yousuf joined Accusoft as a software engineer in 2016. He currently contributes to the Accusoft SDK products. Although he is early in his career, he has presented at a conference on Deep Learning, and he plans on doing more. A graduate of the University of South Florida, Isaac's degree is in Information Technology. His background includes enterprise web applications, hardware accelerated graphics, physics engines, and more. In his spare time, Isaac enjoys online games, running his guild, rugby, and coding.

Related posts

Accusoft’s CEO, Jack Berlin, Featured in Invest: Tampa Bay 2019
Read More >
The C++ STL: How to Harness Its Power
Read More >
Cracking the Barcode: The Secret of Supply Chains at Scale
Read More >

Join the discussion.