feat: move SQL connection parameters into Env. vars
This commit is contained in:
parent
a7a7c738ec
commit
f02e6b3168
2 changed files with 7 additions and 1 deletions
|
@ -5,6 +5,11 @@ services:
|
|||
dockerfile: docker_dev/Dockerfile
|
||||
ports:
|
||||
- 8081:80
|
||||
environment:
|
||||
MYSQL_HOST: mysql
|
||||
MYSQL_USER: root
|
||||
MYSQL_PASSWORD: example
|
||||
MYSQL_DATABASE: dragon_fire
|
||||
develop:
|
||||
watch:
|
||||
- path: ./
|
||||
|
|
|
@ -7,7 +7,8 @@ class MySQLAdapter {
|
|||
public $data_directory;
|
||||
|
||||
function __construct() {
|
||||
$this->raw = mysqli_connect('mysql', 'root', 'example', 'dragon_fire');
|
||||
$this->raw = mysqli_connect(getenv('MYSQL_HOST'),
|
||||
getenv('MYSQL_USER'), getenv('MYSQL_PASSWORD'), getenv('MYSQL_DATABASE'));
|
||||
|
||||
$this->data_directory = 'raw';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue