PROVISION UID

This commit is contained in:
CHIEFSOFT\ameye
2025-08-08 20:48:42 -04:00
parent 48665f7380
commit a00e37f5b9
6 changed files with 7 additions and 6 deletions
@@ -10,7 +10,7 @@ services:
- ./writable:/var/www/html/writable:Z
- ./apache_log:/var/log/apache2:Z
environment:
- PROVISION_UID=PROVISION_UID
- PROVISION_UID=PROVISION_UID_REPLACE
# - APACHE_RUN_USER=1000
# - APACHE_RUN_GROUP=1000
networks:
@@ -10,7 +10,7 @@ services:
- ./writable:/var/www/html/writable:Z
- ./apache_log:/var/log/apache2:Z
environment:
- PROVISION_UID=PROVISION_UID
- PROVISION_UID=PROVISION_UID_REPLACE
# - APACHE_RUN_USER=1000
# - APACHE_RUN_GROUP=1000
networks:
@@ -13,7 +13,7 @@ services:
WORDPRESS_DB_USER: CNT_DB_NAME
WORDPRESS_DB_PASSWORD: CNT_DB_PASS
WORDPRESS_DB_NAME: CNT_DB_NAME
PROVISION_UID: PROVISION_UID
PROVISION_UID: PROVISION_UID_REPLACE
networks:
- wpsite
@@ -13,7 +13,7 @@ services:
WORDPRESS_DB_USER: CNT_DB_NAME
WORDPRESS_DB_PASSWORD: CNT_DB_PASS
WORDPRESS_DB_NAME: CNT_DB_NAME
PROVISION_UID: PROVISION_UID
PROVISION_UID: PROVISION_UID_REPLACE
networks:
- wpsite
@@ -13,7 +13,7 @@ services:
WORDPRESS_DB_USER: CNT_DB_NAME
WORDPRESS_DB_PASSWORD: CNT_DB_PASS
WORDPRESS_DB_NAME: CNT_DB_NAME
PROVISION_UID: PROVISION_UID
PROVISION_UID: PROVISION_UID_REPLACE
networks:
- wpsite
+2 -1
View File
@@ -176,6 +176,7 @@ class Provision extends BaseController
$composer_template_contents = str_replace("CNT_DB_NAME", $ContainerName, $composer_template_contents);
$composer_template_contents = str_replace("CNT_DB_PASS", $provisionUID, $composer_template_contents);
$composer_template_contents = str_replace("CNT_DB_DATA", '172.16.4.96:3307', $composer_template_contents);
$composer_template_contents = str_replace("PROVISION_UID_REPLACE", $provisionUID, $composer_template_contents);
//Save to the specific path
$destination_composer_path = $ansible_folder . "/parts/" . $provisionUID . "/docker-compose.yml";
@@ -369,7 +370,7 @@ class Provision extends BaseController
$composer_template_contents = str_replace("CNT_DB_NAME", $ContainerName, $composer_template_contents);
$composer_template_contents = str_replace("CNT_DB_PASS", $provisionUID, $composer_template_contents);
$composer_template_contents = str_replace("CNT_DB_DATA", '172.16.4.96:3307', $composer_template_contents);
$composer_template_contents = str_replace("PROVISION_UID_REPLACE", $provisionUID, $composer_template_contents);
//Save to the specific path
$composerFile = fopen($destination_composer_path, "w") or die("Unable to open file!");
fwrite($composerFile, $composer_template_contents);