From e986f48013bcdba77bef3e215c70e2d98d5b6c97 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 | 25 ++++++++++++++++--------- dockerfile | 16 ++++++++++++++++ example-app/dockerfile | 0 3 files changed, 32 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..166b3c71 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -55,17 +55,24 @@ 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: print ls + run: ls -la + + - name: print ls + run: ls -la example-app + + - 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..40a34c07 --- /dev/null +++ b/dockerfile @@ -0,0 +1,16 @@ +# Use the official OpenJDK base image +FROM openjdk:17-jdk-slim + +# Set the working directory inside the container +WORKDIR /app + +RUN ls -al /app +COPY ./*.md /app/RD.md +COPY ./example-app-main-SNAPSHOT.jar /app/app.jar + +RUN ls -al /app + +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