Add mealie
This commit is contained in:
parent
0394ae6c11
commit
d020bef34c
33 changed files with 332 additions and 19 deletions
|
@ -26,13 +26,15 @@ configure_depot_yarn() {
|
|||
}
|
||||
|
||||
configure_depot_nodejs() {
|
||||
NODE_VERSION=16.x
|
||||
NODE_VERSION=16
|
||||
[ ! "$1" == "" ] && NODE_VERSION=$1
|
||||
grep -q 16.x /etc/apt/sources.list.d/nodesource.list
|
||||
XNODE_VERSION=${NODE_VERSION}.x
|
||||
grep -q ${XNODE_VERSION} /etc/apt/sources.list.d/nodesource.list
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
wget -qO - https://deb.nodesource.com/setup_${NODE_VERSION} | bash
|
||||
wget -qO - https://deb.nodesource.com/setup_${XNODE_VERSION} | bash
|
||||
fi
|
||||
echo -e "Package: nodejs\\nPin: version ${NODE_VERSION}.*\\nPin-Priority: 1000" > /etc/apt/preferences.d/nodejs
|
||||
}
|
||||
|
||||
install_go() {
|
||||
|
|
|
@ -49,6 +49,7 @@ zdebmaker_inject(){
|
|||
sudo mkdir ${MOUNT_PATH}/${APP}/tmp/dist/
|
||||
[ -d ${MOUNT_PATH}/${APP}/tmp/src ] && sudo rm -rf ${MOUNT_PATH}/${APP}/tmp/src/
|
||||
sudo mkdir -p ${MOUNT_PATH}/${APP}/tmp/src
|
||||
sudo echo . /tmp/src/exec_in_chroot.sh | sudo tee ${MOUNT_PATH}/${APP}/root/.bashrc
|
||||
sudo cp -pfr ressources/${APP}/* ${MOUNT_PATH}/${APP}/tmp/src
|
||||
sudo cp lib/exec_in_chroot.sh ${MOUNT_PATH}/${APP}/tmp/src
|
||||
sudo find ${MOUNT_PATH}/${APP}/tmp/src -name .gitkeep -exec rm {} \;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
VERSION=0.108.0-b.20
|
||||
VERSION=0.108.0-b.21
|
||||
APP=adguardhome
|
||||
DEPOT=https://github.com/AdguardTeam/AdGuardHome.git
|
||||
GIT_VERSION=v${VERSION}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
VERSION=2.1.11
|
||||
VERSION=2.1.26
|
||||
APP=budibase
|
||||
DEPOT=https://github.com/Budibase/budibase.git
|
||||
GIT_VERSION=v${VERSION}
|
||||
|
|
|
@ -19,7 +19,7 @@ main(){
|
|||
|
||||
envinit() {
|
||||
configure_depot_yarn
|
||||
configure_depot_nodejs 14.x
|
||||
configure_depot_nodejs 14
|
||||
install_package_dependency
|
||||
npm install -g lerna
|
||||
}
|
||||
|
|
15
ressources/crfpp/README.MD
Normal file
15
ressources/crfpp/README.MD
Normal file
|
@ -0,0 +1,15 @@
|
|||
#### crfpp
|
||||
|
||||
##### Information
|
||||
Site : https://taku910.github.io/crfpp
|
||||
|
||||
Source : https://github.com/taku910/crfpp
|
||||
|
||||
##### Install
|
||||
|
||||
```bash
|
||||
apt install -y wget ca-certificates
|
||||
wget -qO - https://deb.lgy.fr/install.sh | bash
|
||||
apt-get update
|
||||
apt-get install -y crfpp
|
||||
```
|
32
ressources/crfpp/debmaker
Executable file
32
ressources/crfpp/debmaker
Executable file
|
@ -0,0 +1,32 @@
|
|||
#!/bin/bash
|
||||
|
||||
VERSION=0.59
|
||||
APP=crfpp
|
||||
DEPOT=https://github.com/2pc/crfpp.git
|
||||
GIT_VERSION=last
|
||||
DEB_VERSION=$VERSION-$(date +%Y%m%d%H%M)
|
||||
DEBIAN_VERSION_CODENAME=bullseye
|
||||
IMAGE_SIZE=1
|
||||
PACKAGE_DEPENDENCY="build-essential autoconf"
|
||||
|
||||
main(){
|
||||
base_package_upgrade
|
||||
install_package_dependency
|
||||
get_git_source
|
||||
build
|
||||
makedeb
|
||||
}
|
||||
|
||||
build() {
|
||||
cd /tmp/${APP}
|
||||
sed -i 's/#include "winmain.h"//' crf_*.cpp
|
||||
./configure --prefix=/tmp/src/rootfs/usr
|
||||
make install
|
||||
}
|
||||
|
||||
makedeb(){
|
||||
PATH_DEB=/tmp/src/rootfs
|
||||
|
||||
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
|
||||
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
|
||||
}
|
0
ressources/crfpp/rootfs/DEBIAN/changelog
Normal file
0
ressources/crfpp/rootfs/DEBIAN/changelog
Normal file
7
ressources/crfpp/rootfs/DEBIAN/control
Normal file
7
ressources/crfpp/rootfs/DEBIAN/control
Normal file
|
@ -0,0 +1,7 @@
|
|||
Package: crfpp
|
||||
Version: %VERSION%
|
||||
Section: contrib
|
||||
Priority: optional
|
||||
Architecture: all
|
||||
Maintainer: Thomas Legay <thomas@lgy.fr>
|
||||
Description: crfpp
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
VERSION=1.11.13
|
||||
VERSION=1.11.14
|
||||
APP=element-web
|
||||
DEPOT=https://github.com/vector-im/element-web.git
|
||||
GIT_VERSION=v${VERSION}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
VERSION=10.0.3
|
||||
VERSION=10.0.5
|
||||
APP=glpi
|
||||
DEPOT=https://github.com/glpi-project/glpi.git
|
||||
GIT_VERSION=${VERSION}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
VERSION=3.3.1
|
||||
VERSION=3.3.2
|
||||
APP=grocy
|
||||
DEPOT=https://github.com/grocy/grocy.git
|
||||
GIT_VERSION=v$VERSION
|
||||
DEB_VERSION=${VERSION}-$(date +%Y%m%d%H%M)
|
||||
DEBIAN_VERSION_CODENAME=sid
|
||||
DEBIAN_VERSION_CODENAME=bookworm
|
||||
IMAGE_SIZE=4
|
||||
|
||||
STEP="base_package_upgrade envinit get_git_source build makedeb"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
VERSION=2.9.12
|
||||
VERSION=2.9.16
|
||||
APP=joplin-desktop
|
||||
GIT_VERSION=v${VERSION}
|
||||
DEB_VERSION=$VERSION-$(date +%Y%m%d%H%M)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
VERSION=2.9.5
|
||||
VERSION=2.9.7
|
||||
APP=joplin-server
|
||||
GIT_VERSION=server-v${VERSION}
|
||||
DEB_VERSION=$VERSION-$(date +%Y%m%d%H%M)
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
mautrix-whatsapp (0.7.2) UNRELEASED; urgency=medium
|
||||
|
||||
* First deb version
|
||||
|
||||
-- Thomas Legay <thomas@lgy.fr> Mon, 17 Sep 2022 21:08:37 +0200
|
||||
|
||||
mautrix-whatsapp (0.7.1) UNRELEASED; urgency=medium
|
||||
|
||||
* First deb version
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
VERSION=0.7.1
|
||||
VERSION=0.7.2
|
||||
APP=mautrix-whatsapp
|
||||
DEPOT=https://github.com/mautrix/whatsapp.git
|
||||
GIT_VERSION=v${VERSION}
|
||||
|
|
19
ressources/mealie/README.MD
Normal file
19
ressources/mealie/README.MD
Normal file
|
@ -0,0 +1,19 @@
|
|||
#### mealie
|
||||
|
||||
##### Information
|
||||
Site : https://mealie.io/
|
||||
|
||||
Source : https://github.com/hay-kot/mealie
|
||||
|
||||
##### Install
|
||||
|
||||
```bash
|
||||
apt install -y wget ca-certificates
|
||||
wget -qO - https://deb.lgy.fr/install.sh | bash
|
||||
apt-get update
|
||||
apt-get install -y mealie
|
||||
|
||||
#Edit /etc/default/mealie-api and /etc/default/mealie-frontend
|
||||
|
||||
systemctl enable --now mealie-api mealie-frontend
|
||||
```
|
77
ressources/mealie/debmaker
Executable file
77
ressources/mealie/debmaker
Executable file
|
@ -0,0 +1,77 @@
|
|||
#!/bin/bash
|
||||
|
||||
VERSION=1.0.0
|
||||
APP=mealie
|
||||
DEPOT=https://github.com/hay-kot/mealie.git
|
||||
GIT_VERSION=last
|
||||
DEB_VERSION=${VERSION}-$(date +%Y%m%d%H%M)
|
||||
DEBIAN_VERSION_CODENAME=bookworm
|
||||
IMAGE_SIZE=6
|
||||
PACKAGE_DEPENDENCY="curl build-essential libpq-dev libwebp-dev libsasl2-dev libldap2-dev libssl-dev gnupg2 python3-pip python3-dev git wget ca-certificates python3-poetry python3-cachecontrol nodejs yarn"
|
||||
|
||||
main(){
|
||||
base_package_upgrade
|
||||
configure_depot_nodejs
|
||||
configure_depot_yarn
|
||||
install_package_dependency
|
||||
get_git_source
|
||||
build_frontend
|
||||
build_api
|
||||
makedeb_frontend
|
||||
makedeb_api
|
||||
}
|
||||
|
||||
build_frontend() {
|
||||
cd /tmp/${APP}/frontend
|
||||
|
||||
yarn install
|
||||
yarn build
|
||||
rm -fr node_modules/
|
||||
NODE_ENV=production yarn install
|
||||
}
|
||||
|
||||
build_api() {
|
||||
cd /tmp/${APP}/
|
||||
|
||||
export PYTHONUNBUFFERED=1
|
||||
export PYTHONDONTWRITEBYTECODE=1
|
||||
export PIP_NO_CACHE_DIR=off
|
||||
export PIP_DISABLE_PIP_VERSION_CHECK=on
|
||||
export PIP_DEFAULT_TIMEOUT=100
|
||||
export POETRY_VIRTUALENVS_IN_PROJECT=true
|
||||
export POETRY_NO_INTERACTION=1
|
||||
export VENV_PATH="/usr/share/mealie/.venv"
|
||||
|
||||
[ -e /usr/share/mealie ] && rm -fr /usr/share/mealie
|
||||
mkdir /usr/share/mealie
|
||||
mv mealie/ alembic* poetry.lock gunicorn_conf.py pyproject.toml /usr/share/mealie
|
||||
cd /usr/share/mealie
|
||||
poetry install -E pgsql --no-dev
|
||||
|
||||
export PRODUCTION=true
|
||||
/usr/share/mealie/.venv/bin/python /usr/share/mealie/mealie/scripts/install_model.py
|
||||
|
||||
}
|
||||
|
||||
makedeb_frontend(){
|
||||
PATH_DEB=/tmp/src/rootfs-frontend
|
||||
|
||||
mkdir -p ${PATH_DEB}/usr/share/mealie/
|
||||
cp -fr /tmp/${APP}/frontend ${PATH_DEB}/usr/share/mealie/
|
||||
|
||||
mkdir -p ${PATH_DEB}/var/lib/mealie/api
|
||||
ln -s /usr/share/mealie/alembic ${PATH_DEB}/var/lib/mealie/api/alembic
|
||||
|
||||
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
|
||||
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
|
||||
}
|
||||
|
||||
makedeb_api(){
|
||||
PATH_DEB=/tmp/src/rootfs-api
|
||||
|
||||
mkdir -p ${PATH_DEB}/usr/share/
|
||||
cp -fr /usr/share/mealie ${PATH_DEB}/usr/share/
|
||||
|
||||
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
|
||||
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
|
||||
}
|
0
ressources/mealie/rootfs-api/DEBIAN/changelog
Normal file
0
ressources/mealie/rootfs-api/DEBIAN/changelog
Normal file
1
ressources/mealie/rootfs-api/DEBIAN/conffiles
Normal file
1
ressources/mealie/rootfs-api/DEBIAN/conffiles
Normal file
|
@ -0,0 +1 @@
|
|||
/etc/default/mealie-api
|
7
ressources/mealie/rootfs-api/DEBIAN/control
Normal file
7
ressources/mealie/rootfs-api/DEBIAN/control
Normal file
|
@ -0,0 +1,7 @@
|
|||
Package: mealie-api
|
||||
Version: %VERSION%
|
||||
Section: contrib
|
||||
Priority: optional
|
||||
Architecture: all
|
||||
Maintainer: Thomas Legay <thomas@lgy.fr>
|
||||
Description: mealie-api
|
19
ressources/mealie/rootfs-api/DEBIAN/postinst
Executable file
19
ressources/mealie/rootfs-api/DEBIAN/postinst
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
APP=mealie-api
|
||||
HOMEDIR=/var/lib/mealie/api
|
||||
|
||||
[ -d ${HOMEDIR} ] || mkdir -p ${HOMEDIR}
|
||||
id ${APP} &> /dev/null || useradd ${APP} -r -s /bin/false -d ${HOMEDIR}
|
||||
|
||||
chown ${APP}:${APP} ${HOMEDIR}
|
||||
|
||||
systemctl | grep ${APP} | grep -q running && systemctl daemon-reload && systemctl restart ${APP}
|
||||
|
||||
if [[ $(systemctl list-unit-files | grep ${APP}.services) -eq 0 ]]
|
||||
then
|
||||
systemctl daemon-reload
|
||||
if [ "$(systemctl is-active ${APP}.service)" != "inactive" ]
|
||||
then
|
||||
systemctl restart ${APP}
|
||||
fi
|
||||
fi
|
46
ressources/mealie/rootfs-api/etc/default/mealie-api
Normal file
46
ressources/mealie/rootfs-api/etc/default/mealie-api
Normal file
|
@ -0,0 +1,46 @@
|
|||
PRODUCTION=true
|
||||
TESTING=false
|
||||
BASE_DIR=/usr/share/mealie
|
||||
DATA_DIR=/var/lib/mealie/api
|
||||
|
||||
ALLOW_SIGNUP=false
|
||||
API_PORT=9000
|
||||
API_DOCS=true
|
||||
SECURITY_MAX_LOGIN_ATTEMPTS=5
|
||||
SECURITY_USER_LOCKOUT_TIME=24
|
||||
TOKEN_TIME=48
|
||||
|
||||
DB_ENGINE=sqlite # Optional='sqlite', 'postgres'
|
||||
|
||||
# =====================================
|
||||
# Postgres Config
|
||||
POSTGRES_USER=mealie
|
||||
POSTGRES_PASSWORD=mealie
|
||||
POSTGRES_SERVER=postgres
|
||||
POSTGRES_PORT=5432
|
||||
POSTGRES_DB=mealie
|
||||
|
||||
# =====================================
|
||||
# Web Concurrency
|
||||
WEB_GUNICORN=true
|
||||
WORKERS_PER_CORE=0.5
|
||||
MAX_WORKERS=1
|
||||
WEB_CONCURRENCY=1
|
||||
|
||||
# =====================================
|
||||
# Email configuration
|
||||
# SMTP_HOST=
|
||||
# SMTP_PORT=587
|
||||
# SMTP_FROM_NAME=Mealie
|
||||
# SMTP_AUTH_STRATEGY=TLS # Options='TLS', 'SSL', 'NONE'
|
||||
# SMTP_FROM_EMAIL=
|
||||
# SMTP_USER=
|
||||
# SMTP_PASSWORD=
|
||||
|
||||
#LDAP_AUTH_ENABLED=
|
||||
#LDAP_SERVER_URL=
|
||||
#LDAP_TLS_INSECURE=
|
||||
#LDAP_TLS_CACERTFILE=
|
||||
#LDAP_BIND_TEMPLATE=
|
||||
#LDAP_BASE_DN=
|
||||
#LDAP_ADMIN_FILTER=
|
3
ressources/mealie/rootfs-api/usr/bin/mealie-api
Executable file
3
ressources/mealie/rootfs-api/usr/bin/mealie-api
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!usr/bin/env bash
|
||||
/usr/share/mealie/.venv/bin/python /usr/share/mealie/mealie/db/init_db.py
|
||||
/usr/share/mealie/.venv/bin/uvicorn mealie.app:app --host 0.0.0.0
|
|
@ -0,0 +1,16 @@
|
|||
[Unit]
|
||||
Description=mealie-api
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
User=mealie-api
|
||||
Group=mealie-api
|
||||
EnvironmentFile=/etc/default/mealie-api
|
||||
ExecStart=/usr/bin/mealie-api
|
||||
WorkingDirectory=/var/lib/mealie/api
|
||||
SyslogIdentifier=mealie-api
|
||||
Restart=on-failure
|
||||
RestartSec=30s
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
0
ressources/mealie/rootfs-frontend/DEBIAN/changelog
Normal file
0
ressources/mealie/rootfs-frontend/DEBIAN/changelog
Normal file
1
ressources/mealie/rootfs-frontend/DEBIAN/conffiles
Normal file
1
ressources/mealie/rootfs-frontend/DEBIAN/conffiles
Normal file
|
@ -0,0 +1 @@
|
|||
/etc/default/mealie-frontend
|
7
ressources/mealie/rootfs-frontend/DEBIAN/control
Normal file
7
ressources/mealie/rootfs-frontend/DEBIAN/control
Normal file
|
@ -0,0 +1,7 @@
|
|||
Package: mealie-frontend
|
||||
Version: %VERSION%
|
||||
Section: contrib
|
||||
Priority: optional
|
||||
Architecture: all
|
||||
Maintainer: Thomas Legay <thomas@lgy.fr>
|
||||
Description: mealie-frontend
|
19
ressources/mealie/rootfs-frontend/DEBIAN/postinst
Executable file
19
ressources/mealie/rootfs-frontend/DEBIAN/postinst
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
APP=mealie-frontend
|
||||
HOMEDIR=/var/lib/mealie/frontend
|
||||
|
||||
[ -d ${HOMEDIR} ] || mkdir -p ${HOMEDIR}
|
||||
id ${APP} &> /dev/null || useradd ${APP} -r -s /bin/false -d ${HOMEDIR}
|
||||
|
||||
chown ${APP}:${APP} ${HOMEDIR}
|
||||
|
||||
systemctl | grep ${APP} | grep -q running && systemctl daemon-reload && systemctl restart ${APP}
|
||||
|
||||
if [[ $(systemctl list-unit-files | grep ${APP}.services) -eq 0 ]]
|
||||
then
|
||||
systemctl daemon-reload
|
||||
if [ "$(systemctl is-active ${APP}.service)" != "inactive" ]
|
||||
then
|
||||
systemctl restart ${APP}
|
||||
fi
|
||||
fi
|
|
@ -0,0 +1,19 @@
|
|||
NODE_ENV=production
|
||||
#API_URL=http://mealie-api:9000
|
||||
API_URL=http://localhost:9000
|
||||
|
||||
THEME_LIGHT_PRIMARY=#E58325
|
||||
THEME_LIGHT_ACCENT=#007A99
|
||||
THEME_LIGHT_SECONDARY=#973542
|
||||
THEME_LIGHT_SUCCESS=#43A047
|
||||
THEME_LIGHT_INFO=#1976D2
|
||||
THEME_LIGHT_WARNING=#FF6D00
|
||||
THEME_LIGHT_ERROR=#EF5350
|
||||
|
||||
THEME_DARK_PRIMARY=#E58325
|
||||
THEME_DARK_ACCENT=#007A99
|
||||
THEME_DARK_SECONDARY=#973542
|
||||
THEME_DARK_SUCCESS=#43A047
|
||||
THEME_DARK_INFO=#1976D2
|
||||
THEME_DARK_WARNING=#FF6D00
|
||||
THEME_DARK_ERROR=#EF5350
|
|
@ -0,0 +1,16 @@
|
|||
[Unit]
|
||||
Description=mealie-frontend
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
User=mealie-frontend
|
||||
Group=mealie-frontend
|
||||
EnvironmentFile=/etc/default/mealie-frontend
|
||||
ExecStart=node ./node_modules/nuxt/bin/nuxt.js start -H 0.0.0.0
|
||||
WorkingDirectory=/usr/share/mealie/frontend/
|
||||
SyslogIdentifier=mealie-frontend
|
||||
Restart=on-failure
|
||||
RestartSec=30s
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -6,7 +6,7 @@ id ${APP} &> /dev/null || useradd ${APP} -r -s /bin/false -d /var/lib/${APP}
|
|||
chown ${APP}:${APP} /var/lib/${APP}/
|
||||
chown ${APP}:${APP} /var/lib/${APP}/*
|
||||
|
||||
if [[ $(systemctl list-unit-files | grep picapport.services) -eq 0 ]]
|
||||
if [[ $(systemctl list-unit-files | grep ${APP}.services) -eq 0 ]]
|
||||
then
|
||||
systemctl daemon-reload
|
||||
if [ "$(systemctl is-active ${APP}.service)" != "inactive" ]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
VERSION=1.28.1
|
||||
VERSION=1.28.2
|
||||
APP=zigbee2mqtt
|
||||
DEPOT=https://github.com/Koenkk/zigbee2mqtt.git
|
||||
GIT_VERSION=${VERSION}
|
||||
|
|
Loading…
Reference in a new issue