diff --git a/ANSIBLE/templates/composers/A000003/docker-compose.yml b/ANSIBLE/templates/composers/A000003/docker-compose.yml index 01e04ed..2724fa5 100644 --- a/ANSIBLE/templates/composers/A000003/docker-compose.yml +++ b/ANSIBLE/templates/composers/A000003/docker-compose.yml @@ -10,7 +10,7 @@ services: volumes: ['DESTINATION_FOLDER:/var/www/html'] environment: WORDPRESS_DB_HOST: CNT_DB_DATA - WORDPRESS_DB_USER: CNT_DB_NAME + WORDPRESS_DB_USER: CNT_DB_USER_NAME WORDPRESS_DB_PASSWORD: CNT_DB_PASS WORDPRESS_DB_NAME: CNT_DB_NAME PROVISION_UID: PROVISION_UID_REPLACE diff --git a/ANSIBLE/templates/composers/A000004/docker-compose.yml b/ANSIBLE/templates/composers/A000004/docker-compose.yml index aa0d135..55d1a9f 100644 --- a/ANSIBLE/templates/composers/A000004/docker-compose.yml +++ b/ANSIBLE/templates/composers/A000004/docker-compose.yml @@ -10,7 +10,7 @@ services: volumes: ['DESTINATION_FOLDER:/var/www/html'] environment: WORDPRESS_DB_HOST: CNT_DB_DATA - WORDPRESS_DB_USER: CNT_DB_NAME + WORDPRESS_DB_USER: CNT_DB_USER_NAME WORDPRESS_DB_PASSWORD: CNT_DB_PASS WORDPRESS_DB_NAME: CNT_DB_NAME PROVISION_UID: PROVISION_UID_REPLACE diff --git a/app/Controllers/Provision.php b/app/Controllers/Provision.php index 6e06f63..6b13402 100644 --- a/app/Controllers/Provision.php +++ b/app/Controllers/Provision.php @@ -364,13 +364,15 @@ class Provision extends BaseController $SITE_CONTACT_GATEWAY = $_ENV['SITE_CONTACT_GATEWAY']; $MYSQL_PROVISION_DATABASE_PORT = $_ENV['PROVISION_MSQL_DATABASE_IP'] . ":" . $_ENV['PROVISION_MSQL_DATABASE_PORT']; // "172.16.4.96:3307"; $destinationHomeFolder = $_ENV['DESTINATION_HOME_FOLDER'] . $ContainerName; - $CNT_DB_NAME = $this->generatedBlogDatabaseName($productId, $provID); + $CNT_DB_NAME = $this->generatedBlogDatabaseName($productId, $provID) + $CNT_DB_USER_NAME = "bloguser"; //$templateRandom = 'P' . rand(1, 6); $composer_template_contents = str_replace("WHAT_CONTAINER_NAME", $ContainerName, $composer_template_contents); $composer_template_contents = str_replace("DESTINATION_FOLDER", $destinationHomeFolder, $composer_template_contents); $composer_template_contents = str_replace("ALLOCATED_PORT", $allocatedPort, $composer_template_contents); // $composer_template_contents = str_replace("CNT_DB_NAME", $ContainerName, $composer_template_contents); $composer_template_contents = str_replace("CNT_DB_NAME", $CNT_DB_NAME, $composer_template_contents); + $composer_template_contents = str_replace("CNT_DB_USER_NAME", $CNT_DB_USER_NAME, $composer_template_contents); $composer_template_contents = str_replace("CNT_DB_PASS", $provisionUID, $composer_template_contents); $composer_template_contents = str_replace("CNT_DB_DATA", $MYSQL_PROVISION_DATABASE_PORT, $composer_template_contents); $composer_template_contents = str_replace("PROVISION_UID_REPLACE", $provisionUID, $composer_template_contents);