Remove DB credentials from config.php

Better validation when config.php does not exist

Update docs and quote password

only populate legacy vars in config_to_json
drop .travis.yml config copy
remove credentials from config.php.default

Check for existance of .env instead of config.php in python scripts

legacy credential cleanup

tiny cleanups

consistent env for artisan server and artisan dusk
This commit is contained in:
Tony Murray
2019-05-22 13:31:24 -05:00
parent b9bd2b3d08
commit 5f0388f0e3
20 changed files with 67 additions and 211 deletions

View File

@@ -28,22 +28,25 @@ Log files created by LibreNMS will be stored within this directory.
# Database config
These are the configuration options you will need to use to specify to get started.
Set these variables either in .env or in the environment.
```php
$config['db_host'] = '127.0.0.1';
$config['db_port'] = 3306;
$config['db_user'] = '';
$config['db_pass'] = '';
$config['db_name'] = '';
```dotenv
DB_HOST=127.0.0.1
DB_DATABASE=librenms
DB_USERNAME=DBUSER
DB_PASSWORD="DBPASS"
```
If you use a unix socket, you can specify it with these options:
Use non-standard port:
```php
$config['db_host'] = NULL;
$config['db_port'] = NULL;
$config['db_socket'] = '/run/mysqld/mysqld.sock';
```dotenv
DB_PORT=3306
```
Use a unix socket:
```dotenv
DB_SOCKET=/run/mysqld/mysqld.sock
```
# Core

View File

@@ -531,20 +531,11 @@ menu similarly to device types.
If you've changed your database credentials then you will need to
update LibreNMS with those new details.
Please edit both `config.php` and `.env`
config.php:
```php
$config['db_host'] = '';
$config['db_user'] = '';
$config['db_pass'] = '';
$config['db_name'] = '';
```
Please edit `.env`
[.env](../Support/Environment-Variables.md#database):
```bash
```dotenv
DB_HOST=
DB_DATABASE=
DB_USERNAME=