update authelia element-web

This commit is contained in:
thomas 2022-03-04 20:50:46 +01:00
parent 1f55fadcc7
commit beb7aa882f
5 changed files with 46 additions and 30 deletions

View File

@ -23,7 +23,7 @@ debmaker_chroot cache/joplin
### 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)) ([src](https://github.com/AdguardTeam/AdguardHome))
- [authelia](#authelia) ([site](https://www.authelia.com/))
- [element-web](#element-web) ([site](https://element.io/))
- [gotify](#gotify) ([site](https://gotify.net/))

View File

@ -1,28 +1,38 @@
#!/bin/bash
VERSION=4.34.2
RELEASE=1
[ -e ./lib/function.sh ] && source ./lib/function.sh
APP=authelia
VERSION=4.33.2
GIT_VERSION=v$VERSION
DEB_VERSION=$VERSION-4
GIT_VERSION=v${VERSION}
DEB_VERSION=${VERSION}-${RELEASE}
DEBIAN_VERSION_CODENAME=bullseye
IMAGE_SIZE=4
STEP="envinit prebuild build makedeb"
envinit() {
apt install -y --no-install-recommends build-essential git wget ca-certificates dpkg fakeroot
wget -qO - https://deb.nodesource.com/setup_16.x | bash
apt-get update
apt-get install -y nodejs
wget -qO - https://go.dev/dl/go1.17.7.linux-amd64.tar.gz | tar -C /usr/local -xz
wget -qO - https://get.pnpm.io/install.sh | sh -
if [ $(dpkg -l | grep -e 'ii nodejs ' | wc -l) -eq 1 ];
then
apt-get update
apt-get dist-upgrade -y
else
apt install -y --no-install-recommends git wget ca-certificates dpkg fakeroot
wget -qO - https://deb.nodesource.com/setup_16.x | bash
apt-get update
apt-get install -y nodejs
wget -qO - https://go.dev/dl/go1.17.7.linux-amd64.tar.gz | tar -C /usr/local -xz
wget -qO - https://get.pnpm.io/install.sh | sh -
fi
}
prebuild(){
GIT_VERSION=$1
git clone --depth 1 -b ${GIT_VERSION} https://github.com/authelia/authelia.git /tmp/authelia
[ -e /tmp/git ] && rm -fr /tmp/git
[ -e /tmp/element-web ] || mkdir /tmp/element-web
git clone --depth 1 -b ${GIT_VERSION} https://github.com/authelia/authelia.git /tmp/git
cp -r /tmp/git/. /tmp/authelia
}
build() {
@ -32,8 +42,6 @@ build() {
}
makedeb(){
GIT_VERSION=$1
DEB_VERSION=$2
PATH_DEB=/tmp/src/rootfs
cp /tmp/authelia/dist/authelia ${PATH_DEB}/usr/bin/authelia

View File

@ -1,28 +1,38 @@
#!/bin/bash
VERSION=1.10.6
RELEASE=3
[ -e ./lib/function.sh ] && source ./lib/function.sh
APP=element-web
VERSION=1.10.6
GIT_VERSION=v$VERSION
DEB_VERSION=$VERSION-1
GIT_VERSION=v${VERSION}
DEB_VERSION=${VERSION}-${RELEASE}
DEBIAN_VERSION_CODENAME=bullseye
IMAGE_SIZE=4
STEP="envinit prebuild build makedeb"
envinit() {
apt install -y --no-install-recommends build-essential git python wget ca-certificates dpkg fakeroot
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
if [ $(dpkg -l | grep -e 'ii nodejs ' | wc -l) -eq 1 ];
then
apt-get update
apt-get dist-upgrade -y
else
apt install -y --no-install-recommends git wget ca-certificates dpkg fakeroot
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
fi
}
prebuild(){
GIT_VERSION=$1
git clone --depth 1 -b ${GIT_VERSION} https://github.com/vector-im/element-web.git /tmp/element-web
[ -e /tmp/git ] && rm -fr /tmp/git
[ -e /tmp/element-web ] || mkdir /tmp/element-web
git clone --depth 1 -b ${GIT_VERSION} https://github.com/vector-im/element-web.git /tmp/git
cp -r /tmp/git/. /tmp/element-web
}
build() {
@ -32,11 +42,9 @@ build() {
}
makedeb(){
GIT_VERSION=$1
DEB_VERSION=$2
PATH_DEB=/tmp/src/rootfs
tar -zxf /tmp/element-web/dist/element-${GIT_VERSION}-dirty.tar.gz --strip-components=1 -C ${PATH_DEB}/usr/lib/element-web/
tar -zxf /tmp/element-web/dist/element-${GIT_VERSION}-dirty.tar.gz --strip-components=1 -C ${PATH_DEB}/usr/share/element-web/
cp /tmp/element-web/config.sample.json ${PATH_DEB}/etc/element-web/config.json
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist

View File

@ -3,7 +3,7 @@
ServerAlias second.domaine.com
ServerAlias third.domaine.com
DocumentRoot /usr/lib/element-web
DocumentRoot /usr/share/element-web
Protocols h2c http/1.1
#default config ie first and third domaine
@ -12,7 +12,7 @@
#config for second domaine
Alias /config.second.domaine.com.json /etc/element-web/config.second.domaine.com.json
<directory /usr/lib/element-web>
<directory /usr/share/element-web>
Options none
AllowOverride None
Require all granted