41 lines
917 B
Markdown
41 lines
917 B
Markdown
# Configuration
|
|
|
|
The default config file is `config.yml`:
|
|
|
|
```yaml
|
|
driver: "mysql"
|
|
host: "localhost"
|
|
port: 3306
|
|
database: "primalix"
|
|
username: "root"
|
|
password: ""
|
|
adminDatabase: "postgres"
|
|
autoTransactions: true
|
|
|
|
pool:
|
|
maxPoolSize: 10
|
|
minIdle: 2
|
|
connectionTimeoutMs: 30000
|
|
idleTimeoutMs: 600000
|
|
maxLifetimeMs: 1800000
|
|
```
|
|
|
|
## Fields
|
|
|
|
- `driver`: `mysql` or `postgres`.
|
|
- `host`: database host.
|
|
- `port`: database port.
|
|
- `database`: default database name for the pool.
|
|
- `username`: login user.
|
|
- `password`: login password.
|
|
- `adminDatabase`: PostgreSQL admin database used for create/drop database.
|
|
- `autoTransactions`: wrap schema operations in a transaction when possible.
|
|
|
|
## Pool Options
|
|
|
|
- `maxPoolSize`: maximum connections in pool.
|
|
- `minIdle`: minimum idle connections.
|
|
- `connectionTimeoutMs`: connection timeout.
|
|
- `idleTimeoutMs`: idle timeout.
|
|
- `maxLifetimeMs`: maximum connection lifetime.
|