mirror of
https://github.com/directus/directus.git
synced 2026-01-22 21:58:04 -05:00
@@ -14,8 +14,11 @@ const connectionConfig: Record<string, any> = getConfigFromEnv('DB_', [
|
||||
'DB_CLIENT',
|
||||
'DB_SEARCH_PATH',
|
||||
'DB_CONNECTION_STRING',
|
||||
'DB_POOL',
|
||||
]);
|
||||
|
||||
const poolConfig = getConfigFromEnv('DB_POOL');
|
||||
|
||||
const knexConfig: Config = {
|
||||
client: env.DB_CLIENT,
|
||||
searchPath: env.DB_SEARCH_PATH,
|
||||
@@ -26,6 +29,7 @@ const knexConfig: Config = {
|
||||
deprecate: (msg) => logger.info(msg),
|
||||
debug: (msg) => logger.debug(msg),
|
||||
},
|
||||
pool: poolConfig,
|
||||
};
|
||||
|
||||
if (env.DB_CLIENT === 'sqlite3') {
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
| `DB_PASSWORD` | Database user's password. **Required** when using `pg`, `mysql`, `oracledb`, or `mssql`. | -- |
|
||||
| `DB_FILENAME` | Where to read/write the SQLite database. **Required** when using `sqlite3`. | -- |
|
||||
| `DB_CONNECTION_STRING` | When using `pg`, you can submit a connection string instead of individual properties. Using this will ignore any of the other connection settings. | -- |
|
||||
| `DB_POOL_*` | Pooling settings. Passed on to [the `tarn.js`](https://github.com/vincit/tarn.js#usage) library. | -- |
|
||||
|
||||
::: tip Additional Database Variables
|
||||
|
||||
@@ -37,6 +38,13 @@ database instance.
|
||||
|
||||
:::
|
||||
|
||||
::: tip Pooling
|
||||
|
||||
All the `DB_POOL_` prefixed options are passed [to `tarn.js`](https://github.com/vincit/tarn.js#usage) through
|
||||
[Knex](http://knexjs.org/#Installation-pooling)
|
||||
|
||||
:::
|
||||
|
||||
## Security
|
||||
|
||||
| Variable | Description | Default Value |
|
||||
|
||||
Reference in New Issue
Block a user