From 363a876c228a468327feb3e93f8b1e2de71ef0f6 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 23 Jan 2022 21:49:01 +0100 Subject: [PATCH] Initial --- .gitignore | 2 + authelia2deb | 9 ++ element-web2deb | 9 ++ joplin-server2deb | 9 ++ joplin2deb | 9 ++ lib/function.sh | 115 ++++++++++++++++++ mautrix-whatsapp2deb | 9 ++ ressources/authelia/build | 5 + ressources/authelia/envinit | 9 ++ ressources/authelia/makedeb | 8 ++ ressources/authelia/prebuild | 6 + ressources/authelia/rootfs/DEBIAN/changelog | 0 ressources/authelia/rootfs/DEBIAN/conffiles | 1 + ressources/authelia/rootfs/DEBIAN/control | 7 ++ ressources/authelia/rootfs/DEBIAN/postinst | 4 + .../etc/systemd/system/authelia.service | 12 ++ ressources/element-web/build | 4 + ressources/element-web/envinit | 7 ++ ressources/element-web/makedeb | 7 ++ ressources/element-web/prebuild | 6 + .../element-web/rootfs/DEBIAN/changelog | 0 .../element-web/rootfs/DEBIAN/conffiles | 1 + ressources/element-web/rootfs/DEBIAN/control | 7 ++ .../doc/element-web/apache2-element-web.conf | 26 ++++ ressources/joplin-server/build | 3 + ressources/joplin-server/envinit | 7 ++ ressources/joplin-server/makedeb | 7 ++ ressources/joplin-server/prebuild | 10 ++ .../joplin-server/rootfs/DEBIAN/changelog | 0 .../joplin-server/rootfs/DEBIAN/conffiles | 1 + .../joplin-server/rootfs/DEBIAN/control | 8 ++ .../joplin-server/rootfs/DEBIAN/postinst | 8 ++ .../rootfs/etc/default/joplin-server | 60 +++++++++ .../etc/systemd/system/joplin-server.service | 17 +++ ressources/joplin/makedeb | 7 ++ ressources/joplin/rootfs/DEBIAN/changelog | 0 ressources/joplin/rootfs/DEBIAN/control | 7 ++ ressources/joplin/rootfs/usr/bin/joplin | 2 + .../usr/share/applications/joplin.desktop | 11 ++ .../joplin/rootfs/usr/share/joplin/joplin.png | Bin 0 -> 4312 bytes ressources/mautrix-whatsapp/build | 4 + ressources/mautrix-whatsapp/envinit | 3 + ressources/mautrix-whatsapp/makedeb | 7 ++ ressources/mautrix-whatsapp/prebuild | 6 + .../mautrix-whatsapp/rootfs/DEBIAN/changelog | 0 .../mautrix-whatsapp/rootfs/DEBIAN/conffiles | 1 + .../mautrix-whatsapp/rootfs/DEBIAN/control | 8 ++ .../mautrix-whatsapp/rootfs/DEBIAN/postinst | 4 + .../systemd/system/mautrix-whatsapp.service | 35 ++++++ ressources/rss-bridge/build | 2 + ressources/rss-bridge/envinit | 2 + ressources/rss-bridge/makedeb | 16 +++ ressources/rss-bridge/prebuild | 6 + ressources/rss-bridge/rootfs/DEBIAN/changelog | 0 ressources/rss-bridge/rootfs/DEBIAN/conffiles | 2 + ressources/rss-bridge/rootfs/DEBIAN/control | 7 ++ ressources/rss-bridge/rootfs/DEBIAN/postinst | 2 + .../doc/rss-bridge/apache2-rss-bridge.conf | 11 ++ ressources/standardnotes-web/build | 5 + ressources/standardnotes-web/envinit | 7 ++ ressources/standardnotes-web/makedeb | 6 + ressources/standardnotes-web/prebuild | 6 + .../standardnotes-web/rootfs/DEBIAN/changelog | 0 .../standardnotes-web/rootfs/DEBIAN/conffiles | 1 + .../standardnotes-web/rootfs/DEBIAN/control | 8 ++ .../standardnotes-web/rootfs/DEBIAN/postinst | 4 + .../rootfs/etc/default/standardnotes-web | 25 ++++ .../systemd/system/standardnotes-web.service | 16 +++ ressources/vaultwarden-web/build | 4 + ressources/vaultwarden-web/envinit | 8 ++ ressources/vaultwarden-web/makedeb | 6 + ressources/vaultwarden-web/prebuild | 19 +++ .../vaultwarden-web/rootfs/DEBIAN/changelog | 0 .../vaultwarden-web/rootfs/DEBIAN/control | 7 ++ ressources/vaultwarden/build | 4 + ressources/vaultwarden/envinit | 6 + ressources/vaultwarden/makedeb | 7 ++ ressources/vaultwarden/prebuild | 6 + .../vaultwarden/rootfs/DEBIAN/changelog | 0 .../vaultwarden/rootfs/DEBIAN/conffiles | 1 + ressources/vaultwarden/rootfs/DEBIAN/control | 9 ++ ressources/vaultwarden/rootfs/DEBIAN/postinst | 4 + .../rootfs/etc/default/vaultwarden | 20 +++ .../etc/systemd/system/vaultwarden.service | 32 +++++ rss-bridge2deb | 9 ++ standardnotes-web2deb | 9 ++ vaultwarden-web2deb | 9 ++ vaultwarden2deb | 9 ++ 88 files changed, 783 insertions(+) create mode 100644 .gitignore create mode 100755 authelia2deb create mode 100755 element-web2deb create mode 100755 joplin-server2deb create mode 100755 joplin2deb create mode 100644 lib/function.sh create mode 100755 mautrix-whatsapp2deb create mode 100755 ressources/authelia/build create mode 100755 ressources/authelia/envinit create mode 100644 ressources/authelia/makedeb create mode 100755 ressources/authelia/prebuild create mode 100644 ressources/authelia/rootfs/DEBIAN/changelog create mode 100644 ressources/authelia/rootfs/DEBIAN/conffiles create mode 100644 ressources/authelia/rootfs/DEBIAN/control create mode 100755 ressources/authelia/rootfs/DEBIAN/postinst create mode 100644 ressources/authelia/rootfs/etc/systemd/system/authelia.service create mode 100755 ressources/element-web/build create mode 100755 ressources/element-web/envinit create mode 100644 ressources/element-web/makedeb create mode 100755 ressources/element-web/prebuild create mode 100644 ressources/element-web/rootfs/DEBIAN/changelog create mode 100644 ressources/element-web/rootfs/DEBIAN/conffiles create mode 100644 ressources/element-web/rootfs/DEBIAN/control create mode 100644 ressources/element-web/rootfs/usr/share/doc/element-web/apache2-element-web.conf create mode 100755 ressources/joplin-server/build create mode 100755 ressources/joplin-server/envinit create mode 100644 ressources/joplin-server/makedeb create mode 100755 ressources/joplin-server/prebuild create mode 100644 ressources/joplin-server/rootfs/DEBIAN/changelog create mode 100644 ressources/joplin-server/rootfs/DEBIAN/conffiles create mode 100644 ressources/joplin-server/rootfs/DEBIAN/control create mode 100755 ressources/joplin-server/rootfs/DEBIAN/postinst create mode 100644 ressources/joplin-server/rootfs/etc/default/joplin-server create mode 100644 ressources/joplin-server/rootfs/etc/systemd/system/joplin-server.service create mode 100644 ressources/joplin/makedeb create mode 100644 ressources/joplin/rootfs/DEBIAN/changelog create mode 100644 ressources/joplin/rootfs/DEBIAN/control create mode 100755 ressources/joplin/rootfs/usr/bin/joplin create mode 100644 ressources/joplin/rootfs/usr/share/applications/joplin.desktop create mode 100644 ressources/joplin/rootfs/usr/share/joplin/joplin.png create mode 100755 ressources/mautrix-whatsapp/build create mode 100755 ressources/mautrix-whatsapp/envinit create mode 100644 ressources/mautrix-whatsapp/makedeb create mode 100755 ressources/mautrix-whatsapp/prebuild create mode 100644 ressources/mautrix-whatsapp/rootfs/DEBIAN/changelog create mode 100644 ressources/mautrix-whatsapp/rootfs/DEBIAN/conffiles create mode 100644 ressources/mautrix-whatsapp/rootfs/DEBIAN/control create mode 100755 ressources/mautrix-whatsapp/rootfs/DEBIAN/postinst create mode 100644 ressources/mautrix-whatsapp/rootfs/etc/systemd/system/mautrix-whatsapp.service create mode 100755 ressources/rss-bridge/build create mode 100755 ressources/rss-bridge/envinit create mode 100644 ressources/rss-bridge/makedeb create mode 100755 ressources/rss-bridge/prebuild create mode 100644 ressources/rss-bridge/rootfs/DEBIAN/changelog create mode 100644 ressources/rss-bridge/rootfs/DEBIAN/conffiles create mode 100644 ressources/rss-bridge/rootfs/DEBIAN/control create mode 100755 ressources/rss-bridge/rootfs/DEBIAN/postinst create mode 100644 ressources/rss-bridge/rootfs/usr/share/doc/rss-bridge/apache2-rss-bridge.conf create mode 100755 ressources/standardnotes-web/build create mode 100755 ressources/standardnotes-web/envinit create mode 100644 ressources/standardnotes-web/makedeb create mode 100755 ressources/standardnotes-web/prebuild create mode 100644 ressources/standardnotes-web/rootfs/DEBIAN/changelog create mode 100644 ressources/standardnotes-web/rootfs/DEBIAN/conffiles create mode 100644 ressources/standardnotes-web/rootfs/DEBIAN/control create mode 100755 ressources/standardnotes-web/rootfs/DEBIAN/postinst create mode 100644 ressources/standardnotes-web/rootfs/etc/default/standardnotes-web create mode 100644 ressources/standardnotes-web/rootfs/etc/systemd/system/standardnotes-web.service create mode 100755 ressources/vaultwarden-web/build create mode 100755 ressources/vaultwarden-web/envinit create mode 100644 ressources/vaultwarden-web/makedeb create mode 100755 ressources/vaultwarden-web/prebuild create mode 100644 ressources/vaultwarden-web/rootfs/DEBIAN/changelog create mode 100644 ressources/vaultwarden-web/rootfs/DEBIAN/control create mode 100755 ressources/vaultwarden/build create mode 100755 ressources/vaultwarden/envinit create mode 100644 ressources/vaultwarden/makedeb create mode 100755 ressources/vaultwarden/prebuild create mode 100644 ressources/vaultwarden/rootfs/DEBIAN/changelog create mode 100644 ressources/vaultwarden/rootfs/DEBIAN/conffiles create mode 100644 ressources/vaultwarden/rootfs/DEBIAN/control create mode 100755 ressources/vaultwarden/rootfs/DEBIAN/postinst create mode 100644 ressources/vaultwarden/rootfs/etc/default/vaultwarden create mode 100644 ressources/vaultwarden/rootfs/etc/systemd/system/vaultwarden.service create mode 100755 rss-bridge2deb create mode 100755 standardnotes-web2deb create mode 100755 vaultwarden-web2deb create mode 100755 vaultwarden2deb diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c670ee7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +cache/ +dist/ diff --git a/authelia2deb b/authelia2deb new file mode 100755 index 0000000..f2dab32 --- /dev/null +++ b/authelia2deb @@ -0,0 +1,9 @@ +#!/bin/bash + +APP=authelia +VERSION=4.33.2 +GIT_VERSION=v$VERSION +DEB_VERSION=$VERSION-4 +DEBIAN_VERSION_CODENAME=bullseye + +source ./lib/function.sh diff --git a/element-web2deb b/element-web2deb new file mode 100755 index 0000000..7f6fa92 --- /dev/null +++ b/element-web2deb @@ -0,0 +1,9 @@ +#!/bin/bash + +APP=element-web +VERSION=1.9.9 +GIT_VERSION=v$VERSION +DEB_VERSION=$VERSION-2 +DEBIAN_VERSION_CODENAME=bullseye + +source ./lib/function.sh diff --git a/joplin-server2deb b/joplin-server2deb new file mode 100755 index 0000000..3f3d705 --- /dev/null +++ b/joplin-server2deb @@ -0,0 +1,9 @@ +#!/bin/bash + +APP=joplin-server +VERSION=2.7.3 +GIT_VERSION=server-v$VERSION +DEB_VERSION=$VERSION-1 +DEBIAN_VERSION_CODENAME=bullseye + +source ./lib/function.sh diff --git a/joplin2deb b/joplin2deb new file mode 100755 index 0000000..7b098e5 --- /dev/null +++ b/joplin2deb @@ -0,0 +1,9 @@ +#!/bin/bash + +APP=joplin +VERSION=2.7.8 +GIT_VERSION=$VERSION +DEB_VERSION=$VERSION-6 +DEBIAN_VERSION_CODENAME=bullseye + +source ./lib/function.sh diff --git a/lib/function.sh b/lib/function.sh new file mode 100644 index 0000000..45872b2 --- /dev/null +++ b/lib/function.sh @@ -0,0 +1,115 @@ +#!/bin/bash +CACHE_APP=cache/${APP}/ +CACHE_STEP1=cache/${DEBIAN_VERSION_CODENAME} +CACHE_STEP2=cache/${APP}/envinit +CACHE_STEP3=cache/${APP}/prebuild +CACHE_STEP4=cache/${APP}/build + +#DownloadOs +step1() { + if [ ! -e ${CACHE_STEP1} ] + then + mkdir -p ${CACHE_STEP1}/proc + mount -t proc proc ${CACHE_STEP1}/proc + sleep 2 + debootstrap ${DEBIAN_VERSION_CODENAME} ${CACHE_STEP1} + umount ${CACHE_STEP1}/proc + fi +} + +#InstallOs +step2(){ + if [ -e ressources/${APP}/envinit ]; then + if [ ! -e ${CACHE_STEP2} ] ; then + mkdir -p ${CACHE_APP} + cp -a ${CACHE_STEP1}/ ${CACHE_STEP2} + cp ressources/${APP}/envinit ${CACHE_STEP2}/tmp/envinit + mount -t proc proc ${CACHE_STEP2}/proc + sleep 2 + chroot ${CACHE_STEP2} /tmp/envinit + umount ${CACHE_STEP2}/proc + rm ${CACHE_STEP2}/tmp/envinit + fi + fi +} + +#ConfigureBeforeBuild +step3(){ + if [ -e ressources/${APP}/prebuild ]; then + if [ ! -e ${CACHE_STEP3} ]; then + cp -a ${CACHE_STEP2} ${CACHE_STEP3} + cp ressources/${APP}/prebuild ${CACHE_STEP3}/tmp/prebuild + chroot ${CACHE_STEP3} /tmp/prebuild ${GIT_VERSION} + rm ${CACHE_STEP3}/tmp/prebuild + fi + fi +} + +#Build +step4(){ + if [ -e ressources/${APP}/build ]; then + if [ ! -e ${CACHE_STEP4} ] ; then + cp -a ${CACHE_STEP3} ${CACHE_STEP4} + cp ressources/${APP}/build ${CACHE_STEP4}/tmp/build + mount -t proc proc ${CACHE_STEP4}/proc/ + sleep 2 + chroot ${CACHE_STEP4} /tmp/build + umount ${CACHE_STEP4}/proc/ + fi + fi +} + +#PackageDeb +step5(){ + rm -fr dist/${APP} + mkdir dist/${APP} + cp -fr ressources/${APP}/rootfs/* dist/$APP/ + bash ressources/${APP}/makedeb ${CACHE_STEP4} dist/${APP} ${GIT_VERSION} + sed -i "s/%VERSION%/$DEB_VERSION/" dist/${APP}/DEBIAN/control + fakeroot dpkg-deb -Z gzip --build dist/${APP} dist + rm -fr dist/${APP} +} + +allstep(){ + step1 + step2 + step3 + step4 + step5 +} + +StartFromStep1(){ + rm -fr ${CACHE_STEP1} ${CACHE_STEP2} ${CACHE_STEP3} ${CACHE_STEP4} + allstep +} + +StartFromStep2(){ + rm -fr ${CACHE_STEP2} ${CACHE_STEP3} ${CACHE_STEP4} + allstep +} + +StartFromStep3(){ + rm -fr ${CACHE_STEP3} ${CACHE_STEP4} + allstep +} + +StartFromStep4(){ + rm -fr ${CACHE_STEP4} + allstep +} + +GotoStep1(){ + chroot ${CACHE_STEP1} +} + +GotoStep2(){ + chroot ${CACHE_STEP2} +} + +GotoStep3(){ + chroot ${CACHE_STEP3} +} + +GotoStep4(){ + chroot ${CACHE_STEP4} +} diff --git a/mautrix-whatsapp2deb b/mautrix-whatsapp2deb new file mode 100755 index 0000000..0f98768 --- /dev/null +++ b/mautrix-whatsapp2deb @@ -0,0 +1,9 @@ +#!/bin/bash + +APP=mautrix-whatsapp +VERSION=0.2.3 +GIT_VERSION=v$VERSION +DEB_VERSION=$VERSION-3 +DEBIAN_VERSION_CODENAME=bullseye + +source ./lib/function.sh diff --git a/ressources/authelia/build b/ressources/authelia/build new file mode 100755 index 0000000..a048473 --- /dev/null +++ b/ressources/authelia/build @@ -0,0 +1,5 @@ +#!/bin/bash +cd /tmp/authelia/ +. /root/.bashrc +PATH=$PATH:/usr/local/go/bin bash bootstrap.sh +PATH=$PATH:/usr/local/go/bin ./cmd/authelia-scripts/authelia-scripts build diff --git a/ressources/authelia/envinit b/ressources/authelia/envinit new file mode 100755 index 0000000..6864d65 --- /dev/null +++ b/ressources/authelia/envinit @@ -0,0 +1,9 @@ +#/bin/bash +apt install -y build-essential git wget ca-certificates +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 +wget -qO - https://go.dev/dl/go1.17.3.linux-amd64.tar.gz | tar -C /usr/local -xz +wget -qO - https://get.pnpm.io/install.sh | sh - diff --git a/ressources/authelia/makedeb b/ressources/authelia/makedeb new file mode 100644 index 0000000..306c022 --- /dev/null +++ b/ressources/authelia/makedeb @@ -0,0 +1,8 @@ +#!/bin/bash +PATH_BUILD=$1 +PATH_DEB=$2 +GIT_VERSION=$3 + +cp ${PATH_BUILD}/tmp/authelia/dist/authelia ${PATH_DEB}/usr/bin/authelia +cp ${PATH_BUILD}/tmp/authelia/config.template.yml ${PATH_DEB}/etc/authelia/configuration.yml + diff --git a/ressources/authelia/prebuild b/ressources/authelia/prebuild new file mode 100755 index 0000000..0491775 --- /dev/null +++ b/ressources/authelia/prebuild @@ -0,0 +1,6 @@ +#!/bin/bash +VERSION=$1 +cd /tmp/ +git clone https://github.com/authelia/authelia.git +cd authelia/ +git checkout $VERSION diff --git a/ressources/authelia/rootfs/DEBIAN/changelog b/ressources/authelia/rootfs/DEBIAN/changelog new file mode 100644 index 0000000..e69de29 diff --git a/ressources/authelia/rootfs/DEBIAN/conffiles b/ressources/authelia/rootfs/DEBIAN/conffiles new file mode 100644 index 0000000..2bde2fd --- /dev/null +++ b/ressources/authelia/rootfs/DEBIAN/conffiles @@ -0,0 +1 @@ +/etc/authelia/configuration.yml diff --git a/ressources/authelia/rootfs/DEBIAN/control b/ressources/authelia/rootfs/DEBIAN/control new file mode 100644 index 0000000..c1b96ca --- /dev/null +++ b/ressources/authelia/rootfs/DEBIAN/control @@ -0,0 +1,7 @@ +Package: authelia +Version: %VERSION% +Section: base +Priority: optional +Architecture: all +Maintainer: Thomas Legay +Description: authelia diff --git a/ressources/authelia/rootfs/DEBIAN/postinst b/ressources/authelia/rootfs/DEBIAN/postinst new file mode 100755 index 0000000..7783fc1 --- /dev/null +++ b/ressources/authelia/rootfs/DEBIAN/postinst @@ -0,0 +1,4 @@ +#!/bin/bash + +id authelia &> /dev/null || useradd authelia -r -s /bin/false + diff --git a/ressources/authelia/rootfs/etc/systemd/system/authelia.service b/ressources/authelia/rootfs/etc/systemd/system/authelia.service new file mode 100644 index 0000000..f2a2d62 --- /dev/null +++ b/ressources/authelia/rootfs/etc/systemd/system/authelia.service @@ -0,0 +1,12 @@ +[Unit] +Description=Authelia authentication and authorization server +After=multi-user.target + +[Service] +User=authelia +Group=authelia +ExecStart=/usr/lib/authelia/authelia --config /etc/authelia/configuration.yml +SyslogIdentifier=authelia + +[Install] +WantedBy=multi-user.target diff --git a/ressources/element-web/build b/ressources/element-web/build new file mode 100755 index 0000000..ebb4cb8 --- /dev/null +++ b/ressources/element-web/build @@ -0,0 +1,4 @@ +#!/bin/bash +cd /tmp/element-web +yarn install +yarn dist diff --git a/ressources/element-web/envinit b/ressources/element-web/envinit new file mode 100755 index 0000000..f98a073 --- /dev/null +++ b/ressources/element-web/envinit @@ -0,0 +1,7 @@ +#/bin/bash +apt install -y build-essential git python wget ca-certificates +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 yarn nodejs diff --git a/ressources/element-web/makedeb b/ressources/element-web/makedeb new file mode 100644 index 0000000..6ee9ba1 --- /dev/null +++ b/ressources/element-web/makedeb @@ -0,0 +1,7 @@ +#!/bin/bash +PATH_BUILD=$1 +PATH_DEB=$2 +GIT_VERSION=$3 + +tar -zxf ${PATH_BUILD}/tmp/element-web/dist/element-${GIT_VERSION}-dirty.tar.gz --strip-components=1 -C ${PATH_DEB}/usr/lib/element-web/ +cp ${PATH_DEB}/usr/lib/element-web/config.sample.json ${PATH_DEB}/etc/element-web/config.json diff --git a/ressources/element-web/prebuild b/ressources/element-web/prebuild new file mode 100755 index 0000000..1d808ca --- /dev/null +++ b/ressources/element-web/prebuild @@ -0,0 +1,6 @@ +#!/bin/bash +VERSION=$1 +cd /tmp/ +git clone https://github.com/vector-im/element-web.git +cd element-web/ +git checkout $VERSION diff --git a/ressources/element-web/rootfs/DEBIAN/changelog b/ressources/element-web/rootfs/DEBIAN/changelog new file mode 100644 index 0000000..e69de29 diff --git a/ressources/element-web/rootfs/DEBIAN/conffiles b/ressources/element-web/rootfs/DEBIAN/conffiles new file mode 100644 index 0000000..a0be536 --- /dev/null +++ b/ressources/element-web/rootfs/DEBIAN/conffiles @@ -0,0 +1 @@ +/etc/element-web/config.json diff --git a/ressources/element-web/rootfs/DEBIAN/control b/ressources/element-web/rootfs/DEBIAN/control new file mode 100644 index 0000000..9105b41 --- /dev/null +++ b/ressources/element-web/rootfs/DEBIAN/control @@ -0,0 +1,7 @@ +Package: element-web +Version: %VERSION% +Section: base +Priority: optional +Architecture: all +Maintainer: Thomas Legay +Description: element-web diff --git a/ressources/element-web/rootfs/usr/share/doc/element-web/apache2-element-web.conf b/ressources/element-web/rootfs/usr/share/doc/element-web/apache2-element-web.conf new file mode 100644 index 0000000..18b1cfa --- /dev/null +++ b/ressources/element-web/rootfs/usr/share/doc/element-web/apache2-element-web.conf @@ -0,0 +1,26 @@ + + ServerName first.domaine.com + ServerAlias second.domaine.com + ServerAlias third.domaine.com + + DocumentRoot /usr/lib/element-web + Protocols h2c http/1.1 + + #default config ie first and third domaine + Alias /config.json /etc/element-web/config.json + + #config for second domaine + Alias /config.second.domaine.com.json /etc/element-web/config.second.domaine.com.json + + + Options none + AllowOverride None + Require all granted + + + + Options none + AllowOverride None + Require all granted + + diff --git a/ressources/joplin-server/build b/ressources/joplin-server/build new file mode 100755 index 0000000..a050dc0 --- /dev/null +++ b/ressources/joplin-server/build @@ -0,0 +1,3 @@ +#!/bin/bash +cd /tmp/joplin/ +BUILD_SEQUENCIAL=1 yarn install diff --git a/ressources/joplin-server/envinit b/ressources/joplin-server/envinit new file mode 100755 index 0000000..f98a073 --- /dev/null +++ b/ressources/joplin-server/envinit @@ -0,0 +1,7 @@ +#/bin/bash +apt install -y build-essential git python wget ca-certificates +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 yarn nodejs diff --git a/ressources/joplin-server/makedeb b/ressources/joplin-server/makedeb new file mode 100644 index 0000000..ba61045 --- /dev/null +++ b/ressources/joplin-server/makedeb @@ -0,0 +1,7 @@ +#!/bin/bash +PATH_BUILD=$1 +PATH_DEB=$2 +GIT_VERSION=$3 + +cp -fr ${PATH_BUILD}/tmp/joplin/packages/* ${PATH_DEB}/usr/lib/joplin-server/ + diff --git a/ressources/joplin-server/prebuild b/ressources/joplin-server/prebuild new file mode 100755 index 0000000..3a2b4fa --- /dev/null +++ b/ressources/joplin-server/prebuild @@ -0,0 +1,10 @@ +#!/bin/bash +VERSION=$1 +cd /tmp/ +git clone https://github.com/laurent22/joplin.git +cd joplin/ +git checkout $VERSION +rm -fr packages/app* +rm -fr packages/generator-joplin +rm -fr packages/plugin-repo-cli +rm -fr packages/plugins diff --git a/ressources/joplin-server/rootfs/DEBIAN/changelog b/ressources/joplin-server/rootfs/DEBIAN/changelog new file mode 100644 index 0000000..e69de29 diff --git a/ressources/joplin-server/rootfs/DEBIAN/conffiles b/ressources/joplin-server/rootfs/DEBIAN/conffiles new file mode 100644 index 0000000..f960980 --- /dev/null +++ b/ressources/joplin-server/rootfs/DEBIAN/conffiles @@ -0,0 +1 @@ +/etc/default/joplin-server diff --git a/ressources/joplin-server/rootfs/DEBIAN/control b/ressources/joplin-server/rootfs/DEBIAN/control new file mode 100644 index 0000000..5aad497 --- /dev/null +++ b/ressources/joplin-server/rootfs/DEBIAN/control @@ -0,0 +1,8 @@ +Package: joplin-server +Version: %VERSION% +Section: base +Priority: optional +Architecture: all +Depends: nodejs +Maintainer: Thomas Legay +Description: joplin server diff --git a/ressources/joplin-server/rootfs/DEBIAN/postinst b/ressources/joplin-server/rootfs/DEBIAN/postinst new file mode 100755 index 0000000..80ee09d --- /dev/null +++ b/ressources/joplin-server/rootfs/DEBIAN/postinst @@ -0,0 +1,8 @@ +#!/bin/bash + +id joplin-server &> /dev/null || useradd joplin-server -r -s /bin/false -md /var/lib/joplin-server +## issue https://github.com/laurent22/joplin/issues/5980 +mkdir /usr/lib/joplin-server/server/temp/ +mkdir /usr/lib/joplin-server/server/logs/ +chown joplin-server:joplin-server /usr/lib/joplin-server/server/temp/ +chown joplin-server:joplin-server /usr/lib/joplin-server/server/logs/ diff --git a/ressources/joplin-server/rootfs/etc/default/joplin-server b/ressources/joplin-server/rootfs/etc/default/joplin-server new file mode 100644 index 0000000..717eec9 --- /dev/null +++ b/ressources/joplin-server/rootfs/etc/default/joplin-server @@ -0,0 +1,60 @@ +APP_NAME='Joplin Server' +APP_PORT=22300 +SIGNUP_ENABLED=0 +TERMS_ENABLED=0 +ACCOUNT_TYPES_ENABLED=0 +ERROR_STACK_TRACES=0 +COOKIES_SECURE=0 +RUNNING_IN_DOCKER=0 +# Maxiumm allowed drift between NTP time and server time. A few +# milliseconds is normally not an issue unless many clients are modifying +# the same note at the exact same time. But past a certain limit it might +# mean the server clock is incorrect and should be fixed as that could +# result in clients generating many conflicts. Set to 0 to disable the +# check. https:#github.com/laurent22/joplin/issues/5738 +MAX_TIME_DRIFT=2000 +#================================================== +# URL config +#================================================== +#APP_BASE_URL= +USER_CONTENT_BASE_URL= +API_BASE_URL= +JOPLINAPP_BASE_URL='https:#joplinapp.org' +#================================================== +# Database config +#================================================== +DB_CLIENT='sqlite3' +DB_SLOW_QUERY_LOG_ENABLED=0 +DB_SLOW_QUERY_LOG_MIN_DURATION=1000 +DB_AUTO_MIGRATION=1 +POSTGRES_PASSWORD='joplin' +POSTGRES_DATABASE='joplin' +POSTGRES_USER='joplin' +POSTGRES_HOST= +POSTGRES_PORT=5432 +# This must be the full path to the database file +SQLITE_DATABASE= +#================================================== +# Content driver config +#================================================== +STORAGE_DRIVER='Type=Database' +STORAGE_DRIVER_FALLBACK= +#================================================== +# Mailer config +#================================================== +MAILER_ENABLED=0 +MAILER_HOST= +MAILER_PORT=587 +MAILER_SECURE=1 +MAILER_AUTH_USER= +MAILER_AUTH_PASSWORD= +MAILER_NOREPLY_NAME= +MAILER_NOREPLY_EMAIL= +SUPPORT_EMAIL='SUPPORT_EMAIL' +SUPPORT_NAME= +BUSINESS_EMAIL= +#================================================== +# Stripe config +#================================================== +STRIPE_SECRET_KEY= +STRIPE_WEBHOOK_SECRET= diff --git a/ressources/joplin-server/rootfs/etc/systemd/system/joplin-server.service b/ressources/joplin-server/rootfs/etc/systemd/system/joplin-server.service new file mode 100644 index 0000000..10ee815 --- /dev/null +++ b/ressources/joplin-server/rootfs/etc/systemd/system/joplin-server.service @@ -0,0 +1,17 @@ +[Unit] +Description=joplin server +Documentation=https://github.com/laurent22/joplin + +After=network.target + +[Service] +User=joplin-server +Group=joplin-server +EnvironmentFile=/etc/default/joplin-server +ExecStart=/usr/bin/yarn --cwd /usr/lib/joplin-server/server/ start +WorkingDirectory=/var/lib/joplin-server/ +Restart=on-failure +RestartSec=30s + +[Install] +WantedBy=multi-user.target diff --git a/ressources/joplin/makedeb b/ressources/joplin/makedeb new file mode 100644 index 0000000..1bdd522 --- /dev/null +++ b/ressources/joplin/makedeb @@ -0,0 +1,7 @@ +#!/bin/bash +PATH_BUILD=$1 +PATH_DEB=$2 +GIT_VERSION=$3 + +wget https://github.com/laurent22/joplin/releases/download/v${GIT_VERSION}/Joplin-${GIT_VERSION}.AppImage -qO ${PATH_DEB}/usr/share/joplin/Joplin.AppImage +chmod +x ${PATH_DEB}/usr/share/joplin/Joplin.AppImage diff --git a/ressources/joplin/rootfs/DEBIAN/changelog b/ressources/joplin/rootfs/DEBIAN/changelog new file mode 100644 index 0000000..e69de29 diff --git a/ressources/joplin/rootfs/DEBIAN/control b/ressources/joplin/rootfs/DEBIAN/control new file mode 100644 index 0000000..9944ad5 --- /dev/null +++ b/ressources/joplin/rootfs/DEBIAN/control @@ -0,0 +1,7 @@ +Package: joplin +Version: %VERSION% +Section: base +Priority: optional +Architecture: all +Maintainer: Thomas Legay +Description: joplin diff --git a/ressources/joplin/rootfs/usr/bin/joplin b/ressources/joplin/rootfs/usr/bin/joplin new file mode 100755 index 0000000..017c79b --- /dev/null +++ b/ressources/joplin/rootfs/usr/bin/joplin @@ -0,0 +1,2 @@ +#!/bin/bash +/usr/share/joplin/Joplin.AppImage diff --git a/ressources/joplin/rootfs/usr/share/applications/joplin.desktop b/ressources/joplin/rootfs/usr/share/applications/joplin.desktop new file mode 100644 index 0000000..b63d272 --- /dev/null +++ b/ressources/joplin/rootfs/usr/share/applications/joplin.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Name=Joplin +Comment=Text Editor +GenericName=Text Editor +Exec=joplin +Icon=/usr/share/joplin/joplin.png +Terminal=false +StartupNotify=true +Type=Application +Categories=Utility;TextEditor + diff --git a/ressources/joplin/rootfs/usr/share/joplin/joplin.png b/ressources/joplin/rootfs/usr/share/joplin/joplin.png new file mode 100644 index 0000000000000000000000000000000000000000..1e61d8b7c25ddb0758f4e91fbeb79628464c4a73 GIT binary patch literal 4312 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 AFaQ7m literal 0 HcmV?d00001 diff --git a/ressources/mautrix-whatsapp/build b/ressources/mautrix-whatsapp/build new file mode 100755 index 0000000..2673991 --- /dev/null +++ b/ressources/mautrix-whatsapp/build @@ -0,0 +1,4 @@ +#/bin/bash +cd /tmp/whatsapp/ +git checkout $1 +PATH=$PATH:/usr/local/go/bin ./build.sh diff --git a/ressources/mautrix-whatsapp/envinit b/ressources/mautrix-whatsapp/envinit new file mode 100755 index 0000000..fb96686 --- /dev/null +++ b/ressources/mautrix-whatsapp/envinit @@ -0,0 +1,3 @@ +#/bin/bash +apt install -y ca-certificates git libolm3 libolm-dev build-essential wget +wget -qO - https://go.dev/dl/go1.17.3.linux-amd64.tar.gz | tar -C /usr/local -xz diff --git a/ressources/mautrix-whatsapp/makedeb b/ressources/mautrix-whatsapp/makedeb new file mode 100644 index 0000000..8604020 --- /dev/null +++ b/ressources/mautrix-whatsapp/makedeb @@ -0,0 +1,7 @@ +#!/bin/bash +PATH_BUILD=$1 +PATH_DEB=$2 +GIT_VERSION=$3 + +cp ${PATH_BUILD}/tmp/whatsapp/mautrix-whatsapp ${PATH_DEB}/usr/lib/mautrix-whatsapp/mautrix-whatsapp +cp ${PATH_BUILD}/tmp/whatsapp/example-config.yaml ${PATH_DEB}/etc/mautrix-whatsapp/config.yaml diff --git a/ressources/mautrix-whatsapp/prebuild b/ressources/mautrix-whatsapp/prebuild new file mode 100755 index 0000000..090b647 --- /dev/null +++ b/ressources/mautrix-whatsapp/prebuild @@ -0,0 +1,6 @@ +#!/bin/bash +VERSION=$1 +cd /tmp/ +git clone https://github.com/mautrix/whatsapp.git +cd whatsapp/ +git checkout $VERSION diff --git a/ressources/mautrix-whatsapp/rootfs/DEBIAN/changelog b/ressources/mautrix-whatsapp/rootfs/DEBIAN/changelog new file mode 100644 index 0000000..e69de29 diff --git a/ressources/mautrix-whatsapp/rootfs/DEBIAN/conffiles b/ressources/mautrix-whatsapp/rootfs/DEBIAN/conffiles new file mode 100644 index 0000000..6dd2818 --- /dev/null +++ b/ressources/mautrix-whatsapp/rootfs/DEBIAN/conffiles @@ -0,0 +1 @@ +/etc/mautrix-whatsapp/config.yaml diff --git a/ressources/mautrix-whatsapp/rootfs/DEBIAN/control b/ressources/mautrix-whatsapp/rootfs/DEBIAN/control new file mode 100644 index 0000000..283d8f1 --- /dev/null +++ b/ressources/mautrix-whatsapp/rootfs/DEBIAN/control @@ -0,0 +1,8 @@ +Package: mautrix-whatsapp +Version: %VERSION% +Section: base +Priority: optional +Architecture: all +Depends: libolm3 +Maintainer: Thomas Legay +Description: mautrix-whatsapp bridge diff --git a/ressources/mautrix-whatsapp/rootfs/DEBIAN/postinst b/ressources/mautrix-whatsapp/rootfs/DEBIAN/postinst new file mode 100755 index 0000000..9aa9e5b --- /dev/null +++ b/ressources/mautrix-whatsapp/rootfs/DEBIAN/postinst @@ -0,0 +1,4 @@ +#!/bin/bash + +id mautrix-whatsapp &> /dev/null || useradd mautrix-whatsapp -r -s /bin/false -md /var/lib/mautrix-whatsapp +chown mautrix-whatsapp:mautrix-whatsapp /etc/mautrix-whatsapp/ diff --git a/ressources/mautrix-whatsapp/rootfs/etc/systemd/system/mautrix-whatsapp.service b/ressources/mautrix-whatsapp/rootfs/etc/systemd/system/mautrix-whatsapp.service new file mode 100644 index 0000000..2f1c8ed --- /dev/null +++ b/ressources/mautrix-whatsapp/rootfs/etc/systemd/system/mautrix-whatsapp.service @@ -0,0 +1,35 @@ +[Unit] +Description=mautrix-whatsapp bridge + +[Service] +Type=exec +User=mautrix-whatsapp +WorkingDirectory=/var/lib/mautrix-whatsapp +ExecStart=/usr/lib/mautrix-whatsapp/mautrix-whatsapp -c /etc/mautrix-whatsapp/config.yaml +Restart=on-failure +RestartSec=30s + +# Optional hardening to improve security +ReadWritePaths=/var/lib/mautrix-whatsapp /etc/mautrix-whatsapp +NoNewPrivileges=yes +MemoryDenyWriteExecute=true +PrivateDevices=yes +PrivateTmp=yes +ProtectHome=yes +ProtectSystem=strict +ProtectControlGroups=true +RestrictSUIDSGID=true +RestrictRealtime=true +LockPersonality=true +ProtectKernelLogs=true +ProtectKernelTunables=true +ProtectHostname=true +ProtectKernelModules=true +PrivateUsers=true +ProtectClock=true +SystemCallArchitectures=native +SystemCallErrorNumber=EPERM +SystemCallFilter=@system-service + +[Install] +WantedBy=multi-user.target diff --git a/ressources/rss-bridge/build b/ressources/rss-bridge/build new file mode 100755 index 0000000..05a7907 --- /dev/null +++ b/ressources/rss-bridge/build @@ -0,0 +1,2 @@ +#!/bin/bash + diff --git a/ressources/rss-bridge/envinit b/ressources/rss-bridge/envinit new file mode 100755 index 0000000..21f4ffc --- /dev/null +++ b/ressources/rss-bridge/envinit @@ -0,0 +1,2 @@ +#/bin/bash +apt install -y git diff --git a/ressources/rss-bridge/makedeb b/ressources/rss-bridge/makedeb new file mode 100644 index 0000000..6dcbd19 --- /dev/null +++ b/ressources/rss-bridge/makedeb @@ -0,0 +1,16 @@ +#!/bin/bash +PATH_BUILD=$1 +PATH_DEB=$2 +GIT_VERSION=$3 + +cp -fr ${PATH_BUILD}/tmp/rss-bridge ${PATH_DEB}/usr/share/ + +cp ${PATH_DEB}/usr/share/rss-bridge/config.default.ini.php ${PATH_DEB}/etc/rss-bridge/config.ini.php +cp ${PATH_DEB}/usr/share/rss-bridge/whitelist.default.txt ${PATH_DEB}/etc/rss-bridge/whitelist.txt + +ln -s /etc/rss-bridge/config.ini.php ${PATH_DEB}/usr/share/rss-bridge/config.ini.php +ln -s /etc/rss-bridge/whitelist.txt ${PATH_DEB}/usr/share/rss-bridge/whitelist.txt + +mkdir -p ${PATH_DEB}/var/cache/rss-bridge/cache/ +rm ${PATH_DEB}/usr/share/rss-bridge/cache +ln -s /var/cache/rss-bridge/cache/ ${PATH_DEB}/usr/share/rss-bridge/cache diff --git a/ressources/rss-bridge/prebuild b/ressources/rss-bridge/prebuild new file mode 100755 index 0000000..f486be7 --- /dev/null +++ b/ressources/rss-bridge/prebuild @@ -0,0 +1,6 @@ +#!/bin/bash +VERSION=$1 +cd /tmp/ +git clone https://github.com/RSS-Bridge/rss-bridge.git +cd rss-bridge/ +git checkout $VERSION diff --git a/ressources/rss-bridge/rootfs/DEBIAN/changelog b/ressources/rss-bridge/rootfs/DEBIAN/changelog new file mode 100644 index 0000000..e69de29 diff --git a/ressources/rss-bridge/rootfs/DEBIAN/conffiles b/ressources/rss-bridge/rootfs/DEBIAN/conffiles new file mode 100644 index 0000000..001988f --- /dev/null +++ b/ressources/rss-bridge/rootfs/DEBIAN/conffiles @@ -0,0 +1,2 @@ +/etc/rss-bridge/config.ini.php +/etc/rss-bridge/whitelist.txt diff --git a/ressources/rss-bridge/rootfs/DEBIAN/control b/ressources/rss-bridge/rootfs/DEBIAN/control new file mode 100644 index 0000000..1731387 --- /dev/null +++ b/ressources/rss-bridge/rootfs/DEBIAN/control @@ -0,0 +1,7 @@ +Package: rss-bridge +Version: %VERSION% +Section: base +Priority: optional +Architecture: all +Maintainer: Thomas Legay +Description: rss-bridge diff --git a/ressources/rss-bridge/rootfs/DEBIAN/postinst b/ressources/rss-bridge/rootfs/DEBIAN/postinst new file mode 100755 index 0000000..715051b --- /dev/null +++ b/ressources/rss-bridge/rootfs/DEBIAN/postinst @@ -0,0 +1,2 @@ +#!/bin/bash +chown www-data:www-data /var/cache/rss-bridge/cache diff --git a/ressources/rss-bridge/rootfs/usr/share/doc/rss-bridge/apache2-rss-bridge.conf b/ressources/rss-bridge/rootfs/usr/share/doc/rss-bridge/apache2-rss-bridge.conf new file mode 100644 index 0000000..eb27303 --- /dev/null +++ b/ressources/rss-bridge/rootfs/usr/share/doc/rss-bridge/apache2-rss-bridge.conf @@ -0,0 +1,11 @@ + + ServerName rss-bridge.domaine.com + + DocumentRoot /usr/share/rss-bridge + + + Options FollowSymLinks + AllowOverride None + Require all granted + + diff --git a/ressources/standardnotes-web/build b/ressources/standardnotes-web/build new file mode 100755 index 0000000..11717cf --- /dev/null +++ b/ressources/standardnotes-web/build @@ -0,0 +1,5 @@ +#!/bin/bash +cd /tmp/web +PATH=$PATH:/tmp/web/bin +npm install +npm run build diff --git a/ressources/standardnotes-web/envinit b/ressources/standardnotes-web/envinit new file mode 100755 index 0000000..95f0ae1 --- /dev/null +++ b/ressources/standardnotes-web/envinit @@ -0,0 +1,7 @@ +#/bin/bash +apt install -y git build-essential python2 wget ruby-dev libxml2 libz-dev +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 yarn nodejs diff --git a/ressources/standardnotes-web/makedeb b/ressources/standardnotes-web/makedeb new file mode 100644 index 0000000..160270f --- /dev/null +++ b/ressources/standardnotes-web/makedeb @@ -0,0 +1,6 @@ +#!/bin/bash +PATH_BUILD=$1 +PATH_DEB=$2 +GIT_VERSION=$3 + +cp -fr ${PATH_BUILD}/tmp/web/* ${PATH_DEB}/usr/lib/standardnotes/web/ diff --git a/ressources/standardnotes-web/prebuild b/ressources/standardnotes-web/prebuild new file mode 100755 index 0000000..76d9a2c --- /dev/null +++ b/ressources/standardnotes-web/prebuild @@ -0,0 +1,6 @@ +#!/bin/bash +VERSION=$1 +cd /tmp/ +git clone https://github.com/standardnotes/web.git +cd web/ +git checkout $VERSION diff --git a/ressources/standardnotes-web/rootfs/DEBIAN/changelog b/ressources/standardnotes-web/rootfs/DEBIAN/changelog new file mode 100644 index 0000000..e69de29 diff --git a/ressources/standardnotes-web/rootfs/DEBIAN/conffiles b/ressources/standardnotes-web/rootfs/DEBIAN/conffiles new file mode 100644 index 0000000..612d780 --- /dev/null +++ b/ressources/standardnotes-web/rootfs/DEBIAN/conffiles @@ -0,0 +1 @@ +/etc/default/standardnotes-web diff --git a/ressources/standardnotes-web/rootfs/DEBIAN/control b/ressources/standardnotes-web/rootfs/DEBIAN/control new file mode 100644 index 0000000..66e32f4 --- /dev/null +++ b/ressources/standardnotes-web/rootfs/DEBIAN/control @@ -0,0 +1,8 @@ +Package: standardnotes-web +Version: %VERSION% +Section: base +Priority: optional +Architecture: all +Depends: nodejs +Maintainer: Thomas Legay +Description: standardnotes web diff --git a/ressources/standardnotes-web/rootfs/DEBIAN/postinst b/ressources/standardnotes-web/rootfs/DEBIAN/postinst new file mode 100755 index 0000000..d1a21c6 --- /dev/null +++ b/ressources/standardnotes-web/rootfs/DEBIAN/postinst @@ -0,0 +1,4 @@ +#!/bin/bash + +id standardnotes-web &> /dev/null || useradd standardnotes-web -r -s /bin/false -md /usr/lib/standardnotes/web + diff --git a/ressources/standardnotes-web/rootfs/etc/default/standardnotes-web b/ressources/standardnotes-web/rootfs/etc/default/standardnotes-web new file mode 100644 index 0000000..e2534b3 --- /dev/null +++ b/ressources/standardnotes-web/rootfs/etc/default/standardnotes-web @@ -0,0 +1,25 @@ +RAILS_ENV=production +PORT=3004 +WEB_CONCURRENCY=0 +RAILS_LOG_TO_STDOUT=true +# Log Level options: "INFO" | "DEBUG" | "INFO" | "WARN" | "ERROR" | "FATAL" +RAILS_LOG_LEVEL=INFO +RAILS_SERVE_STATIC_FILES=true +SECRET_KEY_BASE=test +APP_HOST=https://notes.lgy.fr + +EXTENSIONS_MANAGER_LOCATION=extensions/extensions-manager/dist/index.html +SF_DEFAULT_SERVER=https://api.notes.lgy.fr + +# Development options +DEV_DEFAULT_SYNC_SERVER=https://api.notes.lgy.fr +DEV_EXTENSIONS_MANAGER_LOCATION=public/extensions/extensions-manager/dist/index.html +ENABLE_UNFINISHED_FEATURES=false +DEV_WEBSOCKET_URL=https://notes.lgy.fr/ws + +# NewRelic (Optional) +NEW_RELIC_ENABLED=false +NEW_RELIC_THREAD_PROFILER_ENABLED=false +NEW_RELIC_LICENSE_KEY= +NEW_RELIC_APP_NAME=Web +NEW_RELIC_BROWSER_MONITORING_AUTO_INSTRUMENT=false diff --git a/ressources/standardnotes-web/rootfs/etc/systemd/system/standardnotes-web.service b/ressources/standardnotes-web/rootfs/etc/systemd/system/standardnotes-web.service new file mode 100644 index 0000000..3c6bac7 --- /dev/null +++ b/ressources/standardnotes-web/rootfs/etc/systemd/system/standardnotes-web.service @@ -0,0 +1,16 @@ +[Unit] +Description=standardnote web +Documentation=https://github.com/standardnotes/web +After=network.target + +[Service] +User=standardnotes +Group=standardnotes +EnvironmentFile=/etc/default/standardnotes-web +WorkingDirectory=/usr/lib/standardnotes/web +ExecStart=/usr/bin/npm run start +Restart=on-failure +RestartSec=60 + +[Install] +WantedBy=multi-user.target diff --git a/ressources/vaultwarden-web/build b/ressources/vaultwarden-web/build new file mode 100755 index 0000000..d9f6bfb --- /dev/null +++ b/ressources/vaultwarden-web/build @@ -0,0 +1,4 @@ +#!/bin/bash +cd /tmp/web-vault +npm install +npm run dist:oss:selfhost diff --git a/ressources/vaultwarden-web/envinit b/ressources/vaultwarden-web/envinit new file mode 100755 index 0000000..1e027d0 --- /dev/null +++ b/ressources/vaultwarden-web/envinit @@ -0,0 +1,8 @@ +#/bin/bash +apt install -y build-essential git python wget ca-certificates +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 yarn nodejs +apt-get install -y nodejs diff --git a/ressources/vaultwarden-web/makedeb b/ressources/vaultwarden-web/makedeb new file mode 100644 index 0000000..7cb0f12 --- /dev/null +++ b/ressources/vaultwarden-web/makedeb @@ -0,0 +1,6 @@ +#!/bin/bash +PATH_BUILD=$1 +PATH_DEB=$2 +GIT_VERSION=$3 + +cp -fr ${PATH_BUILD}/tmp/web-vault/build/* ${PATH_DEB}/usr/share/vaultwarden-web diff --git a/ressources/vaultwarden-web/prebuild b/ressources/vaultwarden-web/prebuild new file mode 100755 index 0000000..d76bd65 --- /dev/null +++ b/ressources/vaultwarden-web/prebuild @@ -0,0 +1,19 @@ +#!/bin/bash +VERSION=$1 + +cd /tmp +git clone https://github.com/bitwarden/web.git web-vault +cd /tmp/web-vault +git checkout ${VERSION} +git submodule update --init --recursive +cd .. + +git clone https://github.com/dani-garcia/bw_web_builds.git +cd bw_web_builds +PATCH=$(git tag --sort=v:refname | tail -n1) +git checkout ${PATCH} +cp patches/${PATCH}.patch ../web-vault/ + +cd /tmp/web-vault +git apply ${PATCH}.patch + diff --git a/ressources/vaultwarden-web/rootfs/DEBIAN/changelog b/ressources/vaultwarden-web/rootfs/DEBIAN/changelog new file mode 100644 index 0000000..e69de29 diff --git a/ressources/vaultwarden-web/rootfs/DEBIAN/control b/ressources/vaultwarden-web/rootfs/DEBIAN/control new file mode 100644 index 0000000..81c4640 --- /dev/null +++ b/ressources/vaultwarden-web/rootfs/DEBIAN/control @@ -0,0 +1,7 @@ +Package: vaultwarden-web +Version: %VERSION% +Section: base +Priority: optional +Architecture: all +Maintainer: Thomas Legay +Description: web for vaultwarden diff --git a/ressources/vaultwarden/build b/ressources/vaultwarden/build new file mode 100755 index 0000000..483991a --- /dev/null +++ b/ressources/vaultwarden/build @@ -0,0 +1,4 @@ +#!/bin/bash +cd /tmp/vaultwarden/ +source ~/.cargo/env +cargo build --features sqlite,mysql,postgresql --release diff --git a/ressources/vaultwarden/envinit b/ressources/vaultwarden/envinit new file mode 100755 index 0000000..41375e3 --- /dev/null +++ b/ressources/vaultwarden/envinit @@ -0,0 +1,6 @@ +#/bin/bash +apt install -y --no-install-recommends build-essential git wget ca-certificates libmariadb-dev libpq-dev pkg-config libmysql++-dev +cd /tmp +wget -qO - https://sh.rustup.rs > rustup +bash rustup -qy +apt clean diff --git a/ressources/vaultwarden/makedeb b/ressources/vaultwarden/makedeb new file mode 100644 index 0000000..4b8c245 --- /dev/null +++ b/ressources/vaultwarden/makedeb @@ -0,0 +1,7 @@ +#!/bin/bash +PATH_BUILD=$1 +PATH_DEB=$2 +GIT_VERSION=$3 + +cp -fr ${PATH_BUILD}/tmp/vaultwarden/target/release/vaultwarden ${PATH_DEB}/usr/lib/vaultwarden/ + diff --git a/ressources/vaultwarden/prebuild b/ressources/vaultwarden/prebuild new file mode 100755 index 0000000..0d09fee --- /dev/null +++ b/ressources/vaultwarden/prebuild @@ -0,0 +1,6 @@ +#!/bin/bash +VERSION=$1 +cd /tmp/ +git clone https://github.com/dani-garcia/vaultwarden.git +cd vaultwarden/ +git checkout $VERSION diff --git a/ressources/vaultwarden/rootfs/DEBIAN/changelog b/ressources/vaultwarden/rootfs/DEBIAN/changelog new file mode 100644 index 0000000..e69de29 diff --git a/ressources/vaultwarden/rootfs/DEBIAN/conffiles b/ressources/vaultwarden/rootfs/DEBIAN/conffiles new file mode 100644 index 0000000..bae2624 --- /dev/null +++ b/ressources/vaultwarden/rootfs/DEBIAN/conffiles @@ -0,0 +1 @@ +/etc/default/vaultwarden diff --git a/ressources/vaultwarden/rootfs/DEBIAN/control b/ressources/vaultwarden/rootfs/DEBIAN/control new file mode 100644 index 0000000..1724de7 --- /dev/null +++ b/ressources/vaultwarden/rootfs/DEBIAN/control @@ -0,0 +1,9 @@ +Package: vaultwarden +Version: %VERSION% +Section: base +Priority: optional +Architecture: all +Depends: libmariadb-dev, libpq-dev, libmysql++-dev +Maintainer: Thomas Legay +Description: vaultwarden service + diff --git a/ressources/vaultwarden/rootfs/DEBIAN/postinst b/ressources/vaultwarden/rootfs/DEBIAN/postinst new file mode 100755 index 0000000..ed7b997 --- /dev/null +++ b/ressources/vaultwarden/rootfs/DEBIAN/postinst @@ -0,0 +1,4 @@ +#!/bin/bash + +id vaultwarden&> /dev/null || useradd vaultwarden -r -s /bin/false -md /var/lib/vaultwarden +chown vaultwarden:vaultwarden /var/lib/vaultwarden diff --git a/ressources/vaultwarden/rootfs/etc/default/vaultwarden b/ressources/vaultwarden/rootfs/etc/default/vaultwarden new file mode 100644 index 0000000..50cce1b --- /dev/null +++ b/ressources/vaultwarden/rootfs/etc/default/vaultwarden @@ -0,0 +1,20 @@ +#See src/config.rs + +WEB_VAULT_FOLDER=/usr/share/vaultwarden-web/ +DATA_FOLDER=/var/lib/vaultwarden/ +SIGNUPS_ALLOWED=false +WEBSOCKET_ENABLED=true +ADMIN_TOKEN= +SMTP_HOST= +SMTP_FROM= +SMTP_PORT= +SMTP_SSL=true +SMTP_USERNAME= +SMTP_PASSWORD= +RUST_BACKTRACE=full +DOMAIN=https://vaultwarden.domain.com +ADMIN_TOKEN= +ROCKET_ADDRESS=0.0.0.0 +WEBSOCKET_ENABLED=true +WEBSOCKET_ADDRESS=0.0.0.0 +DATABASE_URL= diff --git a/ressources/vaultwarden/rootfs/etc/systemd/system/vaultwarden.service b/ressources/vaultwarden/rootfs/etc/systemd/system/vaultwarden.service new file mode 100644 index 0000000..c22c336 --- /dev/null +++ b/ressources/vaultwarden/rootfs/etc/systemd/system/vaultwarden.service @@ -0,0 +1,32 @@ +[Unit] +Description=vaultwarden Server (Rust Edition) +Documentation=https://github.com/dani-garcia/vaultwarden + +After=network.target + +# MariaDB +# After=network.target mariadb.service +# Requires=mariadb.service + +# Mysql +# After=network.target mysqld.service +# Requires=mysqld.service + +# PostgreSQL +# After=network.target postgresql.service +# Requires=postgresql.service + +[Service] +User=vaultwarden +Group=vaultwarden +EnvironmentFile=/etc/default/vaultwarden +ExecStart=/usr/lib/vaultwarden/vaultwarden +PrivateTmp=true +PrivateDevices=true +ProtectHome=true +ProtectSystem=strict +WorkingDirectory=/var/lib//vaultwarden/ +ReadWriteDirectories=/var/lib/vaultwarden/ + +[Install] +WantedBy=multi-user.target diff --git a/rss-bridge2deb b/rss-bridge2deb new file mode 100755 index 0000000..613d7fc --- /dev/null +++ b/rss-bridge2deb @@ -0,0 +1,9 @@ +#!/bin/bash + +APP=rss-bridge +VERSION=2022-01-20 +GIT_VERSION=$VERSION +DEB_VERSION=$VERSION-3 +DEBIAN_VERSION_CODENAME=bullseye + +source ./lib/function.sh diff --git a/standardnotes-web2deb b/standardnotes-web2deb new file mode 100755 index 0000000..434e126 --- /dev/null +++ b/standardnotes-web2deb @@ -0,0 +1,9 @@ +#!/bin/bash + +APP=standardnotes-web +VERSION=10.9.0 +GIT_VERSION=$VERSION +DEB_VERSION=$VERSION-1 +DEBIAN_VERSION_CODENAME=bullseye + +source ./lib/function.sh diff --git a/vaultwarden-web2deb b/vaultwarden-web2deb new file mode 100755 index 0000000..cc702ee --- /dev/null +++ b/vaultwarden-web2deb @@ -0,0 +1,9 @@ +#!/bin/bash + +APP=vaultwarden-web +VERSION=2.25.1 +GIT_VERSION=v$VERSION +DEB_VERSION=$VERSION-2 +DEBIAN_VERSION_CODENAME=bullseye + +source ./lib/function.sh diff --git a/vaultwarden2deb b/vaultwarden2deb new file mode 100755 index 0000000..beeef82 --- /dev/null +++ b/vaultwarden2deb @@ -0,0 +1,9 @@ +#!/bin/bash + +APP=vaultwarden +VERSION=1.23.1 +GIT_VERSION=$VERSION +DEB_VERSION=$VERSION-3 +DEBIAN_VERSION_CODENAME=bullseye + +source ./lib/function.sh