add metabase

This commit is contained in:
thomas 2022-03-01 23:49:53 +01:00
parent f698726065
commit 5558b7a679
8 changed files with 86 additions and 1 deletions

View File

@ -13,6 +13,14 @@ debmaker_run
``` ```
This commande create joplin and joplin-server packages This commande create joplin and joplin-server packages
### Debug
To enter in temporary filesystem
```bash
debmaker_chroot cache/joplin
```
### packages available in shared repository ### packages available in shared repository
- [adguardhome](#adguardhome) ([site](https://adguard.com/fr/adguard-home/overview.html)) - [adguardhome](#adguardhome) ([site](https://adguard.com/fr/adguard-home/overview.html))
@ -20,9 +28,10 @@ This commande create joplin and joplin-server packages
- [element-web](#element-web) ([site](https://element.io/)) - [element-web](#element-web) ([site](https://element.io/))
- [gotify](#gotify) ([site](https://gotify.net/)) - [gotify](#gotify) ([site](https://gotify.net/))
- [grocy](#grocy) ([site](https://grocy.info/)) - [grocy](#grocy) ([site](https://grocy.info/))
- [joplin](#joplin) desktop ([site](https://joplinapp.org/)) - [joplin desktop](#joplin) ([site](https://joplinapp.org/))
- [joplin-server](#joplin-server) ([site](https://joplinapp.org/)) - [joplin-server](#joplin-server) ([site](https://joplinapp.org/))
- [mautrix-syncproxy and mautrix-wsproxy](#mautrix-syncproxy-and-mautrix-wsproxy) ([site](https://docs.mau.fi/bridges/go/imessage/android/setup.html)) - [mautrix-syncproxy and mautrix-wsproxy](#mautrix-syncproxy-and-mautrix-wsproxy) ([site](https://docs.mau.fi/bridges/go/imessage/android/setup.html))
- [metabase](#metabase) ([site](https://www.metabase.com/))
- [rss-bridge](#rss-bridge) ([site](https://github.com/rss-bridge/rss-bridge)) - [rss-bridge](#rss-bridge) ([site](https://github.com/rss-bridge/rss-bridge))
- [tt-rss](#tt-rss) ([site](https://tt-rss.org/)) - [tt-rss](#tt-rss) ([site](https://tt-rss.org/))
- [vaultwarden and vaultwarden-web](#vaultwarden-and-vaultwarden-web) ([site](https://github.com/dani-garcia/vaultwarden)) - [vaultwarden and vaultwarden-web](#vaultwarden-and-vaultwarden-web) ([site](https://github.com/dani-garcia/vaultwarden))
@ -137,6 +146,16 @@ apt-get install -y mautrix-syncproxy mautrix-wsproxy
systemctl enable --now mautrix-wsproxy mautrix-syncproxy systemctl enable --now mautrix-wsproxy mautrix-syncproxy
``` ```
#### metabase
```bash
apt install -y python wget ca-certificates
wget -qO - https://deb.lgy.fr/install.sh | bash
apt-get update
apt-get install -y metabase openjdk-17-jre
systemctl enable --now metabase
```
#### rss-bridge #### rss-bridge

40
ressources/metabase/metabase Executable file
View File

@ -0,0 +1,40 @@
#!/bin/bash
[ -e ./lib/function.sh ] && source ./lib/function.sh
APP=metabase
VERSION=0.42.2
GIT_VERSION=v$VERSION
DEB_VERSION=$VERSION-1
DEBIAN_VERSION_CODENAME=bullseye
IMAGE_SIZE=10
STEP="envinit prebuild build makedeb"
envinit() {
apt install -y --no-install-recommends build-essential git wget ca-certificates dpkg fakeroot openjdk-17-jdk curl
wget -qO - https://deb.nodesource.com/setup_16.x | bash
wget -qO - https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor > /usr/share/keyrings/yarnkey.gpg
echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" > /etc/apt/sources.list.d/yarn.list
apt-get update
apt-get install -y nodejs yarn
curl https://download.clojure.org/install/linux-install-1.10.3.1087.sh | bash
}
prebuild(){
git clone --depth 1 -b ${GIT_VERSION} https://github.com/metabase/metabase.git /tmp/metabase
}
build() {
cd /tmp/metabase/
PATH=$PATH:/usr/local/bin
./bin/build
}
makedeb(){
PATH_DEB=/tmp/src/rootfs
cp /tmp/metabase/target/uberjar/metabase.jar ${PATH_DEB}/usr/share/metabase/
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
}

View File

@ -0,0 +1,7 @@
Package: metabase
Version: %VERSION%
Section: base
Priority: optional
Architecture: all
Maintainer: Thomas Legay <thomas@syngate.fr>
Description: metabase

View File

@ -0,0 +1,5 @@
#!/bin/bash
id metabase &> /dev/null || useradd metabase -r -s /bin/false -d /var/lib/metabase
chown -R www-data:www-data /var/lib/metabase

View File

@ -0,0 +1,14 @@
[Unit]
Description=metabase
[Service]
Type=exec
User=metabase
WorkingDirectory=/var/share/metabase
ExecStart=/usr/bin/java -jar /usr/share/metabase/metabase.jar
Restart=on-failure
RestartSec=30s
ReadWritePaths=/var/share/metabase
[Install]
WantedBy=multi-user.target