Skip to content

Commit

Permalink
trying with docker
Browse files Browse the repository at this point in the history
  • Loading branch information
MocStepan committed May 8, 2024
1 parent f7b6a93 commit e26c4bc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/docker/Dockerfile-backend
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ENV SPRING_PROFILES_ACTIVE=prod

WORKDIR /app

COPY ../../backend/build/libs/*.jar /app/backend.jar
COPY ../../backend/build/libs/backend-1.0.0.jar /app/backend.jar

EXPOSE 8080

Expand Down
16 changes: 12 additions & 4 deletions .github/workflows/deploy-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ jobs:
- name: Build backend and run tests with Gradle Wrapper
run: ./gradlew build

- name: create jar
run: ./gradlew bootJar

- name: login to docker hub
uses: docker/login-action@v1
with:
Expand All @@ -58,4 +55,15 @@ jobs:
context: .
file: .github/docker/Dockerfile-backend
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/backend:${{ env.DATE }}
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/backend:${{ env.DATE }}

- name: Build, Push and Release a Docker container to Heroku.
uses: gonuit/[email protected]
with:
email: ${{ secrets.HEROKU_EMAIL }}
heroku_api_key: ${{ secrets.HEROKU_API_KEY }}
heroku_app_name: ${{ secrets.HEROKU_BACKEND_NAME }}
dockerfile_directory: .github/docker
dockerfile_name: Dockerfile-backend
docker_options: "--no-cache"
process_type: web

0 comments on commit e26c4bc

Please sign in to comment.