This repository contains the source code for the NextWork web application, a Java-based project built using Maven.
The NextWork web application is designed to [briefly describe the application's purpose, e.g., a simple web interface for managing tasks]. This project demonstrates a basic CI/CD pipeline setup, utilizing Git for version control and GitHub for remote repository management.
- Java: The primary programming language used for the web application's backend.
- Maven: A build automation tool used to manage project dependencies and build the application.
- Git: A distributed version control system for tracking changes to the source code.
- GitHub: A web-based platform for hosting and collaborating on Git repositories.
- Amazon EC2: A cloud computing service used to host the web application.
- VSCode with Remote-SSH: An IDE used for remote development and editing files on the EC2 instance.
- Clone the repository:
git clone https://github.com/GibzB/JavaWebApp-AWS.git
- Build the application using Maven:
mvn clean install
- **Deploy the application:
- Deploying to EC2:
- After building the application with Maven, the resulting
.warfile will be located in thetarget/directory. - Copy this
.warfile to your EC2 instance. You can usescpfor this:(Replacescp target/nextwork-web-project.war ec2-user@[your-ec2-public-ip]:/home/ec2-user/
[your-ec2-public-ip]with your EC2 instance's public IP address.) - On your EC2 instance, deploy the
.warfile to a web server like Apache Tomcat. If Tomcat is installed, place the.warfile in thewebapps/directory:(Tomcat will automatically extract and deploy the application.)sudo mv nextwork-web-project.war /var/lib/tomcat9/webapps/
- Ensure your EC2 instance's security group allows inbound traffic on port 8080 (or the port Tomcat is configured to use).
- After building the application with Maven, the resulting
- Deploying to EC2:
- Access the application:
- Once the application is deployed, you can access it via your EC2 instance's public DNS or IP address, followed by the application's context path. For example:
(Replace
http://[your-ec2-public-dns]:8080/nextwork-web-project/[your-ec2-public-dns]with your EC2 instance's public DNS.) - if you have a load balancer, use the load balancers dns name, rather than the ec2 instance's public dns.
- Once the application is deployed, you can access it via your EC2 instance's public DNS or IP address, followed by the application's context path. For example:
- Access the application:
- [Include access instructions, such as the URL to access the deployed application]
src/: Contains the source code for the web application.webapp/: Holds the web application's files (HTML, JSP, etc.).resources/: Contains configuration files.
pom.xml: Maven project configuration file.
This project uses Git for version control. All changes are tracked and managed through Git commits and branches. The master branch contains the stable, production-ready code.
Contributions to this project are welcome. Please follow these guidelines:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Commit your changes.
- Push your changes to your fork.
- Submit a pull request.