db user name and password are now configured by environment variables

This commit is contained in:
2022-06-20 12:18:38 +02:00
parent 417cc45018
commit e9fe05b78f
2 changed files with 5 additions and 2 deletions

View File

@@ -1,8 +1,8 @@
<?php
$dbhost = "mysql";
$dbuser = "grisu";
$dbpass = "secret";
$dbuser = $_ENV['DB_USER_NAME'];
$dbpass = $_ENV['DB_PASS'];
$dbname = "ksp";
try {

View File

@@ -16,6 +16,9 @@ services:
dockerfile: PHP.Dockerfile
volumes:
- ./app:/app
environment:
DB_USER_NAME: 'grisu'
DB_PASS: 'secret'
mysql:
image: mariadb:latest
environment: