This project demonstrates how to run a Spring Boot application with MySQL using Docker Compose.
- Docker
- Docker Compose
-
Clone the repository:
git clone https://github.com/hakimamarullah/vascomm-springboot
-
Navigate to the project directory:
cd vascomm-springboot
-
Start MySQL container:
docker-compose up --build -d
-
Run application (skip this step if the container already running from previous step):
./mvnw spring-boot:run
-
Access the Spring Boot application at http://localhost:8080.
-
Open your web browser and navigate to http://localhost:8080/swagger-ui/index.html to access the Swagger UI.
-
Use the Swagger UI to test the various endpoints exposed by the Spring Boot application.
- [non-detached] To stop the application and remove the containers, press
Ctrl + C
in the terminal wheredocker-compose
is running. - If you use
-d
option then simple run this command to stop all containersdocker-compose down