This is a web-based project replicated from the official Manchester United
website for my Samara State Transport University
course. The website, manutd
, provides a straightforward and efficient platform for fans to purchase merchandise while they are commuting. With an easily navigable interface, customers can explore a broad array of official goods and place an order with just a few clicks. Ideal for those who are constantly on the move and support the Red Devils.
- Docker
- Docker Compose
- Maven
- Terraform
Ensure these are installed on your system before proceeding.
-
Pull the latest version of the project from the GitHub repository.
git clone <https://github.com/hasan2001jk/Internet_Store.git>
-
Navigate to the project directory.
cd Internet_Store
-
Build the Java application using Maven.
This will generate the JAR file in the
target
directory../mvnw package -DskipTests
-
Build the Docker images for the application and the database using the Dockerfiles provided.
Use the following commands to build the images:
For the application:
docker build -t my_app_img:v1 -f Dockerfile1 .
For the database:
docker build -t postgres:v1 -f Dockerfile2 .
-
Run the Docker Compose command.
This will start the application and the database services.
docker-compose up
-
The application should now be running and accessible on the host machine.
-
Set up the infrastructure.
Ensure you have the right credentials set up for the
regru
provider. Update theregru_server
andregru_ssh
resources with the appropriate values.Run the following commands:
To initialize your working directory containing Terraform configuration files:
terraform init
To create an execution plan:
terraform plan
To apply the changes required to reach the desired state of the configuration:
terraform apply
Remember to replace any placeholder values in the commands with your actual values.