-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
63 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,50 @@ | ||
# API | ||
# SpringBoot | ||
|
||
To start the api via docker you need to run `docker-compose up --build -d` | ||
form `backend/spring-boot`. | ||
## Running locally (dev) | ||
|
||
You can find the application on the following urls: | ||
### Requirements | ||
|
||
Before running, you'll need to have the following software installed on your machine: | ||
- java 21 | ||
- maven | ||
- docker | ||
- postgres (optional) | ||
- redis (optional) | ||
|
||
### Running | ||
|
||
If you don't want to install postgres and redis locally, you can just use `docker-compose-db-dev.yml` to run them via docker. To start db, just run the following: | ||
```bash | ||
docker-compose -f docker-compose-db-dev.yml up -d | ||
``` | ||
|
||
After db is up, run: | ||
```bash | ||
mvn clean install | ||
``` | ||
|
||
And then, you can start the API via terminal: | ||
```bash | ||
mvn spring-boot:run -Dspring-boot.run.profiles=dev | ||
``` | ||
|
||
Or just use intellij. Run config for intellij is already configured, so just start the `Application` config. | ||
|
||
## Running with docker | ||
|
||
### Requirements | ||
|
||
Before running, you'll need to have the following software installed on your machine: | ||
- docker | ||
|
||
### Running | ||
|
||
To start the API via docker you need to run: | ||
```bash | ||
docker-compose -f docker-compose-api-dev.yml up --build -d | ||
``` | ||
|
||
You can find the API on the following urls: | ||
|
||
- api: http://localhost:8080/v1/users | ||
- api-docs: http://localhost:8080/swagger-ui/index.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters