summaryrefslogtreecommitdiff
path: root/sw-server
diff options
context:
space:
mode:
authorjoffrey-bion <joffrey.bion@gmail.com>2020-12-12 21:30:29 +0100
committerjoffrey-bion <joffrey.bion@gmail.com>2020-12-12 22:05:35 +0100
commit0967c8d72c2b373baf3600930c48eb020699f7e2 (patch)
treefa21f251a5935bea6796d6437440fc245fd8756a /sw-server
parentCleanup helper method in sw-client (diff)
downloadseven-wonders-0967c8d72c2b373baf3600930c48eb020699f7e2.tar.gz
seven-wonders-0967c8d72c2b373baf3600930c48eb020699f7e2.tar.bz2
seven-wonders-0967c8d72c2b373baf3600930c48eb020699f7e2.zip
Push Docker image to Heroku, remove Travis CI
Diffstat (limited to 'sw-server')
-rw-r--r--sw-server/Dockerfile6
1 files changed, 5 insertions, 1 deletions
diff --git a/sw-server/Dockerfile b/sw-server/Dockerfile
index 7c372052..740c2514 100644
--- a/sw-server/Dockerfile
+++ b/sw-server/Dockerfile
@@ -2,7 +2,11 @@ FROM openjdk:11-jre
EXPOSE 80
+# Heroku uses the PORT environment variable, it ignores EXPOSE.
+# This also allows to specify a custom port when running the container even outside of Heroku.
+ENV PORT 80
+
ARG JAR_FILE=build/libs/sw-server.jar
COPY ${JAR_FILE} app.jar
-ENTRYPOINT ["java", "-Dserver.port=80", "-jar", "/app.jar"]
+ENTRYPOINT ["java", "-Dserver.port=$PORT", "-jar", "/app.jar"]
bgstack15