From 5bc55f75b220981906a392862f0b809b0c57e2be Mon Sep 17 00:00:00 2001 From: joffrey-bion Date: Thu, 28 Jan 2021 12:22:28 +0100 Subject: Attempt at fixing PORT substitution for heroku --- sw-server/Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sw-server') diff --git a/sw-server/Dockerfile b/sw-server/Dockerfile index 79b2c9c4..6d93473e 100644 --- a/sw-server/Dockerfile +++ b/sw-server/Dockerfile @@ -9,4 +9,6 @@ ENV PORT 80 ARG JAR_FILE=build/libs/sw-server.jar COPY ${JAR_FILE} app.jar -ENTRYPOINT ["sh", "-c", "java -Dserver.port=$PORT -jar /app.jar"] +# We need sh to perform the substitution of $PORT +# We cannot use ENTRYPOINT because Heroku escapes the $ in ENTRYPOINT, so CMD it is +CMD ["sh", "-c", "java -Dserver.port=$PORT -jar /app.jar"] -- cgit