Skip to content

Instantly share code, notes, and snippets.

@Thanajade
Forked from nik-sta/run_application.sh
Created July 5, 2022 06:27
Show Gist options
  • Save Thanajade/147e8d853236e02eadcb0770b4b52074 to your computer and use it in GitHub Desktop.
Save Thanajade/147e8d853236e02eadcb0770b4b52074 to your computer and use it in GitHub Desktop.
Production-ready Entrypoint Bash Script for layered Spring Boot Applications
#!/bin/sh
JAVA_OPTS="-Dfile.encoding=UTF-8 -Duser.timezone=UTC"
PORT="8080"
cd /srv/"$APP" || exit
/opt/java/bin/java $JAVA_OPTS org.springframework.boot.loader.JarLauncher --bind 0.0.0.0:$PORT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment