This project is focused on renovating the appointment system of a hospital. My task is to complete the implementation and development of the backend's appointment management system.
-
Install Docker on your system if you haven't already.
-
Clone the project repository from the provided source.
-
Navigate to the project directory using the command line or terminal.
-
Build the Docker image for the MySQL database by running the following command:
docker build -t mysql-image -f Dockerfile.mysql .
-
Once the MySQL image is built, run a MySQL container using the following command:
docker run -d --name mysql-container -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root -d mysql-image
-
Build the Docker image for the microservice, which includes the application and its dependences, and runs the test before compiling and executing the microservice. Run the following command:
docker build -t microservice-image -f Dockerfile.maven .
-
Once the microservice image is built, run a container using the following command:
docker run -d --name microservice-container -p 8080:8080 --link mysql-container microservice-image
-
Verify that the MySQL container and the microservice container are up and running:
docker ps
-
Access the API by opening a web browser and navigating to "http://localhost:8080" or using any API testing tool such as Postman.