Add kimai2
This commit is contained in:
parent
9b0ca7ae1c
commit
bd265145d3
|
@ -0,0 +1,36 @@
|
|||
#### roundcubemail
|
||||
|
||||
##### Information
|
||||
Site : https://www.kimai.org/
|
||||
|
||||
Source : https://github.com/kevinpapst/kimai2.git
|
||||
|
||||
##### Install
|
||||
|
||||
```bash
|
||||
apt install -y wget ca-certificates
|
||||
wget -qO - https://deb.lgy.fr/install.sh | bash
|
||||
apt-get update
|
||||
apt install kimai2
|
||||
|
||||
# sample configuration for apache2 + vhost
|
||||
|
||||
cp /usr/share/doc/kimai2/apache2-kimai2.conf /etc/apache2/sites-available/kimai2.conf
|
||||
a2ensite kimai2
|
||||
|
||||
# edit /etc/apache2/sites-available/kimai2.conf
|
||||
# edit /etc/kimai2.conf
|
||||
|
||||
systemctl restart apache2
|
||||
```
|
||||
|
||||
##### Configuration
|
||||
|
||||
Create database sample
|
||||
|
||||
```SQL
|
||||
create user kimai2@localhost identified by 'password';
|
||||
create database IF NOT EXISTS kimai2;
|
||||
grant all privileges on kimai2.* to kimai2@localhost;
|
||||
|
||||
```
|
|
@ -0,0 +1,42 @@
|
|||
#!/bin/bash
|
||||
|
||||
VERSION=1.26.0
|
||||
APP=kimai2
|
||||
DEPOT=https://github.com/kevinpapst/kimai2.git
|
||||
GIT_VERSION=${VERSION}
|
||||
DEB_VERSION=${VERSION}-$(date +%Y%m%d%H%M)
|
||||
DEBIAN_VERSION_CODENAME=bullseye
|
||||
IMAGE_SIZE=2
|
||||
PACKAGE_DEPENDENCY="composer php-zip php-gd php-intl php-xsl"
|
||||
|
||||
STEP="base_package_upgrade install_package_dependency default_prebuild build makedeb"
|
||||
|
||||
build() {
|
||||
cd /tmp/${APP}
|
||||
composer install --no-dev --optimize-autoloader -n
|
||||
rm -fr var/cache/*
|
||||
rm -fr .env.dist .editorconfig .git* .php-cs-fixer.dist.php phpunit.xml.dist
|
||||
}
|
||||
|
||||
makedeb(){
|
||||
PATH_DEB=/tmp/src/rootfs
|
||||
|
||||
mkdir -p ${PATH_DEB}/usr/share/${APP}/
|
||||
cp -fr /tmp/${APP}/. ${PATH_DEB}/usr/share/${APP}/
|
||||
|
||||
mkdir -p ${PATH_DEB}/etc/
|
||||
mv ${PATH_DEB}/usr/share/${APP}/.env ${PATH_DEB}/etc/${APP}.conf
|
||||
ln -s /etc/${APP}.conf ${PATH_DEB}/usr/share/${APP}/.env
|
||||
|
||||
mkdir -p ${PATH_DEB}/usr/share/doc/${APP}/
|
||||
mv ${PATH_DEB}/usr/share/${APP}/{CHANGELOG.md,CONTRIBUTING.md,LICENSE,README.md,SECURITY.md,UPGRADING.md} ${PATH_DEB}/usr/share/doc/${APP}/
|
||||
|
||||
mkdir -p ${PATH_DEB}/var/lib/
|
||||
mv ${PATH_DEB}/usr/share/${APP}/var ${PATH_DEB}/var/lib/${APP}
|
||||
ln -s /var/lib/${APP} ${PATH_DEB}/usr/share/${APP}/var
|
||||
|
||||
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
|
||||
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1 @@
|
|||
/etc/kimai2.conf
|
|
@ -0,0 +1,8 @@
|
|||
Package: kimai2
|
||||
Version: %VERSION%
|
||||
Section: base
|
||||
Priority: optional
|
||||
Architecture: all
|
||||
Depends: php (>= 7.4), php-gd, php-intl, php-json, php-mbstring, php-pdo, php-xsl, php-zip
|
||||
Maintainer: Thomas Legay <thomas@lgy.fr>
|
||||
Description: kimai2
|
|
@ -0,0 +1,2 @@
|
|||
#!/bin/bash
|
||||
chown -R www-data:www-data /var/lib/kimai2/
|
|
@ -0,0 +1,23 @@
|
|||
<VirtualHost *:80>
|
||||
servername kimai2.domain.com
|
||||
ServerAdmin admin@domain.com
|
||||
|
||||
DocumentRoot /usr/share/kimai2/public/
|
||||
Protocols h2c http/1.1
|
||||
|
||||
<directory /usr/share/kimai2/public/>
|
||||
AllowOverride All
|
||||
FallbackResource /index.php
|
||||
Require all granted
|
||||
</directory>
|
||||
<directory /usr/share/kimai2/>
|
||||
Options FollowSymLinks
|
||||
</directory>
|
||||
<Directory /usr/share/kimai2/public/bundles>
|
||||
FallbackResource disabled
|
||||
</Directory>
|
||||
# optionally set the value of the environment variables used in the application
|
||||
#SetEnv APP_ENV prod
|
||||
#SetEnv APP_SECRET IgJojTydTefdyllIpbebhalRebninas1
|
||||
#SetEnv DATABASE_URL "mysql://kimai2:password@localhost/kimai2"
|
||||
</VirtualHost>
|
Loading…
Reference in New Issue