Skip to content

Commit 4260aea

Browse files
authored
Merge pull request #3 from hhu-propra2/heroku
Add heroku deployment
2 parents 9aef864 + 86fe9ae commit 4260aea

File tree

5 files changed

+39
-2
lines changed

5 files changed

+39
-2
lines changed

.dockerignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules/
2+
.git/
3+
.gradle/
4+
.idea/

.github/workflows/build.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
name: Build and Test Application
22

3-
on: [push, pull_request]
4-
53
on:
64
push:
75
branches:

.github/workflows/heroku.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Heroku Deployment
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/setup-java@v1
14+
with:
15+
java-version: '11'
16+
- name: Build JAR
17+
run: gradle bootJar
18+
- name: Login to Heroku Container registry
19+
env:
20+
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
21+
run: heroku container:login
22+
- name: Build and push
23+
env:
24+
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
25+
run: heroku container:push -a mopsstyle web
26+
- name: Release
27+
env:
28+
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
29+
run: heroku container:release -a mopsstyle web

Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM openjdk:11-jre-slim
2+
3+
COPY build/libs/*.jar app/app.jar
4+
5+
CMD java -jar app/app.jar
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
server.port=${PORT:8080}

0 commit comments

Comments
 (0)