From 30fc01c5778593f2e1d4581baff103729c78937a Mon Sep 17 00:00:00 2001 From: thomas Date: Wed, 23 Feb 2022 00:07:32 +0100 Subject: [PATCH] first release grocy remove standardnotes-web --- README.MD | 21 ++++++++++++ ressources/gotify/rootfs/DEBIAN/postinst | 1 + ressources/grocy/grocy | 4 +-- .../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 ---------- .../standardnotes-web/standardnotes-web | 32 ------------------- standardnotes-web2deb | 10 ------ 11 files changed, 24 insertions(+), 98 deletions(-) delete mode 100644 ressources/standardnotes-web/rootfs/DEBIAN/changelog delete mode 100644 ressources/standardnotes-web/rootfs/DEBIAN/conffiles delete mode 100644 ressources/standardnotes-web/rootfs/DEBIAN/control delete mode 100755 ressources/standardnotes-web/rootfs/DEBIAN/postinst delete mode 100644 ressources/standardnotes-web/rootfs/etc/default/standardnotes-web delete mode 100644 ressources/standardnotes-web/rootfs/etc/systemd/system/standardnotes-web.service delete mode 100755 ressources/standardnotes-web/standardnotes-web delete mode 100755 standardnotes-web2deb diff --git a/README.MD b/README.MD index 960c312..c3c65f9 100644 --- a/README.MD +++ b/README.MD @@ -16,6 +16,7 @@ debmake_runAllStep - [element-web](#element-web) - [gotify](#gotify) + - [grocy](#grocy) - [joplin-server](#joplin-server) - [rss-bridge](#rss-bridge) - [vaultwarden and vaultwarden-web](#vaultwarden-and-vaultwarden-web) @@ -52,6 +53,26 @@ apt-get install -y gotify-server systemctl enable --now gotify ``` +#### grocy + +```bash +apt install -y python wget ca-certificates +wget -qO - https://deb.lgy.fr/install.sh | bash +apt-get update +apt-get install -y grocy + +#Edit /etc/grocy/config.php + +# sample configuration for apache2 + php fpm +apt install apache2 php-fpm +a2enmod proxy_fcgi setenvif rewrite +a2enconf php8.1-fpm +cp /usr/share/doc/grocy/apache2-grocy.conf /etc/apache2/sites-available/grocy.conf +a2ensite grocy +systemctl restart apache2 + +``` + #### joplin-server ```bash diff --git a/ressources/gotify/rootfs/DEBIAN/postinst b/ressources/gotify/rootfs/DEBIAN/postinst index 9644513..4752511 100755 --- a/ressources/gotify/rootfs/DEBIAN/postinst +++ b/ressources/gotify/rootfs/DEBIAN/postinst @@ -2,3 +2,4 @@ id gotify &> /dev/null || useradd gotify -r -s /bin/false -md /var/lib/gotify +chown -R www-data:www-data /var/lib/grocy/data/ diff --git a/ressources/grocy/grocy b/ressources/grocy/grocy index 2f3efcf..4e56a49 100755 --- a/ressources/grocy/grocy +++ b/ressources/grocy/grocy @@ -3,7 +3,7 @@ STEP="envinit prebuild build makedeb" envinit() { - apt-get install -y --no-install-recommends wget ca-certificates gnupg2 composer git php-simplexml php-gd fakeroot dpkg + apt-get install -y --no-install-recommends wget ca-certificates gnupg2 composer git php-simplexml php-gd fakeroot dpkg unzip 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 @@ -32,7 +32,7 @@ makedeb(){ cp ${PATH_DEB}/usr/share/grocy/config-dist.php ${PATH_DEB}/etc/grocy/config.php mv ${PATH_DEB}/usr/share/grocy/data ${PATH_DEB}/var/lib/grocy/ ln -s /var/lib/grocy/data/ ${PATH_DEB}/usr/share/grocy/data - ln -s /etc/grocy/config.php ${PATH_DEB}/usr/share/grocy/config.php + ln -s /etc/grocy/config.php ${PATH_DEB}/usr/share/grocy/data/config.php sed -i "s/%VERSION%/$DEB_VERSION/" /tmp/dist/rootfs/DEBIAN/control fakeroot dpkg-deb -Z gzip --build /tmp/dist/rootfs/ /tmp/dist/ } diff --git a/ressources/standardnotes-web/rootfs/DEBIAN/changelog b/ressources/standardnotes-web/rootfs/DEBIAN/changelog deleted file mode 100644 index e69de29..0000000 diff --git a/ressources/standardnotes-web/rootfs/DEBIAN/conffiles b/ressources/standardnotes-web/rootfs/DEBIAN/conffiles deleted file mode 100644 index 612d780..0000000 --- a/ressources/standardnotes-web/rootfs/DEBIAN/conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/default/standardnotes-web diff --git a/ressources/standardnotes-web/rootfs/DEBIAN/control b/ressources/standardnotes-web/rootfs/DEBIAN/control deleted file mode 100644 index 66e32f4..0000000 --- a/ressources/standardnotes-web/rootfs/DEBIAN/control +++ /dev/null @@ -1,8 +0,0 @@ -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 deleted file mode 100755 index d1a21c6..0000000 --- a/ressources/standardnotes-web/rootfs/DEBIAN/postinst +++ /dev/null @@ -1,4 +0,0 @@ -#!/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 deleted file mode 100644 index e2534b3..0000000 --- a/ressources/standardnotes-web/rootfs/etc/default/standardnotes-web +++ /dev/null @@ -1,25 +0,0 @@ -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 deleted file mode 100644 index 3c6bac7..0000000 --- a/ressources/standardnotes-web/rootfs/etc/systemd/system/standardnotes-web.service +++ /dev/null @@ -1,16 +0,0 @@ -[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/standardnotes-web/standardnotes-web b/ressources/standardnotes-web/standardnotes-web deleted file mode 100755 index 55f9abe..0000000 --- a/ressources/standardnotes-web/standardnotes-web +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash - -STEP="envinit prebuild build makedeb" - -envinit() { - apt install -y --no-install-recommends 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 -} - -prebuild(){ - GIT_VERSION=$1 - git clone --depth 1 -b ${GIT_VERSION} https://github.com/standardnotes/web.git /tmp/web -} - -build() { - cd /tmp/web - PATH=$PATH:/tmp/web/bin - npm install - npm run build -} - -makedeb(){ - GIT_VERSION=$1 - DEB_VERSION=$2 - PATH_DEB=/tmp/dist/rootfs - - cp -fr /tmp/web/* ${PATH_DEB}/usr/lib/standardnotes/web/ -} diff --git a/standardnotes-web2deb b/standardnotes-web2deb deleted file mode 100755 index ef6836d..0000000 --- a/standardnotes-web2deb +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -APP=standardnotes-web -VERSION=10.9.0 -GIT_VERSION=$VERSION -DEB_VERSION=$VERSION-1 -DEBIAN_VERSION_CODENAME=bullseye -IMAGE_SIZE= - -source ./lib/function.sh