Used to set the application's time zone, defaults to the operating system's time zone.
https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
Time-related operations will be processed according to this time zone. Modifying TZ may affect the date values in the database. For details, see 'Date & Time Overview'
Application environment, default value is development. Options include:
production - Production environmentdevelopment - Development environmentThe application's secret key, used for generating user tokens, etc. Change it to your own application key and ensure it is not disclosed.
If APP_KEY is changed, old tokens will become invalid.
Application port, default value is 13000.
NocoBase API address prefix, default value is /api/.
v1.6.0+
Multi-core (cluster) startup mode. If this variable is configured, it will be passed through to the pm2 start command as the -i <instances> parameter. The options are consistent with the pm2 -i parameter (see PM2: Cluster Mode), including:
max: use the maximum number of CPU cores-1: use the maximum number of CPU cores minus 1<number>: specify the number of coresThe default value is empty, which means it is not enabled.
This mode needs to be used with cluster mode-related plugins, otherwise the application's functionality may be abnormal.
For more information, see: Cluster Mode.
Plugin package name prefix, defaults to: @nocobase/plugin-,@nocobase/preset-.
For example, to add the hello plugin to the my-nocobase-app project, the full package name of the plugin would be @my-nocobase-app/plugin-hello.
PLUGIN_PACKAGE_PREFIX can be configured as:
Then the mapping between plugin names and package names is as follows:
users plugin is @nocobase/plugin-usersnocobase plugin is @nocobase/preset-nocobasehello plugin is @my-nocobase-app/plugin-helloDatabase type, options include:
mariadbmysqlpostgresDatabase host (required when using MySQL or PostgreSQL database).
Default value is localhost.
Database port (required when using MySQL or PostgreSQL database).
Database name (required when using MySQL or PostgreSQL database).
Database user (required when using MySQL or PostgreSQL database).
Database password (required when using MySQL or PostgreSQL database).
Table prefix.
Whether to convert database table names and field names to snake case style, defaults to false. If you are using a MySQL (MariaDB) database and lower_case_table_names=1, then DB_UNDERSCORED must be true.
When DB_UNDERSCORED=true, the actual table and field names in the database will not be consistent with what is seen in the interface. For example, orderDetails in the database will be order_details.
Database logging switch, default value is off. Options include:
on - Enabledoff - DisabledLog output transport, multiple values are separated by ,. The default value in development environment is console, and in production environment is console,dailyRotateFile. Options:
console - console.logfile - FiledailyRotateFile - Daily rotating fileFile-based log storage path, defaults to storage/logs.
Output log level. The default value in development environment is debug, and in production environment is info. Options:
errorwarninfodebugtraceThe database log output level is debug, and whether it is output is controlled by DB_LOGGING, not affected by LOGGER_LEVEL.
Maximum number of log files to keep.
LOGGER_TRANSPORT is file, the default value is 10.LOGGER_TRANSPORT is dailyRotateFile, use [n]d to represent days. The default value is 14d.Rotate logs by size.
LOGGER_TRANSPORT is file, the unit is byte, and the default value is 20971520 (20 * 1024 * 1024).LOGGER_TRANSPORT is dailyRotateFile, you can use [n]k, [n]m, [n]g. Not configured by default.Log printing format. The default in development environment is console, and in production environment is json. Options:
consolejsonlogfmtdelimiterSee: Log Format
The unique identifier for the cache store to use, specifying the server-side default cache store. Default value is memory. Built-in options:
memoryredisMaximum number of items in memory cache, default value is 2000.
Redis connection, optional. Example: redis://localhost:6379
Enable telemetry data collection, defaults to off.
Enabled monitoring metric readers, defaults to console. Other values should refer to the registered names of the corresponding reader plugins, such as prometheus. Multiple values are separated by ,.
Enabled trace data processors, defaults to console. Other values should refer to the registered names of the corresponding processor plugins. Multiple values are separated by ,.