2017-04-15 23:16:20 +02:00
< ? php
2018-12-23 16:45:16 +01:00
# Settings can also be overwritten in two ways
#
# First priority
# A .txt file with the same name as the setting in /data/settingoverrides
# the content of the file is used as the setting value
#
# Second priority
# An environment variable with the same name as the setting and prefix "GROCY_"
# so for example "GROCY_BASE_URL"
#
# Third priority
# The settings defined here below
2019-09-21 15:07:29 +02:00
# Either "production", "dev", "demo" or "prerelease"
2020-01-05 09:11:11 +01:00
# When not "production", authentication will be disabled and
# demo data will be populated during database migrations
2018-07-12 19:12:31 +02:00
Setting ( 'MODE' , 'production' );
2018-04-18 19:03:39 +02:00
2019-09-19 17:46:52 +02:00
# Either "en" or "de" or the directory name of
# one of the other available localization folders in the "/localization" directory
2018-07-12 19:12:31 +02:00
Setting ( 'CULTURE' , 'en' );
2018-04-18 19:03:39 +02:00
2019-07-06 20:19:21 +02:00
# This is used to define the first day of a week for calendar views in the frontend,
# leave empty to use the locale default
# Needs to be a number where Sunday = 0, Monday = 1 and so forth
Setting ( 'CALENDAR_FIRST_DAY_OF_WEEK' , '' );
2019-09-18 18:30:25 +02:00
# If calendars should show week numbers
Setting ( 'CALENDAR_SHOW_WEEK_OF_YEAR' , true );
2018-09-30 03:31:16 -04:00
# To keep it simple: grocy does not handle any currency conversions,
2018-07-26 20:27:38 +02:00
# this here is used to format all money values,
2020-01-25 20:01:40 +01:00
# so doesn't really matter, but should be the
2019-03-09 16:04:03 +01:00
# ISO 4217 code of the currency ("USD", "EUR", "GBP", etc.)
Setting ( 'CURRENCY' , 'USD' );
2018-07-26 20:27:38 +02:00
2020-03-06 20:41:00 +01:00
# When running grocy in a subdirectory, this should be set to the relative path, otherwise empty
# Example:
# Webserver root directory = /var/www
# grocy directory = /var/www/grocy
# => BASE_PATH = /grocy
Setting ( 'BASE_PATH' , '' );
2018-04-18 19:03:39 +02:00
# The base url of your installation,
# should be just "/" when running directly under the root of a (sub)domain
2019-03-03 14:47:38 +01:00
# or for example "https://example.com/grocy" when using a subdirectory
2018-07-12 19:12:31 +02:00
Setting ( 'BASE_URL' , '/' );
2018-04-22 19:47:46 +02:00
# The plugin to use for external barcode lookups,
# must be the filename without .php extension and must be located in /data/plugins,
# see /data/plugins/DemoBarcodeLookupPlugin.php for an example implementation
2018-07-12 19:12:31 +02:00
Setting ( 'STOCK_BARCODE_LOOKUP_PLUGIN' , 'DemoBarcodeLookupPlugin' );
2018-06-15 20:50:40 +02:00
2019-09-19 17:46:52 +02:00
# If, however, your webserver does not support URL rewriting, set this to true
2018-07-12 19:12:31 +02:00
Setting ( 'DISABLE_URL_REWRITING' , false );
2018-09-30 17:14:04 +02:00
2019-09-19 17:46:52 +02:00
# Specify an custom homepage if desired - by default the homepage will be set to the stock overview,
# this needs to be one of the following values:
2019-09-25 13:11:20 +02:00
# stock, shoppinglist, recipes, chores, tasks, batteries, equipment, calendar, mealplan
2019-06-22 16:02:52 +02:00
Setting ( 'ENTRY_PAGE' , 'stock' );
2019-03-01 19:33:33 +01:00
2019-07-06 18:29:18 +02:00
# Set this to true if you want to disable authentication / the login screen,
# places where user context is needed will then use the default (first existing) user
Setting ( 'DISABLE_AUTH' , false );
2019-09-19 12:48:02 +02:00
# 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 );
2020-01-25 20:01:40 +01:00
# Set this if you want to have a different start day for the weekly meal plan view,
# leave empty to use CALENDAR_FIRST_DAY_OF_WEEK (see above)
# Needs to be a number where Sunday = 0, Monday = 1 and so forth
Setting ( 'MEAL_PLAN_FIRST_DAY_OF_WEEK' , '' );
2019-09-19 17:46:52 +02:00
2018-09-30 17:14:04 +02:00
# 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
# Night mode related
DefaultUserSetting ( 'night_mode_enabled' , false ); // If night mode is enabled always
DefaultUserSetting ( 'auto_night_mode_enabled' , false ); // If night mode is enabled automatically when inside a given time range (see the two settings below)
DefaultUserSetting ( 'auto_night_mode_time_range_from' , " 20:00 " ); // Format HH:mm
DefaultUserSetting ( 'auto_night_mode_time_range_to' , " 07:00 " ); // Format HH:mm
2018-09-30 18:02:59 +02:00
DefaultUserSetting ( 'auto_night_mode_time_range_goes_over_midnight' , true ); // If the time range above goes over midnight
2018-09-30 19:31:03 +02:00
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)
2019-04-20 15:30:45 +02:00
2020-01-05 10:03:02 +01:00
# Keep screen on settings
DefaultUserSetting ( 'keep_screen_on' , false ); // Keep the screen always on
DefaultUserSetting ( 'keep_screen_on_when_fullscreen_card' , false ); // Keep the screen on when a "fullscreen-card" is displayed
2019-04-20 15:30:45 +02:00
# Stock settings
2018-10-20 14:55:49 +02:00
DefaultUserSetting ( 'product_presets_location_id' , - 1 ); // Default location id for new products (-1 means no location is preset)
DefaultUserSetting ( 'product_presets_product_group_id' , - 1 ); // Default product group id for new products (-1 means no product group is preset)
DefaultUserSetting ( 'product_presets_qu_id' , - 1 ); // Default quantity unit id for new products (-1 means no quantity unit is preset)
2019-04-20 15:30:45 +02:00
DefaultUserSetting ( 'stock_expring_soon_days' , 5 );
2019-05-04 13:19:34 +02:00
DefaultUserSetting ( 'stock_default_purchase_amount' , 0 );
DefaultUserSetting ( 'stock_default_consume_amount' , 1 );
2020-01-26 15:35:01 +01:00
DefaultUserSetting ( 'scan_mode_consume_enabled' , false );
DefaultUserSetting ( 'scan_mode_purchase_enabled' , false );
2019-04-20 15:30:45 +02:00
2020-02-01 12:54:05 +01:00
# Shopping list settings
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 best before days" set
DefaultUserSetting ( 'shopping_list_show_calendar' , false );
2020-02-09 15:36:03 +01:00
DefaultUserSetting ( 'shopping_list_disable_auto_compact_view_on_mobile' , false );
2020-02-01 12:54:05 +01:00
2020-02-10 18:24:15 +01:00
# Recipe settings
DefaultUserSetting ( 'recipe_ingredients_group_by_product_group' , false ); // Group recipe ingredients by their product group
2019-04-20 15:30:45 +02:00
# Chores settings
DefaultUserSetting ( 'chores_due_soon_days' , 5 );
# Batteries settings
DefaultUserSetting ( 'batteries_due_soon_days' , 5 );
# Tasks settings
DefaultUserSetting ( 'tasks_due_soon_days' , 5 );
2018-09-30 17:14:04 +02:00
# If the page should be automatically reloaded when there was
# an external change
DefaultUserSetting ( 'auto_reload_on_db_change' , true );
2018-11-20 19:23:48 +01:00
# Show a clock in the header next to the logo or not
DefaultUserSetting ( 'show_clock_in_header' , false );
2018-11-21 19:08:36 +01:00
2019-03-01 19:33:33 +01:00
# 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
# which you don't need to have a less cluttered UI
# (set the setting to "false" to disable the corresponding part, which should be self explanatory)
2019-05-03 20:03:04 +02:00
Setting ( 'FEATURE_FLAG_STOCK' , true );
2019-03-01 19:33:33 +01:00
Setting ( 'FEATURE_FLAG_SHOPPINGLIST' , true );
Setting ( 'FEATURE_FLAG_RECIPES' , true );
Setting ( 'FEATURE_FLAG_CHORES' , true );
Setting ( 'FEATURE_FLAG_TASKS' , true );
Setting ( 'FEATURE_FLAG_BATTERIES' , true );
Setting ( 'FEATURE_FLAG_EQUIPMENT' , true );
Setting ( 'FEATURE_FLAG_CALENDAR' , true );
2019-09-19 17:46:52 +02:00
2019-09-19 18:11:03 +02:00
2019-09-19 17:46:52 +02:00
# Sub feature flags
Setting ( 'FEATURE_FLAG_STOCK_PRICE_TRACKING' , true );
Setting ( 'FEATURE_FLAG_STOCK_LOCATION_TRACKING' , true );
Setting ( 'FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_TRACKING' , true );
Setting ( 'FEATURE_FLAG_STOCK_PRODUCT_OPENED_TRACKING' , true );
2020-01-26 20:01:30 +01:00
Setting ( 'FEATURE_FLAG_STOCK_PRODUCT_FREEZING' , true );
2020-03-25 20:32:37 +01:00
Setting ( 'FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_FIELD_NUMBER_PAD' , true ); // Activate the number pad in best-before-date fields on (supported) mobile browsers
2019-10-05 13:10:56 +02:00
Setting ( 'FEATURE_FLAG_SHOPPINGLIST_MULTIPLE_LISTS' , true );
2019-09-26 17:20:25 +02:00
Setting ( 'FEATURE_FLAG_CHORES_ASSIGNMENTS' , true );
2019-09-19 18:11:03 +02:00
# Feature settings
Setting ( 'FEATURE_SETTING_STOCK_COUNT_OPENED_PRODUCTS_AGAINST_MINIMUM_STOCK_AMOUNT' , true ); // When set to false, opened products will not be considered for minimum stock amounts
2020-03-29 14:25:04 +02:00
Setting ( 'FEATURE_FLAG_AUTO_TORCH_ON_WITH_CAMERA' , true ); // Enables the torch automaticaly in every camera barcode scanner.