- Configures `max_open` and `max_idle` in default configs to `25`.
This changes the previous behaviour of connection pooling where both the
values were unset (from default config) and causes unbounded connection
limit and no connection reuse.
- Configures `db.SetConnMaxLifetime` which sets the maximum time the
connection can be reused in a pool.
- Sets `max_conn_lifetime` in default config as `5 minutes`.
Closes https://github.com/knadh/listmonk/issues/225
This PR adds `config-demo.toml` to `Dockerfile` which uses the db host
`demo-db`. This is more suited for demo setups. For normal docker installations
the db host is changed back to `db` which is a better sane default.
Reworded `INSTALL.md` and `README.md` for more clarity on docker
installation and configuration.