test libretranslate

This commit is contained in:
thomas 2022-03-06 20:46:42 +01:00
parent 853e9f431b
commit 6f3a42c5e2
9 changed files with 165 additions and 0 deletions

View File

@ -33,6 +33,7 @@ debmaker_chroot cache/<App name>
- [joplin desktop](#joplin) ([site](https://joplinapp.org/)) ([src](https://github.com/laurent22/joplin))
- [joplin-server](#joplin-server) ([site](https://joplinapp.org/)) ([src](https://github.com/laurent22/joplin))
- [mautrix-syncproxy and mautrix-wsproxy](#mautrix-syncproxy-and-mautrix-wsproxy) ([site](https://docs.mau.fi/bridges/go/imessage/android/setup.html)) ([src](https://github.com/mautrix/syncproxy)) ([src](https://github.com/mautrix/wsproxy))
- [mautrix-whatsapp](#mautrix-whatsapp) ([site](https://docs.mau.fi/bridges/go/whatsapp/index.html)) ([src](https://github.com/mautrix/whatsapp))
- [metabase](#metabase) ([site](https://www.metabase.com/)) ([src](https://github.com/metabase/metabase))
- [rss-bridge](#rss-bridge) ([site](https://github.com/rss-bridge/rss-bridge)) ([src](https://github.com/RSS-Bridge/rss-bridge))
- [tt-rss](#tt-rss) ([site](https://tt-rss.org/)) ([src](https://git.tt-rss.org/fox/tt-rss))
@ -181,6 +182,19 @@ apt-get install -y mautrix-syncproxy mautrix-wsproxy
systemctl enable --now mautrix-wsproxy mautrix-syncproxy
```
#### mautrix-whatsapp
```bash
apt install -y wget ca-certificates
wget -qO - https://deb.lgy.fr/install.sh | bash
apt-get update
apt-get install -y mautrix-whatsapp
#see https://docs.mau.fi/bridges/go/whatsapp/setup/index.html#configuring-and-running
systemctl enable --now mautrix-whatsapp
```
#### metabase
```bash

View File

@ -0,0 +1,56 @@
#!/bin/bash
VERSION=1.2.7
RELEASE=1
[ -e ./lib/function.sh ] && source ./lib/function.sh
APP=libretranslate
DEPOT=https://github.com/LibreTranslate/LibreTranslate.git
GIT_VERSION=v${VERSION}
DEB_VERSION=${VERSION}-${RELEASE}
DEBIAN_VERSION_CODENAME=sid
IMAGE_SIZE=6
STEP="envinit prebuild build makedeb"
STEP="envinit prebuild build"
envinit() {
apt install -y --no-install-recommends git python3-pip wget ca-certificates fakeroot pkg-config icu-devtools libicu-dev build-essential python3-dev
}
prebuild(){
[ -e /tmp/git ] && rm -fr /tmp/git
[ -e /tmp/${APP} ] || mkdir /tmp/${APP}
git clone --depth 1 -b ${GIT_VERSION} ${DEPOT} /tmp/git
cp -fr /tmp/git/. /tmp/${APP}
}
build() {
cd /tmp/${APP}
pip3 install -e .
}
makedeb(){
PATH_DEB=/tmp/src/rootfs-server/
cp -fr /tmp/joplin/packages/lib ${PATH_DEB}/usr/share/joplin-server/
cp -fr /tmp/joplin/packages/turndown-plugin-gfm ${PATH_DEB}/usr/share/joplin-server/
cp -fr /tmp/joplin/packages/turndown ${PATH_DEB}/usr/share/joplin-server/
cp -fr /tmp/joplin/packages/htmlpack ${PATH_DEB}/usr/share/joplin-server/
cp -fr /tmp/joplin/packages/fork-uslug ${PATH_DEB}/usr/share/joplin-server/
cp -fr /tmp/joplin/packages/fork-sax ${PATH_DEB}/usr/share/joplin-server/
cp -fr /tmp/joplin/packages/renderer ${PATH_DEB}/usr/share/joplin-server/
cp -fr /tmp/joplin/packages/fork-htmlparser2 ${PATH_DEB}/usr/share/joplin-server/
cp -fr /tmp/joplin/packages/tools ${PATH_DEB}/usr/share/joplin-server/
cp -fr /tmp/joplin/packages/server ${PATH_DEB}/usr/share/joplin-server/
sed -i "s/%VERSION%/$DEB_VERSION_SERVER/" ${PATH_DEB}/DEBIAN/control
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
PATH_DEB=/tmp/src/rootfs-desktop/
cp /tmp/joplin/packages/app-desktop/dist/Joplin-*.AppImage ${PATH_DEB}/usr/share/joplin/Joplin.AppImage
sed -i "s/%VERSION%/$DEB_VERSION_DESKTOP/" ${PATH_DEB}/DEBIAN/control
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
}

View File

@ -0,0 +1 @@
/etc/default/joplin-server

View File

@ -0,0 +1,8 @@
Package: joplin-server
Version: %VERSION%
Section: base
Priority: optional
Architecture: all
Depends: nodejs
Maintainer: Thomas Legay <thomas@syngate.fr>
Description: joplin server

View File

@ -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
[ ! -e /usr/lib/joplin-server/server/temp/ ] && mkdir /usr/lib/joplin-server/server/temp/
[ ! -e /usr/lib/joplin-server/server/logs/ ] && 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/

View File

@ -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=

View File

@ -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