School Registration System
Please follow below instruction to run this project:
###Browse swagger: http://localhost:8085/swagger-ui.html
Technology stack:
- Java - 11
- Spring Boot
- Maven
- MySQL
- Docker
- JUnit
- Zalando (Problem Library)
- Swagger
Run Commands:
- mvn clean
- mvn install
- mvn spring-boot:run
Generate and run jar file:
- mvn clean install.
- cd target
- java -jar school-registration-system.jar
Create docker image and run
- docker build -t school-registration-system .
- docker run -p 8080:8080 school-registration-system
- docker container run --name school-registration-system -p 8080:8080 -d school-registration-system
- docker run --name student_registration_container -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=student_registration -e MYSQL_USER=manik -e MYSQL_PASSWORD=password -d mysql:latest
- docker run -p 8080:8060 --name=school-registration-system_container --link student_registration_container:mysql -d school-registration-system
- docker start
- docker logs
Docker Compose Spring Boot and MySQL example
Run the System
Command to run docker-compose:
docker-compose up
Docker will pull the MySQL and Spring Boot images (if our machine does not have it before).
The services can be run on the background with command:
docker-compose up -d
Stop the System
Stopping all the running containers is also simple with a single command:
docker-compose down
If you need to stop and remove all containers, networks, and all images used by any service in docker-compose.yml file, use the command:
docker-compose down --rmi all