-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 20 product variants support add product service and documentation
- Loading branch information
1 parent
4305469
commit fd6f56e
Showing
9 changed files
with
148 additions
and
20 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: publish service-subscribe | ||
on: | ||
push: | ||
branches: ['dev'] | ||
paths: ['service-subscribe/**'] | ||
|
||
jobs: | ||
test_build: | ||
runs-on: self-hosted | ||
defaults: | ||
run: | ||
working-directory: service-subscribe | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: dev | ||
- name: Make gradlew executable | ||
run: chmod +x ./gradlew | ||
- name: Execute Gradle build | ||
run: ./gradlew build | ||
|
||
docker: | ||
needs: test_build | ||
name: build docker image service-subscribe | ||
runs-on: self-hosted | ||
defaults: | ||
run: | ||
working-directory: service-subscribe | ||
steps: | ||
- name: checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: dev | ||
|
||
- name: Make gradlew executable | ||
run: | | ||
chmod +x ./gradlew | ||
- name: Execute Gradle bootBuildImage | ||
run: ./gradlew bootBuildImage | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Push Docker image to Docker Hub | ||
run: docker push serhiibabanov/service-subscribe:latest |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Pottery API | ||
|
||
This is the API for the Pottery Store project. It's built with Java, Spring Boot, Kotlin, Gradle, and SQL. | ||
|
||
## Services | ||
|
||
The project consists of several services: | ||
|
||
- `service-products`: Handles all operations related to products. | ||
- `docs`: Handles the generation and serving of documentation. | ||
|
||
## Running the Project | ||
|
||
To run the project, use the following command: | ||
|
||
```bash | ||
docker compose up -d | ||
``` | ||
This will start all the services. You can access the API through the backend-gateway service at http://localhost:8080. | ||
|
||
Documentation | ||
The API documentation is generated using Spring REST Docs and served by the docs service. You can access it at http://localhost:8080/docs/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
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
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,3 +1,5 @@ | ||
CREATE ROLE service_products WITH LOGIN PASSWORD 'srv-pds'; | ||
CREATE ROLE service_subscribe WITH LOGIN PASSWORD 'srv-sbs'; | ||
|
||
CREATE SCHEMA service_products AUTHORIZATION service_products; | ||
CREATE SCHEMA service_subscribe AUTHORIZATION service_subscribe; |
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
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
[[subscription]] | ||
= Subscription | ||
|
||
[[subscription-index-create]] | ||
== Subscribing users | ||
|
||
A `POST` request is used to subscribe a user to the newsletter | ||
|
||
=== Request structure | ||
|
||
include::{snippets}/subscribe/http-request.adoc[] | ||
|
||
=== Request parameters | ||
|
||
include::{snippets}/subscribe/query-parameters.adoc[] | ||
|
||
=== Example http response | ||
|
||
include::{snippets}/subscribe/http-response.adoc[] | ||
|
||
=== CURL request | ||
|
||
include::{snippets}/subscribe/curl-request.adoc[] | ||
|
||
[[subscription-index-unsubscribe]] | ||
== Unsubscribing users | ||
|
||
A `POST` request is used to unsubscribe a user from the newsletter | ||
|
||
=== Request structure | ||
|
||
include::{snippets}/unsubscribe/http-request.adoc[] | ||
|
||
=== Request parameters | ||
|
||
include::{snippets}/unsubscribe/query-parameters.adoc[] | ||
|
||
=== Example http response | ||
|
||
include::{snippets}/unsubscribe/http-response.adoc[] | ||
|
||
=== CURL request | ||
|
||
include::{snippets}/unsubscribe/curl-request.adoc[] |