git clone https://github.com/xaghoul/car-department.git
- Enter in terminal
docker build -f Dockerfile .from the project root directory. - Then to up containers enter
docker-compose up - Enter
docker exec -it car_department bashto connect to thecar_departmentcontainer - Enter
psql -U admin -d car_department_databaseto connect to database - At this point you can do anything in the database. For example:
\dtto show all tablesSELECT * FROM car;to show all table records, or any other sql query. To make it work, tables actually should be created.
docker-compose down -vto remove containers. V flag actually matter, because without it database won't be removed and with the next creating container the same database will be used
Tech. stack:
- Java 17
- Spring Boot 2.5
- PostgreSQL
- Docker
- Liquibase
- Swagger
- Mapstruct
- Test stack: JUnit 5, Mockito, Testcontainers