war deployment preparations
This commit is contained in:
@ -67,6 +67,7 @@ war {
|
||||
}
|
||||
baseName = project.name
|
||||
version = version
|
||||
archiveName = 'timetrack.war'
|
||||
}
|
||||
|
||||
test {
|
||||
|
20
debian/build.sh
vendored
20
debian/build.sh
vendored
@ -1,20 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
mkdir -p timetrack/var/lib
|
||||
|
||||
cd ..
|
||||
./gradlew clean build
|
||||
|
||||
G=$(grep "^version =" build.gradle | sed -e "s/version = //g" | sed -e "s/'//g")
|
||||
|
||||
echo "found version $G"
|
||||
|
||||
cp -v build/libs/timetrack-$G.jar debian/timetrack/var/lib/timetrack.jar
|
||||
|
||||
cd debian
|
||||
|
||||
sed -i timetrack/DEBIAN/control -e "s/Version: */Version: $G/"
|
||||
|
||||
V=$(grep "Version" timetrack/DEBIAN/control | sed -e "s/Version: //g")
|
||||
|
||||
fakeroot dpkg -b timetrack timetrack_$V.deb
|
1
debian/timetrack/DEBIAN/conffiles
vendored
1
debian/timetrack/DEBIAN/conffiles
vendored
@ -1 +0,0 @@
|
||||
/etc/timetrack.properties
|
9
debian/timetrack/DEBIAN/control
vendored
9
debian/timetrack/DEBIAN/control
vendored
@ -1,9 +0,0 @@
|
||||
Package: timetrack
|
||||
Version:
|
||||
Architecture: amd64
|
||||
Maintainer: Jörg Henke <jottyfan@gmx.de>
|
||||
Depends: default-jdk
|
||||
Section: ship
|
||||
Priority: optional
|
||||
Description: timetrack application to track work times
|
||||
Timetrack is a web application to track my work times for my daily reporting.
|
24
debian/timetrack/DEBIAN/postinst
vendored
24
debian/timetrack/DEBIAN/postinst
vendored
@ -1,24 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
mkdir -p /var/run/timetrack
|
||||
groupadd timetrack || true
|
||||
useradd -r -g timetrack -d /etc/timetrack -s /sbin/nologin timetrack || true
|
||||
chown timetrack:timetrack -R /etc/timetrack* || true
|
||||
chown timetrack:timetrack -R /var/run/timetrack || true
|
||||
chown timetrack:timetrack /usr/bin/timetrack || true
|
||||
cd /var/lib
|
||||
|
||||
systemctl daemon-reload || true
|
||||
R=$(systemctl show -p SubState --value timetrack)
|
||||
|
||||
if [ "running" == "$R" ]
|
||||
then
|
||||
systemctl restart timetrack || true
|
||||
systemctl reload apache2 || true
|
||||
else
|
||||
systemctl enable timetrack || true
|
||||
echo "+------------------------------------------------------------------------------+"
|
||||
echo "| configure timetrack in /etc/timetrack.properties; consider a port change... |"
|
||||
echo "| start timetrack by calling sudo systemctl restart timetrack |"
|
||||
echo "+------------------------------------------------------------------------------+"
|
||||
fi
|
@ -1,14 +0,0 @@
|
||||
[Unit]
|
||||
Description=Timetrack
|
||||
After=syslog.target network.target
|
||||
Before=httpd.service
|
||||
|
||||
[Service]
|
||||
User=timetrack
|
||||
Group=timetrack
|
||||
PIDFile=/var/run/timetrack/timetrack.pid
|
||||
ExecStart=/usr/bin/timetrack
|
||||
StandardOutput=null
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
21
debian/timetrack/etc/timetrack.properties
vendored
21
debian/timetrack/etc/timetrack.properties
vendored
@ -1,21 +0,0 @@
|
||||
# jooq
|
||||
spring.datasource.driver-class-name=org.postgresql.Driver
|
||||
spring.datasource.url=jdbc:postgresql://localhost:5432/timetrack
|
||||
spring.datasource.username=timetrack
|
||||
spring.datasource.password=timetrack
|
||||
|
||||
# application
|
||||
server.port = 8083
|
||||
|
||||
server.servlet.context-path=/timetrack
|
||||
|
||||
# keycloak
|
||||
keycloak.auth-server-url = http://localhost:8080/
|
||||
keycloak.realm = jottyfan
|
||||
keycloak.resource = timetrack
|
||||
keycloak.public-client = true
|
||||
keycloak.security-constraints[0].authRoles[0] = timetrack_user
|
||||
keycloak.security-constraints[0].securityCollections[0].patterns[0] = /*
|
||||
#keycloak.credentia
|
||||
keycloak.use-resource-role-mappings=true
|
||||
#keycloak.bearer-only=true
|
3
debian/timetrack/usr/bin/timetrack
vendored
3
debian/timetrack/usr/bin/timetrack
vendored
@ -1,3 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
java -Dspring.config.location=/etc/timetrack.properties -jar /var/lib/timetrack.jar
|
Reference in New Issue
Block a user