From c93bea7341cc2a05ecc2516a438408c8a0a4462c Mon Sep 17 00:00:00 2001 From: Vegard Smines Date: Tue, 5 Sep 2023 09:45:40 +0200 Subject: [PATCH] trying new copy path --- .github/workflows/main.yml | 19 ++++++++++--------- dockerfile | 12 ++++++++++++ example-app/dockerfile | 0 3 files changed, 22 insertions(+), 9 deletions(-) create mode 100644 dockerfile delete mode 100644 example-app/dockerfile diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ee0ff9b3..b381e1df 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -55,17 +55,18 @@ jobs: runs-on: ubuntu-latest needs: build steps: - - name: Checkout repository - uses: actions/checkout@v3 - - name: Download production-ready build files - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v2 with: name: example-app - - name: Deploy to Heroku - uses: akhileshns/heroku-deploy@v3.12.14 + - name: Build, Push and Release a Docker container to Heroku + uses: gonuit/heroku-docker-deploy@v1.3.3 with: - heroku_api_key: ${{secrets.HEROKU_API_KEY}} - heroku_app_name: "jobjugglerapi" - heroku_email: "vegardrsmines@gmail.com" + email: ${{ secrets.HEROKU_EMAIL }} + heroku_api_key: ${{ secrets.HEROKU_API_KEY }} + heroku_app_name: jobjugglerapi + dockerfile_directory: ./ + dockerfile_name: dockerfile + docker_options: "--no-cache" + process_type: web diff --git a/dockerfile b/dockerfile new file mode 100644 index 00000000..586c742c --- /dev/null +++ b/dockerfile @@ -0,0 +1,12 @@ +# Use the official OpenJDK base image +FROM openjdk:17-jdk-slim + +# Set the working directory inside the container +WORKDIR /app + +COPY ./*.jar /app/app.jar + +EXPOSE 8081 + +# Command to run the application +CMD ["java", "-jar", "/app/app.jar"] \ No newline at end of file diff --git a/example-app/dockerfile b/example-app/dockerfile deleted file mode 100644 index e69de29b..00000000