Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
9db246f
add support for downloading gRPC stubs from remote Nexus repository (#1)
pawlowiczf Aug 20, 2025
c3e2c27
Create workflows to validate, build and push service to remote GCP re…
pawlowiczf Aug 25, 2025
2245b4a
Add jwt token generation
ariemic Sep 22, 2025
03532ff
Add posgres db setup
ariemic Sep 23, 2025
4bbe47d
add, refactor docker, docker compose files
pawlowiczf Sep 24, 2025
6b90510
Merge pull request #4 from ecmsp-project/add-gateway-service-support-…
ariemic Sep 24, 2025
d8cb49f
Add flyway for migrations
ariemic Sep 23, 2025
ec7e9b9
Merge branch 'development' into feature/add-jwt-token
ariemic Sep 24, 2025
94f079d
Update readme
ariemic Sep 24, 2025
aa5fab2
Merge pull request #3 from ecmsp-project/feature/add-jwt-token
ariemic Sep 24, 2025
ecb5bc0
Add Jwt token generation test
ariemic Sep 28, 2025
526b577
Update readme
ariemic Sep 28, 2025
72f5114
Remove debug printing
ariemic Sep 28, 2025
78c61e8
Merge pull request #5 from ecmsp-project/test/jwt
ariemic Sep 28, 2025
5de765d
update db port
ariemic Sep 29, 2025
5498cb7
Merge pull request #6 from ecmsp-project/config/rename-db-ports
ariemic Sep 29, 2025
2abe476
fix db tests
ariemic Oct 2, 2025
ca4954f
add roles and permissions
Vemtor Oct 2, 2025
f9def4f
fix tests
ariemic Oct 5, 2025
08b8491
Merge pull request #7 from ecmsp-project/fix/test-db
ariemic Oct 5, 2025
363f6e0
add example data
ariemic Oct 16, 2025
2d9107a
add readme.md for macos users
Vemtor Oct 22, 2025
aabf3ec
Merge pull request #10 from ecmsp-project/add-readme-for-macos-users
Vemtor Oct 22, 2025
069aa85
add roles and permissions management to user service
Vemtor Nov 8, 2025
4e9cab2
Merge remote-tracking branch 'origin/development' into orlowskiwojcie…
Vemtor Nov 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
CART_SERVICE_PORT=8100
CART_SERVICE_DB_PORT=9100

PAYMENT_SERVICE_PORT=8200
PAYMENT_SERVICE_DB_PORT=9200

ORDER_SERVICE_PORT=8300
ORDER_SERVICE_DB_PORT=9300

PRODUCT_SERVICE_PORT=8400
PRODUCT_SERVICE_DB_PORT=9400

USER_SERVICE_PORT=8500
USER_SERVICE_DB_PORT=9500

GATEWAY_SERVICE_PORT=8600

#######################################

# intentionally left blank (it is automatically set to 'compose' profile)
PAYMENT_SERVICE_SPRING_PROFILES_ACTIVE=
ORDER_SERVICE_SPRING_PROFILES_ACTIVE=
PRODUCT_SERVICE_SPRING_PROFILES_ACTIVE=
CART_SERVICE_SPRING_PROFILES_ACTIVE=
USER_SERVICE_SPRING_PROFILES_ACTIVE=
GATEWAY_SERVICE_SPRING_PROFILES_ACTIVE=

#######################################

COMPOSE_PROFILES=payment-service,order-service,cart-service,product-service,gateway-service,kafka

68 changes: 68 additions & 0 deletions .github/workflows/build-java-push-gcp-registry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Build and deploy Docker images to GCP Artifact Registry

on:
push:
branches:
- main
workflow_dispatch:

env:
GCP_REGISTRY: ${{ secrets.ECMSP_GCP_ARTIFACT_REGISTRY }}
IMAGE_TAG: ${{ github.sha }}
IMAGE_NAME: ${{ github.event.repository.name }}

jobs:
build_deploy:
runs-on: ubuntu-latest

steps:
-
name: Check out code
uses: actions/checkout@v3

-
name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
cache: 'maven'

-
name: Update Maven snapshots
run: mvn -U dependency:resolve

-
name: Authenticate to Google Cloud
uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.ECMSP_REGISTRY_PUSHER_GCP_SA_KEY }}

-
name: Setup gcloud CLI
uses: google-github-actions/setup-gcloud@v2
with:
version: "latest"
project_id: ecmsp

-
name: Install gcloud auth
run: gcloud components install gke-gcloud-auth-plugin

-
name: Configure Docker for Artifact Registry
run: gcloud auth configure-docker europe-west1-docker.pkg.dev

-
name: Build, tag, and push backend Docker image to GCP Artifact Registry
run: |
docker build \
-t $GCP_REGISTRY/$IMAGE_NAME:$IMAGE_TAG \
-t $GCP_REGISTRY/$IMAGE_NAME:latest \
-f ./Dockerfile .

docker push $GCP_REGISTRY/$IMAGE_NAME:$IMAGE_TAG
docker push $GCP_REGISTRY/$IMAGE_NAME:latest



45 changes: 45 additions & 0 deletions .github/workflows/build-test-java-project.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Build and test Java project

on:
pull_request:
workflow_dispatch:

jobs:
build_test:
runs-on: ubuntu-latest
steps:
-
name: Checkout repository
uses: actions/checkout@v2

-
name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
cache: 'maven'

-
name: Run tests with Maven
run: mvn clean test -U

# -
# name: Build Docker image for Trivy
# if: github.event_name == 'push' && (github.event.pull_request.base.ref == 'test' || github.event.pull_request.base.ref == 'development')
# run: |
# docker build \
# -t service:latest \
# -f ./Dockerfile .
#
# -
# name: Run Trivy vulnerability scanner
# if: github.event_name == 'push' && (github.event.pull_request.base.ref == 'test' || github.event.pull_request.base.ref == 'development')
# uses: aquasecurity/trivy-action@0.28.0
# with:
# image-ref: "service:latest"
# format: table
# exit-code: 1
# ignore-unfixed: true
# vuln-type: os,library
# severity: CRITICAL,HIGH
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ target/
.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/

**/src/main/resources/local/secrets
### STS ###
.apt_generated
.classpath
Expand Down
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM maven:3.9-eclipse-temurin-21 AS builder
WORKDIR /app
COPY pom.xml .
COPY src ./src
RUN mvn clean package

FROM eclipse-temurin:21-jdk AS runtime
WORKDIR /app

COPY --from=builder /app/target/*.jar ./app.jar
CMD ["java", "-jar", "app.jar"]
Loading