add Dockerfile

This commit is contained in:
2024-08-30 00:37:02 +10:00
parent edd8415872
commit 53b70abba0
3 changed files with 22 additions and 1 deletions

14
script/entrypoint.sh Normal file
View File

@@ -0,0 +1,14 @@
#!/bin/sh
if test "${SPRING_PROFILES_ACTIVE}" != '';
then
echo "spring active profile is "$SPRING_PROFILES_ACTIVE
JAVA_OPTIONS="$JAVA_OPTIONS -Dspring.profiles.active=cloud,native,$SPRING_PROFILES_ACTIVE"
fi
if test "${LOCAL_DOCKER_ENV}" = 'true';
then
JAVA_OPTIONS="$JAVA_OPTIONS -Dspring.profiles.active=native"
fi
java $JAVA_OPTIONS -jar /app/app.jar