NoPaste

cat /var/www/grocy/data/config.php

von McAldo
SNIPPET_DESC:
grocy*.zip nach /var/www/grocy entpackt
SNIPPET_CREATION_TIME:
23.03.2021 10:04:37
SNIPPET_PRUNE_TIME:
22.04.2021 11:04:37

SNIPPET_TEXT:
  1. // Settings can also be overwritten in two ways
  2. //
  3. // First priority
  4. // A .txt file with the same name as the setting in /data/settingoverrides
  5. // the content of the file is used as the setting value
  6. //
  7. // Second priority
  8. // An environment variable with the same name as the setting and prefix "GROCY_"
  9. // so for example "GROCY_BASE_URL"
  10. //
  11. // Third priority
  12. // The settings defined here below
  13.  
  14. // Either "production", "dev", "demo" or "prerelease"
  15. // When not "production", authentication will be disabled and
  16. // demo data will be populated during database migrations
  17. Setting('MODE', 'production');
  18.  
  19. // Either "en" or "de" or the directory name of
  20. // one of the other available localization folders in the "/localization" directory
  21. Setting('DEFAULT_LOCALE', 'de');
  22.  
  23. // This is used to define the first day of a week for calendar views in the frontend,
  24. // leave empty to use the locale default
  25. // Needs to be a number where Sunday = 0, Monday = 1 and so forth
  26. Setting('CALENDAR_FIRST_DAY_OF_WEEK', '1');
  27.  
  28. // If calendars should show week numbers
  29. Setting('CALENDAR_SHOW_WEEK_OF_YEAR', true);
  30.  
  31. // To keep it simple: grocy does not handle any currency conversions,
  32. // this here is used to format all money values,
  33. // so doesn't really matter, but should be the
  34. // ISO 4217 code of the currency ("USD", "EUR", "GBP", etc.)
  35. Setting('CURRENCY', 'EUR');
  36.  
  37. // When running grocy in a subdirectory, this should be set to the relative path, otherwise empty
  38. // It needs to be set to the part (of the URL) after the document root,
  39. // if URL rewriting is disabled, including index.php
  40. // Example with URL Rewriting support:
  41. //  Root URL = https://example.com/grocy
  42. //  => BASE_PATH = /grocy
  43. // Example without URL Rewriting support:
  44. //  Root URL = https://example.com/grocy/public/index.php/
  45. //  => BASE_PATH = /grocy/public/index.php
  46. Setting('BASE_PATH', '');
  47.  
  48. // The base URL of your installation,
  49. // should be just "/" when running directly under the root of a (sub)domain
  50. // or for example "https://example.com/grocy" when using a subdirectory
  51. Setting('BASE_URL', '/');
  52.  
  53. // The plugin to use for external barcode lookups,
  54. // must be the filename without .php extension and must be located in /data/plugins,
  55. // see /data/plugins/DemoBarcodeLookupPlugin.php for an example implementation
  56. Setting('STOCK_BARCODE_LOOKUP_PLUGIN', 'DemoBarcodeLookupPlugin');
  57.  
  58. // If, however, your webserver does not support URL rewriting, set this to true
  59. Setting('DISABLE_URL_REWRITING', false);
  60.  
  61. // Specify an custom homepage if desired - by default the homepage will be set to the stock overview page,
  62. // this needs to be one of the following values:
  63. // stock, shoppinglist, recipes, chores, tasks, batteries, equipment, calendar, mealplan
  64. Setting('ENTRY_PAGE', 'stock');
  65.  
  66. // Set this to true if you want to disable authentication / the login screen,
  67. // places where user context is needed will then use the default (first existing) user
  68. Setting('DISABLE_AUTH', false);
  69.  
  70. // Either "Grocy\Middleware\DefaultAuthMiddleware", "Grocy\Middleware\ReverseProxyAuthMiddleware"
  71. // or any class that implements Grocy\Middleware\AuthMiddleware
  72. Setting('AUTH_CLASS', 'Grocy\Middleware\DefaultAuthMiddleware');
  73.  
  74. // When using ReverseProxyAuthMiddleware,
  75. // the name of the HTTP header which your reverse proxy uses to pass the username (on successful authentication)
  76. Setting('REVERSE_PROXY_AUTH_HEADER', 'REMOTE_USER');
  77.  
  78. // When using LdapAuthMiddleware
  79. Setting('LDAP_DOMAIN', ''); // Example value "local"
  80. Setting('LDAP_ADDRESS', ''); // Example value "ldap://vm-dc2019.local.berrnd.net"
  81. Setting('LDAP_BASE_DN', ''); // Example value "OU=OU_Users,DC=local,DC=berrnd,DC=net"
  82.  
  83. // Set this to true if you want to disable the ability to scan a barcode via the device camera (Browser API)
  84. Setting('DISABLE_BROWSER_BARCODE_CAMERA_SCANNING', false);
  85.  
  86. // Set this if you want to have a different start day for the weekly meal plan view,
  87. // leave empty to use CALENDAR_FIRST_DAY_OF_WEEK (see above)
  88. // Needs to be a number where Sunday = 0, Monday = 1 and so forth
  89. Setting('MEAL_PLAN_FIRST_DAY_OF_WEEK', '1');
  90.  
  91. // Default permissions for new users
  92. // the array needs to contain the technical/constant names
  93. // see the file controllers/Users/User.php for possible values
  94. Setting('DEFAULT_PERMISSIONS', ['ADMIN']);
  95.  
  96. // Default user settings
  97. // These settings can be changed per user, here the defaults
  98. // are defined which are used when the user has not changed the setting so far
  99.  
  100. // Night mode related
  101. DefaultUserSetting('night_mode_enabled', false); // If night mode is enabled always
  102. DefaultUserSetting('auto_night_mode_enabled', false); // If night mode is enabled automatically when inside a given time range (see the two settings below)
  103. DefaultUserSetting('auto_night_mode_time_range_from', '20:00'); // Format HH:mm
  104. DefaultUserSetting('auto_night_mode_time_range_to', '07:00'); // Format HH:mm
  105. DefaultUserSetting('auto_night_mode_time_range_goes_over_midnight', true); // If the time range above goes over midnight
  106. DefaultUserSetting('currently_inside_night_mode_range', false); // If we're currently inside of night mode time range (this is not user configurable, but stored as a user setting because it's evaluated client side to be able to use the client time instead of the maybe different server time)
  107.  
  108. // Keep screen on settings
  109. DefaultUserSetting('keep_screen_on', true); // Keep the screen always on
  110. DefaultUserSetting('keep_screen_on_when_fullscreen_card', false); // Keep the screen on when a "fullscreen-card" is displayed
  111.  
  112. // Stock settings
  113. DefaultUserSetting('product_presets_location_id', -1); // Default location id for new products (-1 means no location is preset)
  114. DefaultUserSetting('product_presets_product_group_id', -1); // Default product group id for new products (-1 means no product group is preset)
  115. DefaultUserSetting('product_presets_qu_id', -1); // Default quantity unit id for new products (-1 means no quantity unit is preset)
  116. DefaultUserSetting('stock_decimal_places_amounts', 4); // Default decimal places allowed for amounts
  117. DefaultUserSetting('stock_decimal_places_prices', 2); // Default decimal places allowed for prices
  118. DefaultUserSetting('stock_due_soon_days', 5);
  119. DefaultUserSetting('stock_default_purchase_amount', 0);
  120. DefaultUserSetting('stock_default_consume_amount', 1);
  121. DefaultUserSetting('stock_default_consume_amount_use_quick_consume_amount', false);
  122. DefaultUserSetting('scan_mode_consume_enabled', false);
  123. DefaultUserSetting('scan_mode_purchase_enabled', false);
  124. DefaultUserSetting('show_icon_on_stock_overview_page_when_product_is_on_shopping_list', true);
  125. DefaultUserSetting('show_purchased_date_on_purchase', false); // Wheter the purchased date should be editable on purchase (defaults to today otherwise)
  126. 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
  127.  
  128. // Shopping list settings
  129. DefaultUserSetting('shopping_list_to_stock_workflow_auto_submit_when_prefilled', false); // Automatically do the booking using the last price and the amount of the shopping list item, if the product has "Default due days" set
  130. DefaultUserSetting('shopping_list_show_calendar', false);
  131.  
  132. // Recipe settings
  133. DefaultUserSetting('recipe_ingredients_group_by_product_group', false); // Group recipe ingredients by their product group
  134.  
  135. // Chores settings
  136. DefaultUserSetting('chores_due_soon_days', 5);
  137.  
  138. // Batteries settings
  139. DefaultUserSetting('batteries_due_soon_days', 5);
  140.  
  141. // Tasks settings
  142. DefaultUserSetting('tasks_due_soon_days', 5);
  143.  
  144. // If the page should be automatically reloaded when there was
  145. // an external change
  146. DefaultUserSetting('auto_reload_on_db_change', true);
  147.  
  148. // Show a clock in the header next to the logo or not
  149. DefaultUserSetting('show_clock_in_header', false);
  150.  
  151. // Component configuration for Quagga2 - read https://github.com/ericblade/quagga2#configobject for details
  152. // Below is a generic good configuration,
  153. // for an iPhone 7 Plus, halfsample = true, patchsize = small, frequency = 5 yields very good results
  154. DefaultUserSetting('quagga2_numofworkers', 4);
  155. DefaultUserSetting('quagga2_halfsample', false);
  156. DefaultUserSetting('quagga2_patchsize', 'medium');
  157. DefaultUserSetting('quagga2_frequency', 10);
  158. DefaultUserSetting('quagga2_debug', true);
  159.  
  160. // Feature flags
  161. // grocy was initially about "stock management for your household", many other things
  162. // came and still come by, because they are useful - here you can disable the parts
  163. // which you don't need to have a less cluttered UI
  164. // (set the setting to "false" to disable the corresponding part, which should be self explanatory)
  165. Setting('FEATURE_FLAG_STOCK', true);
  166. Setting('FEATURE_FLAG_SHOPPINGLIST', true);
  167. Setting('FEATURE_FLAG_RECIPES', true);
  168. Setting('FEATURE_FLAG_CHORES', true);
  169. Setting('FEATURE_FLAG_TASKS', true);
  170. Setting('FEATURE_FLAG_BATTERIES', true);
  171. Setting('FEATURE_FLAG_EQUIPMENT', true);
  172. Setting('FEATURE_FLAG_CALENDAR', true);
  173.  
  174. // Sub feature flags
  175. Setting('FEATURE_FLAG_STOCK_PRICE_TRACKING', true);
  176. Setting('FEATURE_FLAG_STOCK_LOCATION_TRACKING', true);
  177. Setting('FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_TRACKING', true);
  178. Setting('FEATURE_FLAG_STOCK_PRODUCT_OPENED_TRACKING', true);
  179. Setting('FEATURE_FLAG_STOCK_PRODUCT_FREEZING', true);
  180. Setting('FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_FIELD_NUMBER_PAD', true); // Activate the number pad in due date fields on (supported) mobile browsers
  181. Setting('FEATURE_FLAG_SHOPPINGLIST_MULTIPLE_LISTS', true);
  182. Setting('FEATURE_FLAG_CHORES_ASSIGNMENTS', true);
  183.  
  184. // Feature settings
  185. 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
  186. Setting('FEATURE_FLAG_AUTO_TORCH_ON_WITH_CAMERA', true); // Enables the torch automaticaly (if the device has one)

Quellcode

Hier kannst du den Code kopieren und ihn in deinen bevorzugten Editor einfügen. PASTEBIN_DOWNLOAD_SNIPPET_EXPLAIN