kill `lsof -t -i:8080`
kill `lsof -t -i:8389`
nohup cd /opt/latest-api/ && java -jar -Dspring.profiles.active="prod" -Djava.ext.dirs="dependencies/" -Duser.timezone="GMT+08" -Dfile.encoding="UTF-8" api.jar 2>&1>api.log &
tail -fn 100 api.log
rsync -ravvvv ./build/libs/* root@47.96.0.0:/opt/latest-api/ && \
ssh root@47.96.225.0 "cd /opt/latest-api && ./run.sh"
bootJar {
baseName = 'api'
excludes = ["*.jar"]
}
task copyDependencies(type: Copy) {
from project.configurations.compileClasspath
into 'build/dependencies'
}