diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6fa22a7 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM openjdk:14-jdk as builder +MAINTAINER William Brawner + +RUN mkdir -p /home/gradle +COPY . /home/gradle/src +WORKDIR /home/gradle/src +RUN /home/gradle/src/gradlew --console=plain --no-daemon server:bootJar + +FROM openjdk:14-jdk-slim +EXPOSE 8080 +COPY --from=builder /home/gradle/src/server/build/libs/flayre-server.jar flayre-server.jar +CMD /usr/local/openjdk-14/bin/java $JVM_ARGS -jar /flayre-server.jar diff --git a/captain-definition b/captain-definition new file mode 100644 index 0000000..17db556 --- /dev/null +++ b/captain-definition @@ -0,0 +1,4 @@ + { + "schemaVersion": 2, + "dockerfilePath": "./Dockerfile" + } diff --git a/server/build.gradle b/server/build.gradle index de94eb5..bdd7c90 100644 --- a/server/build.gradle +++ b/server/build.gradle @@ -10,6 +10,10 @@ repositories { mavenCentral() } +bootJar { + archiveFileName = "flayre-server.${archiveExtension.get()}" +} + dependencies { implementation project(':shared') implementation 'org.springframework.boot:spring-boot-starter-data-jdbc'