From 309263bf03acdf0e7602394802c5d93a51b4b5f1 Mon Sep 17 00:00:00 2001 From: Oliver Date: Thu, 21 Mar 2024 09:56:56 +1100 Subject: [PATCH] Tz docs (#6771) * Add docs about timezone * Add note on INVENTREE_AUTO_UPDATE * Enable auto-update in config template * Revert change to config_template.yaml --- docker.dev.env | 2 +- docs/docs/start/config.md | 19 ++++++++++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/docker.dev.env b/docker.dev.env index 966efdcee9..72162b2a26 100644 --- a/docker.dev.env +++ b/docker.dev.env @@ -19,4 +19,4 @@ INVENTREE_DB_PASSWORD=pgpassword INVENTREE_PLUGINS_ENABLED=True # Auto run migrations? -INVENTREE_AUTO_UPDATE=False +INVENTREE_AUTO_UPDATE=True diff --git a/docs/docs/start/config.md b/docs/docs/start/config.md index 84bb47526c..84453714ee 100644 --- a/docs/docs/start/config.md +++ b/docs/docs/start/config.md @@ -48,18 +48,31 @@ The following basic options are available: | Environment Variable | Configuration File | Description | Default | | --- | --- | --- | --- | +| INVENTREE_SITE_URL | site_url | Specify a fixed site URL | *Not specified* | | INVENTREE_DEBUG | debug | Enable [debug mode](./intro.md#debug-mode) | True | | INVENTREE_LOG_LEVEL | log_level | Set level of logging to terminal | WARNING | | INVENTREE_DB_LOGGING | db_logging | Enable logging of database messages | False | | INVENTREE_TIMEZONE | timezone | Server timezone | UTC | -| INVENTREE_SITE_URL | site_url | Specify a fixed site URL | *Not specified* | | INVENTREE_ADMIN_ENABLED | admin_enabled | Enable the [django administrator interface]({% include "django.html" %}/ref/contrib/admin/) | True | | INVENTREE_ADMIN_URL | admin_url | URL for accessing [admin interface](../settings/admin.md) | admin | | INVENTREE_LANGUAGE | language | Default language | en-us | | INVENTREE_AUTO_UPDATE | auto_update | Database migrations will be run automatically | False | -!!! tip "INVENTREE_SITE_URL" - The *INVENTREE_SITE_URL* option defines the base URL for the InvenTree server. This is a critical setting, and it is required for correct operation of the server. If not specified, the server will attempt to determine the site URL automatically - but this may not always be correct! +### Site URL + +The *INVENTREE_SITE_URL* option defines the base URL for the InvenTree server. This is a critical setting, and it is required for correct operation of the server. If not specified, the server will attempt to determine the site URL automatically - but this may not always be correct! + +### Timezone + +By default, the InvenTree server is configured to use the UTC timezone. This can be adjusted to your desired local timezone. You can refer to [Wikipedia](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) for a list of available timezones. Use the values specified in the *TZ Identifier* column in the linked page. + +Date and time values are stored in the database in UTC format, and are converted to the selected timezone for display in the user interface or API. + +### Auto Update + +By default, the InvenTree server will not automatically apply database migrations. When the InvenTree installation is updated (*or a plugin is installed which requires database migrations*), database migrations must be applied manually by the system administrator. + +With "auto update" enabled, the InvenTree server will automatically apply database migrations as required. To enable automatic database updates, set `INVENTREE_AUTO_UPDATE` to `True`. ## Server Access