[R10] Add docker workflow
This commit is contained in:
parent
b9706a4a64
commit
0b053a99c6
13
.github/workflows/maven.yml
vendored
13
.github/workflows/maven.yml
vendored
@ -28,4 +28,15 @@ jobs:
|
|||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
cache: maven
|
cache: maven
|
||||||
- name: Build with Maven
|
- name: Build with Maven
|
||||||
run: mvn -B package -DJWT_SECRET=${{ secrets.JWT_SECRET }} --file pom.xml
|
run: mvn -B package -Dspring.profiles.active=test -DJWT_SECRET=${{ secrets.JWT_SECRET }} --file pom.xml
|
||||||
|
|
||||||
|
|
||||||
|
- name: Build & push Docker image
|
||||||
|
uses: mr-smithers-excellent/docker-build-push@v5
|
||||||
|
with:
|
||||||
|
image: mbgama/hospital-management-api
|
||||||
|
tags: latest
|
||||||
|
registry: docker.io
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|||||||
4
Dockerfile
Normal file
4
Dockerfile
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
FROM eclipse-temurin:17-jdk-alpine
|
||||||
|
VOLUME /tmp
|
||||||
|
COPY target/*.jar /app/hospital-management-api.jar
|
||||||
|
ENTRYPOINT ["java", "-jar","/app/hospital-management-api.jar"]
|
||||||
Loading…
x
Reference in New Issue
Block a user