Second task for yandex backend development school
REST API service for working with a file tree
- Developed with Spring Boot and PostgreSQL database
- Built using Maven
- Containerized using Docker
The service allows you to operate a database with SystemItems
- Create
- Update
- Delete
- Retrieve
- Get history
- Get statistic
The API documentation is available here.
foo@bar:~$ git clone https://github.com/Emented/DiskApi
Before launching the application for the first time,
you need to create .env
file using the example below
POSTGRES_PASSWORD=postgres
POSTGRES_USER=postgres
POSTGRES_DB=disk_api_db
SPRING_DATASOURCE_URL=jdbc:postgresql://db:5432/disk_api_db
SPRING_DATASOURCE_USERNAME=postgres
SPRING_DATASOURCE_PASSWORD=postgres
Building...
foo@bar:~$ mvn clean install
Building and launching Docker Compose
foo@bar:~$ docker-compose up --build
For further runs use
foo@bar:~$ docker-compose up
Before launching the application, you need to create a database and change the file application.properties:
- Put your username in the place of "USERNAME"
- Put your password in the place of "PASSWORD"
- Put your database name in the place of "DATABASE_NAME"
spring.datasource.url=jdbc:postgresql://localhost:5432/DATABASE_NAME?useSSL=false&&serverTimezone=UTC
spring.datasource.username=USERNAME
spring.datasource.password=PASSWORD
foo@bar:~$ mvn spring-boot:run