1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/grocy_ynh.git synced 2024-09-03 19:25:54 +02:00
This commit is contained in:
ericgaspar 2021-07-16 18:53:10 +02:00
parent b42e80dda0
commit cf71fc3b65
No known key found for this signature in database
GPG key ID: 574F281483054D44
7 changed files with 50 additions and 32 deletions

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/grocy/grocy/releases/download/v3.0.1/grocy_3.0.1.zip
SOURCE_SUM=623c6fd0b70b36da58b389ed05a9e8f4d531c1d5a01797ad03f33a85457339af
SOURCE_URL=https://github.com/grocy/grocy/releases/download/v3.1.0/grocy_3.1.0.zip
SOURCE_SUM=a21be24c8da7a7acfe4a357608349ca2e23c2e1d91bb8f82134d0a9604f8d22f
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=zip
SOURCE_IN_SUBDIR=false

View file

@ -77,10 +77,13 @@ Setting('AUTH_CLASS', 'Grocy\Middleware\DefaultAuthMiddleware');
// the name of the HTTP header which your reverse proxy uses to pass the username (on successful authentication)
Setting('REVERSE_PROXY_AUTH_HEADER', 'REMOTE_USER');
// When using LdapAuthMiddleware
Setting('LDAP_DOMAIN', 'local'); // Example value "local"
// LDAP options when using LdapAuthMiddleware
Setting('LDAP_ADDRESS', 'ldap://127.0.0.1:389'); // Example value "ldap://vm-dc2019.local.berrnd.net"
Setting('LDAP_BASE_DN', 'ou=users,dc=yunohost,dc=org'); // Example value "OU=OU_Users,DC=local,DC=berrnd,DC=net"
Setting('LDAP_BASE_DN', 'ou=users,dc=yunohost,dc=org'); // Example value "DC=local,DC=berrnd,DC=net"
Setting('LDAP_BIND_DN', ''); // Example value "CN=grocy_bind_account,OU=service_accounts,DC=local,DC=berrnd,DC=net"
Setting('LDAP_BIND_PW', ''); // Password for the above account
Setting('LDAP_USER_FILTER', ''); // Example value "(OU=grocy_users)"
Setting('LDAP_UID_ATTR', ''); // Windows AD: "sAMAccountName", OpenLDAP: "uid", GLAuth: "cn"
// Set this to true if you want to disable the ability to scan a barcode via the device camera (Browser API)
Setting('DISABLE_BROWSER_BARCODE_CAMERA_SCANNING', false);
@ -95,6 +98,34 @@ Setting('MEAL_PLAN_FIRST_DAY_OF_WEEK', '');
// see the file controllers/Users/User.php for possible values
Setting('DEFAULT_PERMISSIONS', ['ADMIN']);
// 1D (=> Code128) or 2D (=> DataMatrix)
Setting('GROCYCODE_TYPE', '1D');
// Label printer settings
// This is the URI that grocy will POST to when asked to print a label
Setting('LABEL_PRINTER_WEBHOOK', '');
// This setting decides whether the webhook will be called server- or clientside
// If the machine grocy runs on has a network connection to the host the webhook receiver is on, this is probably a good idea
// If, for example, grocy runs in the cloud and your printer daemon runs locally to you, set this to false to let your browser call the webhook instead
Setting('LABEL_PRINTER_RUN_SERVER', true);
// Additional parameters supplied to the webhook
Setting('LABEL_PRINTER_PARAMS', ['font_family' => 'Source Sans Pro (Regular)']);
// TRUE to use JSON or FALSE to use normal POST request variables
Setting('LABEL_PRINTER_HOOK_JSON', false);
// Thermal printer options
// Thermal printers are receipt printers, not regular printers,
// the printer must support the ESC/POS protocol, see https://github.com/mike42/escpos-php
Setting('TPRINTER_IS_NETWORK_PRINTER', false); // Set to true if it's' a network printer
Setting('TPRINTER_PRINT_QUANTITY_NAME', true); // Set to false if you do not want to print the quantity names (related to the shopping list)
Setting('TPRINTER_PRINT_NOTES', true); // Set to false if you do not want to print notes (related to the shopping list)
Setting('TPRINTER_IP', '127.0.0.1'); // IP of the network printer (does only matter if it's a network printer)
Setting('TPRINTER_PORT', 9100); // Port of the network printer
Setting('TPRINTER_CONNECTOR', '/dev/usb/lp0'); // Printer device (does only matter if you use a locally attached printer)
// For USB on Linux this is often '/dev/usb/lp0', for serial printers it could be similar to '/dev/ttyS0'
// Make sure that the user that runs the webserver has permissions to write to the printer - on Linux add your webserver user to the LP group with usermod -a -G lp www-data
// Default user settings
// These settings can be changed per user, here the defaults
// are defined which are used when the user has not changed the setting so far
@ -117,6 +148,7 @@ DefaultUserSetting('product_presets_product_group_id', -1); // Default product g
DefaultUserSetting('product_presets_qu_id', -1); // Default quantity unit id for new products (-1 means no quantity unit is preset)
DefaultUserSetting('stock_decimal_places_amounts', 4); // Default decimal places allowed for amounts
DefaultUserSetting('stock_decimal_places_prices', 2); // Default decimal places allowed for prices
DefaultUserSetting('stock_auto_decimal_separator_prices', false);
DefaultUserSetting('stock_due_soon_days', 5);
DefaultUserSetting('stock_default_purchase_amount', 0);
DefaultUserSetting('stock_default_consume_amount', 1);
@ -124,7 +156,7 @@ DefaultUserSetting('stock_default_consume_amount_use_quick_consume_amount', fals
DefaultUserSetting('scan_mode_consume_enabled', false);
DefaultUserSetting('scan_mode_purchase_enabled', false);
DefaultUserSetting('show_icon_on_stock_overview_page_when_product_is_on_shopping_list', true);
DefaultUserSetting('show_purchased_date_on_purchase', false); // Wheter the purchased date should be editable on purchase (defaults to today otherwise)
DefaultUserSetting('show_purchased_date_on_purchase', false); // Whether the purchased date should be editable on purchase (defaults to today otherwise)
DefaultUserSetting('show_warning_on_purchase_when_due_date_is_earlier_than_next', true); // Show a warning on purchase when the due date of the purchased product is earlier than the next due date in stock
// Shopping list settings
@ -143,9 +175,8 @@ DefaultUserSetting('batteries_due_soon_days', 5);
// Tasks settings
DefaultUserSetting('tasks_due_soon_days', 5);
// If the page should be automatically reloaded when there was
// an external change
DefaultUserSetting('auto_reload_on_db_change', true);
// If the page should be automatically reloaded when there was an external change
DefaultUserSetting('auto_reload_on_db_change', false);
// Show a clock in the header next to the logo or not
DefaultUserSetting('show_clock_in_header', false);
@ -159,6 +190,7 @@ DefaultUserSetting('quagga2_patchsize', 'medium');
DefaultUserSetting('quagga2_frequency', 10);
DefaultUserSetting('quagga2_debug', true);
// Feature flags
// grocy was initially about "stock management for your household", many other things
// came and still come by, because they are useful - here you can disable the parts
@ -172,6 +204,7 @@ Setting('FEATURE_FLAG_TASKS', true);
Setting('FEATURE_FLAG_BATTERIES', true);
Setting('FEATURE_FLAG_EQUIPMENT', true);
Setting('FEATURE_FLAG_CALENDAR', true);
Setting('FEATURE_FLAG_LABEL_PRINTER', false);
// Sub feature flags
Setting('FEATURE_FLAG_STOCK_PRICE_TRACKING', true);
@ -182,7 +215,8 @@ Setting('FEATURE_FLAG_STOCK_PRODUCT_FREEZING', true);
Setting('FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_FIELD_NUMBER_PAD', true); // Activate the number pad in due date fields on (supported) mobile browsers
Setting('FEATURE_FLAG_SHOPPINGLIST_MULTIPLE_LISTS', true);
Setting('FEATURE_FLAG_CHORES_ASSIGNMENTS', true);
Setting('FEATURE_FLAG_THERMAL_PRINTER', false);
// Feature settings
Setting('FEATURE_SETTING_STOCK_COUNT_OPENED_PRODUCTS_AGAINST_MINIMUM_STOCK_AMOUNT', true); // When set to true, opened items will be counted as missing for calculating if a product is below its minimum stock amount
Setting('FEATURE_FLAG_AUTO_TORCH_ON_WITH_CAMERA', true); // Enables the torch automaticaly (if the device has one)
Setting('FEATURE_FLAG_AUTO_TORCH_ON_WITH_CAMERA', true); // Enables the torch automatically (if the device has one)

View file

@ -6,7 +6,7 @@
"en": "Web-based groceries & household management solution for your home",
"fr": "Solution Web de gestion d'épicerie et de gestion de la maison"
},
"version": "3.0.1~ynh3",
"version": "3.1.0~ynh0",
"url": "https://grocy.info",
"upstream": {
"license": "MIT",
@ -25,7 +25,7 @@
"multi_instance": true,
"services": [
"nginx",
"php7.3-fpm"
"php8.0-fpm"
],
"arguments": {
"install": [{

View file

@ -1,16 +0,0 @@
## Problem
- *Description of why you made this PR*
## Solution
- *And how do you fix that problem*
## PR Status
- [ ] Code finished.
- [ ] Tested with Package_check.
- [ ] Fix or enhancement tested.
- [ ] Upgrade from last version tested.
- [ ] Can be reviewed and tested.
## Package_check results
---
* An automatic package_check will be launch at https://ci-apps-dev.yunohost.org/, when you add a specific comment to your Pull Request: "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!"*

View file

@ -4,9 +4,9 @@
# COMMON VARIABLES
#=================================================
YNH_PHP_VERSION="7.4"
YNH_PHP_VERSION="8.0"
extra_php_dependencies="php${YNH_PHP_VERSION}-fileinfo php${YNH_PHP_VERSION}-sqlite3 php${YNH_PHP_VERSION}-gd"
extra_php_dependencies="php${YNH_PHP_VERSION}-fileinfo php${YNH_PHP_VERSION}-sqlite3 php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-intl"
#=================================================
# PERSONAL HELPERS

View file

@ -25,7 +25,7 @@ app=$YNH_APP_INSTANCE_NAME
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
domain=$(ynh_app_setting_get --app=$app --key=domain)
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
phpversion=$YNH_PHP_VERSION
#=================================================
# DECLARE DATA AND CONF FILES TO BACKUP

View file

@ -83,7 +83,7 @@ ynh_script_progression --message="Configuring PHP-FPM..." --weight=3
# Create a dedicated PHP-FPM config
ynh_add_fpm_config --package="$extra_php_dependencies"
phpversion=$(ynh_app_setting_get --app="$app" --key=phpversion)
phpversion=$YNH_PHP_VERSION
#=================================================
# MODIFY A CONFIG FILE