Auto Repair Status Tracking Application made in Spring Boot
- Kleo Ismailati
- Java 11
- Spring Boot 2.5.5
- Lombok
- Swagger 2 Documentation
- MySQL
- IntelliJ IDEA
- MySQL Workbench
- Postman
- JDK 11 or OpenJDK 11 installed
- MySQL installed
- Docker installed
- Create new directory and clone project from git.
- Download maven dependencies.
- Under
resources/application-dev.properties
andresources/application-setup-dev.properties
change your datasource and mail username and password if needed. - Create schema in MySQL Workbench named auto_mechanic or whatever it is called in your
spring.datasource.url
- Change profile in application.properties
spring.profiles.active=dev
. tospring.profiles.active=setup-dev
. - Run the application and quit it once it is done creating the tables.
- Reset application.properties entry to
spring.profiles.active=dev
(Adds new admin with username/password:admin/Admin123
). - You are done! Run your application at
localhost:8080/swagger-ui/
if you didn't change the URL and access it. - You can now sign in as admin with credentials
admin
as username andAdmin123
as password for testing purposes.
- Run
$env:PROFILE="setup-docker";docker-compose up -d
in powershell inside project folder, or
PROFILE=setup-docker docker-compose up -d
in shell. - Run
docker-compose stop app
to stop your application service. - Run
$env:PROFILE="docker";docker-compose up app -d
in powershell or
PROFILE=docker docker-compose up app -d
in shell to rebuild app with new environment variable. - Done! You can access your API in
http://localhost:6868
.
- Run
docker-compose stop app
to stop the application. - Run
docker-compose up --build app -d
to rebuild.
(CAUTION!)
You can run docker compose down --rmi all -v
to clean EVERYTHING created by docker-compose.
Always in development! 🛠️ Never perfect! 🛠️