diff options
author | Joffrey Bion <joffrey.bion@booking.com> | 2020-05-24 20:49:46 +0200 |
---|---|---|
committer | Joffrey Bion <joffrey.bion@booking.com> | 2020-05-24 20:49:46 +0200 |
commit | 8ae175b316afbd5c61fe49752030c429c57cdfee (patch) | |
tree | ea96cd2e8809a584712707c7a6adf31db735f477 | |
parent | Further simplify injection (diff) | |
download | seven-wonders-8ae175b316afbd5c61fe49752030c429c57cdfee.tar.gz seven-wonders-8ae175b316afbd5c61fe49752030c429c57cdfee.tar.bz2 seven-wonders-8ae175b316afbd5c61fe49752030c429c57cdfee.zip |
Dockerize server
-rw-r--r-- | .github/workflows/ci.yml | 18 | ||||
-rw-r--r-- | sw-server/Dockerfile | 8 |
2 files changed, 18 insertions, 8 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 951e3acd..ad557285 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,11 +32,13 @@ jobs: - name: Build with Gradle run: ./gradlew build -# When Travis CI doesn't publish on tags anymore: - -# publish: -# needs: build -# if: startsWith(github.ref, 'refs/tags/') -# steps: -# - name: Publish to Bintray -# run: ./gradlew bintrayUpload + - name: Docker push + uses: docker/build-push-action@v1 + with: + path: ./sw-server + username: ${{ github.actor }} + password: ${{ github.token }} + registry: docker.pkg.github.com + repository: hildan/seven-wonders/sw-server + tag_with_ref: true + tag_with_sha: true diff --git a/sw-server/Dockerfile b/sw-server/Dockerfile new file mode 100644 index 00000000..226227b9 --- /dev/null +++ b/sw-server/Dockerfile @@ -0,0 +1,8 @@ +FROM openjdk:11-jre + +EXPOSE 8090 + +ARG JAR_FILE=build/libs/sw-server.jar +COPY ${JAR_FILE} app.jar + +ENTRYPOINT ["java", "-Dserver.port=8090", "-jar", "/app.jar"] |