Skip to content

Commit 4238e27

Browse files
authored
Merge branch 'main' into feat/first-version
2 parents e4dc498 + 36390b8 commit 4238e27

File tree

4 files changed

+47
-5
lines changed

4 files changed

+47
-5
lines changed

.github/workflows/build.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths-ignore:
8+
- "**.md"
9+
10+
jobs:
11+
build:
12+
name: Build
13+
uses: soat-tech-challenge/github-workflows/.github/workflows/maven-bump-push-dockerhub.yml@main
14+
secrets: inherit
15+
with:
16+
dockerhub_username: ${{ vars.DOCKERHUB_USERNAME }}
17+
image_name: ${{ vars.DOCKER_IMAGE_NAME }}
18+
19+
deploy:
20+
name: Deploy
21+
needs: build
22+
uses: soat-tech-challenge/github-workflows/.github/workflows/redeploy-ecs-service.yml@main
23+
secrets: inherit
24+
with:
25+
aws_region: ${{ vars.DEFAULT_AWS_REGION }}
26+
cluster_name: ${{ vars.ECS_CLUSTER_NAME }}
27+
service_name: ${{ vars.ECS_SERVICE_NAME }}

.github/workflows/pull-request.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Pull Request
2+
3+
on:
4+
pull_request:
5+
workflow_dispatch:
6+
7+
jobs:
8+
build:
9+
name: Build
10+
uses: soat-tech-challenge/github-workflows/.github/workflows/maven-and-docker-build.yml@main
11+
secrets: inherit
12+
permissions:
13+
contents: read
14+
pull-requests: write

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22
FROM bellsoft/liberica-runtime-container:jre-17-slim-musl
33

44
# Creates and switches to non-root user
5-
ENV APP_USER=backend
5+
ENV APP_USER=app
66
# Busybox syntax, which is available in the image
77
RUN addgroup -S $APP_USER && adduser -D -g "" -G $APP_USER $APP_USER
8-
USER backend
8+
USER app
99

1010
# Copy .jar to container
11-
ARG JAR_FILE=target/app.jar
11+
ARG JAR_FILE=target/*.jar
1212
ENV APP_FOLDER=/opt/app
1313
WORKDIR $APP_FOLDER
1414
COPY $JAR_FILE app.jar
1515

1616
# Execute application
1717
ENTRYPOINT ["java", "-jar", "app.jar"]
1818

19-
EXPOSE 8080
19+
EXPOSE 8080

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
# service-payment
1+
# service-payment
2+
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=soat-tech-challenge_service-payment&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=soat-tech-challenge_service-payment) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=soat-tech-challenge_service-payment&metric=coverage)](https://sonarcloud.io/summary/new_code?id=soat-tech-challenge_service-payment) [![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=soat-tech-challenge_service-payment&metric=ncloc)](https://sonarcloud.io/summary/new_code?id=soat-tech-challenge_service-payment)

0 commit comments

Comments
 (0)