diff --git a/.gitignore b/.gitignore index c670ee7..9eb69ee 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ cache/ dist/ +postrun diff --git a/ressources/metabase/debmaker b/ressources/metabase/debmaker index 7649cd5..c8afa4c 100755 --- a/ressources/metabase/debmaker +++ b/ressources/metabase/debmaker @@ -1,14 +1,13 @@ #!/bin/bash VERSION=0.42.3 -RELEASE=2 [ -e ./lib/function.sh ] && source ./lib/function.sh APP=metabase DEPOT=https://github.com/metabase/metabase.git GIT_VERSION=v$VERSION -DEB_VERSION=${VERSION}-${RELEASE} +DEB_VERSION=${VERSION}-$(date +%Y%m%d%H%M) DEBIAN_VERSION_CODENAME=bullseye IMAGE_SIZE=10 diff --git a/ressources/metabase/rootfs/DEBIAN/conffiles b/ressources/metabase/rootfs/DEBIAN/conffiles new file mode 100644 index 0000000..6544782 --- /dev/null +++ b/ressources/metabase/rootfs/DEBIAN/conffiles @@ -0,0 +1 @@ +/etc/default/metabase diff --git a/ressources/metabase/rootfs/etc/default/metabase b/ressources/metabase/rootfs/etc/default/metabase new file mode 100644 index 0000000..99e8bce --- /dev/null +++ b/ressources/metabase/rootfs/etc/default/metabase @@ -0,0 +1,20 @@ +#https://www.metabase.com/docs/latest/operations-guide/configuring-application-database.html + +#MB_DB_TYPE=mysql +#MB_DB_PORT=3306 + +#MB_DB_TYPE=postgres +#MB_DB_PORT=5432 + +#MB_DB_DBNAME=metabase +#MB_DB_USER= +#MB_DB_PASS= +#MB_DB_HOST=localhost + +#MB_DB_CONNECTION_URI="jdbc:postgresql://localhost:5432/metabase?user=&password=" +#MB_DB_CONNECTION_URI="jdbc:mysql://localhost:3306/metabase?user=&password=" + +#https://www.metabase.com/docs/latest/operations-guide/encrypting-database-details-at-rest.html + +#generate with 'openssl rand -base64 32' +#MB_ENCRYPTION_SECRET_KEY= diff --git a/ressources/metabase/rootfs/usr/lib/systemd/system/metabase.service b/ressources/metabase/rootfs/usr/lib/systemd/system/metabase.service index dde561d..3c4cf16 100644 --- a/ressources/metabase/rootfs/usr/lib/systemd/system/metabase.service +++ b/ressources/metabase/rootfs/usr/lib/systemd/system/metabase.service @@ -4,8 +4,9 @@ Description=metabase [Service] Type=exec User=metabase -WorkingDirectory=/var/lib/metabase +EnvironmentFile=-/etc/default/metabase ExecStart=/usr/bin/java -jar /usr/share/metabase/metabase.jar +WorkingDirectory=/var/lib/metabase Restart=on-failure RestartSec=30s ReadWritePaths=/var/lib/metabase