-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathentrypoint.sh
22 lines (20 loc) · 956 Bytes
/
entrypoint.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
set -e
export PATH=$PATH:'/minerva/'
if [ "$RUNTIME_TYPE" == "webapp" ]; then
echo "Start web application..."
exec java -XX:+UseSerialGC -XX:+UseContainerSupport -XX:MaxRAMPercentage=80 -jar webapp.jar
elif [ "$RUNTIME_TYPE" == "webapp-aot" ]; then
echo "Start web application..."
exec java -Dspring.aot.enabled=true -XX:+UseSerialGC -XX:+UseContainerSupport -XX:MaxRAMPercentage=80 -jar webapp.jar
elif [ "$RUNTIME_TYPE" == "setup" ]; then
echo "Start setup..."
exec ./mvnw -Dflyway.user=$DB_DEFAULT_USERNAME -Dflyway.password=$DB_DEFAULT_PASSWORD -Dflyway.schemas=public -Dflyway.url=jdbc:postgresql://$DB_DEFAULT_HOST:$DB_DEFAULT_PORT/$DB_DEFAULT_NAME -Dflyway.locations=classpath:db/migration flyway:migrate -pl core
elif [ "$RUNTIME_TYPE" == "test" ]; then
echo "Starting tests..."
export MAVEN_OPTS="-XX:MaxRAMPercentage=50"
exec ./mvnw test
else
echo "Executing command \"$*\""
exec "$@"
fi