Skip to content

Commit b00d574

Browse files
Bookstore webapp (sivaprasadreddy#10)
* Add BookStore WebApp
1 parent 925d779 commit b00d574

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1659
-0
lines changed
+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: BookStore Webapp
2+
3+
on:
4+
push:
5+
paths:
6+
- bookstore-webapp/**
7+
branches:
8+
- '**'
9+
10+
jobs:
11+
build:
12+
name: Build
13+
runs-on: ubuntu-latest
14+
env:
15+
working-directory: ./bookstore-webapp
16+
DOCKER_IMAGE_NAME: ${{ secrets.DOCKERHUB_USERNAME }}/bookstore-webapp
17+
defaults:
18+
run:
19+
working-directory: ${{ env.working-directory }}
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Setup Java 21
24+
uses: actions/setup-java@v4
25+
with:
26+
java-version: '21'
27+
distribution: 'temurin'
28+
cache: 'maven'
29+
30+
- name: Build with Maven
31+
run: ./mvnw -ntp verify
32+
33+
- name: Login to Docker Hub
34+
uses: docker/login-action@v3
35+
with:
36+
username: ${{ secrets.DOCKERHUB_USERNAME }}
37+
password: ${{ secrets.DOCKERHUB_TOKEN }}
38+
39+
- name: Build and Publish Docker Image
40+
run: |
41+
./mvnw spring-boot:build-image -DskipTests
42+
echo "Pushing the image $DOCKER_IMAGE_NAME to Docker Hub..."
43+
docker push $DOCKER_IMAGE_NAME

Taskfile.yml

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ tasks:
2727
- "{{.MVNW}} -pl order-service spring-boot:build-image -DskipTests"
2828
- "{{.MVNW}} -pl notification-service spring-boot:build-image -DskipTests"
2929
- "{{.MVNW}} -pl api-gateway spring-boot:build-image -DskipTests"
30+
- "{{.MVNW}} -pl bookstore-webapp spring-boot:build-image -DskipTests"
3031

3132
start_infra:
3233
cmds:

api-gateway/src/main/resources/application.yml

+2
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ spring:
4141
- Path=/v3/api-docs/**
4242
filters:
4343
- RewritePath=/v3/api-docs/?(?<segment>.*), /${segment}/v3/api-docs
44+
default-filters:
45+
- DedupeResponseHeader=Access-Control-Allow-Origin Access-Control-Allow-Methods Access-Control-Allow-Headers RETAIN_FIRST
4446

4547
mvc:
4648
problemdetails:

bookstore-webapp/.gitignore

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
HELP.md
2+
target/
3+
!.mvn/wrapper/maven-wrapper.jar
4+
!**/src/main/**/target/
5+
!**/src/test/**/target/
6+
7+
### STS ###
8+
.apt_generated
9+
.classpath
10+
.factorypath
11+
.project
12+
.settings
13+
.springBeans
14+
.sts4-cache
15+
16+
### IntelliJ IDEA ###
17+
.idea
18+
*.iws
19+
*.iml
20+
*.ipr
21+
22+
### NetBeans ###
23+
/nbproject/private/
24+
/nbbuild/
25+
/dist/
26+
/nbdist/
27+
/.nb-gradle/
28+
build/
29+
!**/src/main/**/build/
30+
!**/src/test/**/build/
31+
32+
### VS Code ###
33+
.vscode/
61.1 KB
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.5/apache-maven-3.9.5-bin.zip
2+
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar

0 commit comments

Comments
 (0)