This repository contains a demo project created as part of my DevOps studies in the TechWorld with Nana – DevOps Bootcamp.
https://www.techworld-with-nana.com/devops-bootcamp
Demo Project: Java App Deployment on DigitalOcean
Technologies used: DigitalOcean, Linux, Java, Gradle
Project Description: This project demonstrates how to deploy a Java Gradle application to a DigitalOcean droplet using basic cloud and Linux concepts.
git clone https://gitlab.com/twn-devops-bootcamp/latest/05-cloud/java-react-example
cd java-react-exampleCopy your SSH key:
cat ~/.ssh/id_rsa.pubAdd it here: https://cloud.digitalocean.com/account/security
Choose a basic Ubuntu image and attach your SSH key.
ssh root@<DROPLET_IP>
apt update && apt install -y openjdk-17-jre-headlessadduser app
usermod -aG sudo appsu - app
mkdir ~/.ssh
vim ~/.ssh/authorized_keysPaste your public SSH key into authorized_keys.
Copy the JAR file to the droplet:
scp build/libs/java-react-example.jar app@<DROPLET_IP>:/home/appRun the application:
ssh app@<DROPLET_IP>
java -jar java-react-example.jarAllow the following ports:
22 - SSH
7071 - Java Application
Attach the firewall to your droplet.
Open your browser and navigate to:
http://<DROPLET_IP>:7071A Java Gradle application successfully deployed and running on a DigitalOcean droplet using basic cloud infrastructure and Linux administration practices.




