Skip to content

Commit

Permalink
Add service port variable to entrypoint.sh for Java and Node.JS
Browse files Browse the repository at this point in the history
Signed-off-by: Severin Neumann <[email protected]>
  • Loading branch information
svrnm committed Dec 30, 2024
1 parent a1fbb93 commit eae3c48
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/services/java/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash
echo java -jar "javanode-1.0-SNAPSHOT.jar" 8080
APP_CONFIG="$(</config.json)" java -jar "javanode-1.0-SNAPSHOT.jar" 8080
APP_SERVER_PORT=${APP_SERVER_PORT:-8080}
echo java -jar "javanode-1.0-SNAPSHOT.jar" "${APP_SERVER_PORT}"
APP_CONFIG="$(</config.json)" java -jar "javanode-1.0-SNAPSHOT.jar" "${APP_SERVER_PORT}"
6 changes: 3 additions & 3 deletions src/services/nodejs/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
echo "Running server on :8080"
APP_CONFIG="$(</config.json)" node index.js 8080
#fi
APP_SERVER_PORT=${APP_SERVER_PORT:-8080}
echo "Running server on :${APP_SERVER_PORT}"
APP_CONFIG="$(</config.json)" node index.js ${APP_SERVER_PORT}

0 comments on commit eae3c48

Please sign in to comment.