New process using mount point
This commit is contained in:
parent
637a60c3bf
commit
5d14cf2985
18 changed files with 217 additions and 244 deletions
|
@ -1,38 +1,40 @@
|
|||
#!/bin/bash
|
||||
|
||||
STEP="envinit prebuild build makedeb"
|
||||
|
||||
envinit() {
|
||||
apt install -y build-essential git wget ca-certificates
|
||||
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 yarn
|
||||
wget -qO - https://go.dev/dl/go1.17.6.linux-amd64.tar.gz | tar -C /usr/local -xz
|
||||
wget -qO - https://go.dev/dl/go1.17.7.linux-amd64.tar.gz | tar -C /usr/local -xz
|
||||
}
|
||||
|
||||
prebuild(){
|
||||
VERSION=$1
|
||||
cd /tmp/
|
||||
git clone https://github.com/gotify/server.git
|
||||
cd server/
|
||||
git checkout ${VERSION}
|
||||
GIT_VERSION=$1
|
||||
git clone https://github.com/gotify/server.git /tmp/server
|
||||
cd /tmp/server/
|
||||
git checkout ${GIT_VERSION}
|
||||
}
|
||||
|
||||
build() {
|
||||
cd /tmp/server/
|
||||
. /root/.bashrc
|
||||
PATH=${PATH}:/usr/local/go/bin make
|
||||
PATH=${PATH}:/usr/local/go/bin
|
||||
export GO111MODULE=on
|
||||
make download-tools
|
||||
go get -d
|
||||
(cd ui && yarn && yarn build)
|
||||
go run hack/packr/packr.go
|
||||
go build -ldflags="$LD_FLAGS" -o gotify-server
|
||||
}
|
||||
|
||||
makedeb(){
|
||||
PATH_BUILD=$1
|
||||
PATH_DEB=$2
|
||||
GIT_VERSION=$3
|
||||
|
||||
cp ${PATH_BUILD}/tmp/gotify/dist/gotify ${PATH_DEB}/usr/bin/gotify
|
||||
cp ${PATH_BUILD}/tmp/authelia/config.template.yml ${PATH_DEB}/etc/authelia/configuration.yml
|
||||
GIT_VERSION=$1
|
||||
DEB_VERSION=$2
|
||||
cp /tmp/server/gotify-server /tmp/dist/rootfs/usr/bin/gotify-server
|
||||
cp /tmp/server/config.example.yml /tmp/dist/rootfs/etc/gotify/config.yml
|
||||
sed -i "s/%VERSION%/$DEB_VERSION/" /tmp/dist/rootfs/DEBIAN/control
|
||||
fakeroot dpkg-deb -Z gzip --build /tmp/dist/rootfs/ /tmp/dist/
|
||||
}
|
||||
echo $1
|
||||
FUNC=$1
|
||||
shift
|
||||
${FUNC} $*
|
||||
|
|
|
@ -1 +1 @@
|
|||
/etc/authelia/configuration.yml
|
||||
/etc/gotify/config.yml
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
id authelia &> /dev/null || useradd authelia -r -s /bin/false
|
||||
id gotify &> /dev/null || useradd gotify -r -s /bin/false
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue