https://github.com/tofazzaltopu/school-registration-system
https://github.com/tofazzaltopu/school-registration-system
docker java junit5 maven mockito mysql restful-api spring spring-boot swagger zalando
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/tofazzaltopu/school-registration-system
- Owner: TofazzalTopu
- Created: 2022-01-27T13:43:38.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-03-07T15:12:41.000Z (over 4 years ago)
- Last Synced: 2025-02-17T12:33:23.528Z (over 1 year ago)
- Topics: docker, java, junit5, maven, mockito, mysql, restful-api, spring, spring-boot, swagger, zalando
- Language: Java
- Homepage:
- Size: 21.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# School Registration System
Please follow below instruction to run this project:
###Browse swagger:
http://localhost:8085/swagger-ui.html
Technology stack:
1. Java - 11
2. Spring Boot
3. Maven
4. MySQL
5. Docker
6. JUnit
7. Zalando (Problem Library)
8. Swagger
Run Commands:
1. mvn clean
2. mvn install
3. mvn spring-boot:run
Generate and run jar file:
1. mvn clean install.
2. cd target
3. java -jar school-registration-system.jar
### Create docker image and run
1. docker build -t school-registration-system .
2. docker run -p 8080:8080 school-registration-system
3. docker container run --name school-registration-system -p 8080:8080 -d school-registration-system
4. 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
5. docker run -p 8080:8060 --name=school-registration-system_container --link student_registration_container:mysql -d school-registration-system
6. docker start
7. docker logs
# Docker Compose Spring Boot and MySQL example
## Run the System
Command to run docker-compose:
```bash
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:
```bash
docker-compose up -d
```
## Stop the System
Stopping all the running containers is also simple with a single command:
```bash
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:
```bash
docker-compose down --rmi all
```