diff --git a/.gitignore b/.gitignore index d982b65d..6280a9a6 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,6 @@ /app/templates_c/*.txt /app/templates_c/*.doc /app/templates_c/*.docx +/mysql-int/hispmd_dev.sql +/src/hispmddb/ +/src/*.sql diff --git a/Dockerfile b/Dockerfile index 23ff47b2..70a0a6e8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -55,6 +55,7 @@ RUN apt-get update && \ intl \ pdo_mysql \ pdo_pgsql \ + pgsql \ pdo_sqlite \ soap \ zip \ diff --git a/api/database/restore.php b/api/database/restore.php index 64a4e0dd..03e2cf27 100644 --- a/api/database/restore.php +++ b/api/database/restore.php @@ -26,13 +26,38 @@ exit; } -// Command to execute pg_restore inside the Docker container -$command = "docker exec -i $containerName sh -c \"PGPASSWORD='$dbPassword' pg_restore -h $dbHost -U $dbUser -d $dbName -v /tmp/$backupFile\" < $backupFilePath"; +// Check if the database exists +$checkDbCommand = "docker exec -i $containerName sh -c \"PGPASSWORD='$dbPassword' psql -h $dbHost -U $dbUser -tAc 'SELECT 1 FROM pg_database WHERE datname = \"$dbName\"'\""; +exec($checkDbCommand, $output, $return_var); -// Execute the command -$output = []; -$return_var = 0; -exec($command . ' 2>&1', $output, $return_var); +$databaseExists = trim(implode("\n", $output)) === '1'; + + +// Drop all tables and other objects in the public schema +$dropAllCommand = "docker exec -i $containerName sh -c \"PGPASSWORD='$dbPassword' psql -h $dbHost -U $dbUser -d $dbName -c 'DROP SCHEMA IF EXISTS public CASCADE; CREATE SCHEMA public;'\""; +exec($dropAllCommand . ' 2>&1', $output, $return_var); + +if ($return_var !== 0) { + echo "Error dropping schema. Details:\n"; + echo implode("\n", $output); + exit; +} + + + +// Copy the backup file to the Docker container +$copyBackupCommand = "docker cp $backupFilePath $containerName:/tmp/$backupFile"; +exec($copyBackupCommand . ' 2>&1', $output, $return_var); + +if ($return_var !== 0) { + echo "Error copying backup file to Docker container. Details:\n"; + echo implode("\n", $output); + exit; +} + +// Restore the backup +$restoreCommand = "docker exec -i $containerName sh -c \"PGPASSWORD='$dbPassword' pg_restore -h $dbHost -U $dbUser -d $dbName -v /tmp/$backupFile\""; +exec($restoreCommand . ' 2>&1', $output, $return_var); if ($return_var === 0) { echo "Backup successfully restored: $backupFilePath"; diff --git a/api/database/restores.php b/api/database/restores.php index 74619c09..5ba19663 100644 --- a/api/database/restores.php +++ b/api/database/restores.php @@ -26,13 +26,38 @@ exit; } -// Command to execute pg_restore inside the Docker container -$command = "docker exec -i $containerName sh -c \"PGPASSWORD='$dbPassword' pg_restore -h $dbHost -U $dbUser -d $dbName -v /tmp/$backupFile\" < $backupFilePath"; +// Check if the database exists +$checkDbCommand = "docker exec -i $containerName sh -c \"PGPASSWORD='$dbPassword' psql -h $dbHost -U $dbUser -tAc 'SELECT 1 FROM pg_database WHERE datname = \"$dbName\"'\""; +exec($checkDbCommand, $output, $return_var); -// Execute the command -$output = []; -$return_var = 0; -exec($command . ' 2>&1', $output, $return_var); +$databaseExists = trim(implode("\n", $output)) === '1'; + + +// Drop all tables and other objects in the public schema +$dropAllCommand = "docker exec -i $containerName sh -c \"PGPASSWORD='$dbPassword' psql -h $dbHost -U $dbUser -d $dbName -c 'DROP SCHEMA IF EXISTS public CASCADE; CREATE SCHEMA public;'\""; +exec($dropAllCommand . ' 2>&1', $output, $return_var); + +if ($return_var !== 0) { + echo "Error dropping schema. Details:\n"; + echo implode("\n", $output); + exit; +} + + + +// Copy the backup file to the Docker container +$copyBackupCommand = "docker cp $backupFilePath $containerName:/tmp/$backupFile"; +exec($copyBackupCommand . ' 2>&1', $output, $return_var); + +if ($return_var !== 0) { + echo "Error copying backup file to Docker container. Details:\n"; + echo implode("\n", $output); + exit; +} + +// Restore the backup +$restoreCommand = "docker exec -i $containerName sh -c \"PGPASSWORD='$dbPassword' pg_restore -h $dbHost -U $dbUser -d $dbName -v /tmp/$backupFile\""; +exec($restoreCommand . ' 2>&1', $output, $return_var); if ($return_var === 0) { echo "Backup successfully restored: $backupFilePath"; diff --git a/app/include/appsettings.php b/app/include/appsettings.php index 20e1c084..d8610676 100644 --- a/app/include/appsettings.php +++ b/app/include/appsettings.php @@ -740,9 +740,9 @@ $strLastSQL = ""; $showCustomMarkerOnPrint = false; -$projectBuildKey = "511_1724336618"; +$projectBuildKey = "515_1724336618"; $wizardBuildKey = "39558"; -$projectBuildNumber = "511"; +$projectBuildNumber = "515"; $mlang_messages = array(); $mlang_charsets = array(); @@ -958,39 +958,39 @@ // here goes EVENT_INIT_APP event - -//********** Insert a record into another table ************ - +//********** Insert a record into another table ************ + // here goes EVENT_INIT_APP event -$currentDateTimeForDb = localdatetime2db( runner_date_format("m-d-y H:i:s") ); +$currentDateTimeForDb = localdatetime2db(runner_date_format("m-d-y H:i:s")); + // receiving AJAX request with the new page URL // in timetracker table we create a new record // and return the TrackerID value of the new record -if( postvalue("pageOpen") != false ){ - $data = array(); - $data["pagename"] = postvalue("pageName"); - $data["timeon"] = $currentDateTimeForDb; - $data["userID"] = Security::getUserName(); - if(postvalue("recordID") != false){ - $data["recordID"] = postvalue("recordID"); - } - DB::Insert("timetracker", $data); - //return TrackerID - echo DB::LastId(); - exit(); - +if (postvalue("pageOpen") != false) { + $data = array(); + $data["pagename"] = postvalue("pageName"); + $data["timeon"] = $currentDateTimeForDb; + $data["userid"] = Security::getUserName(); // Changed to userid + if (postvalue("recordID") != false) { + $data["recordid"] = postvalue("recordID"); // Changed to recordid + } + DB::Insert("timetracker", $data); + //return TrackerID + echo DB::LastId(); + exit(); } -// receiving AJAX request that tell us we are still on the same pageпродолжается + +// receiving AJAX request that tells us we are still on the same page // we just update the value of timeoff field for the current TrackerID -if( postvalue("TrackerID") !=false ){ - $now_datetime = $currentDateTimeForDb; - DB::Update("timetracker",array("timeoff"=> $now_datetime ),array("trackerId" => postvalue("TrackerID") )); - exit(); +if (postvalue("TrackerID") != false) { + $now_datetime = $currentDateTimeForDb; + DB::Update("timetracker", array("timeoff" => $now_datetime), array("trackerid" => postvalue("TrackerID"))); + exit(); } // Place event code here. // Use "Add Action" button to add code snippets. -; + ; diff --git a/app/include/custom_functions.js b/app/include/custom_functions.js index e3426c6d..979a100a 100644 --- a/app/include/custom_functions.js +++ b/app/include/custom_functions.js @@ -1,51 +1,45 @@ -$("document").ready(function() { +$("document").ready(function () { Runner.customEvents = []; - // every notifyInterval seconds we execute an AJAX requests that tells the server that user is still ont he page var notifyInterval = 5; - // this function is executed on every page load, here we tell the server what page the user currently on - function setPageTimer(pageObj) { - // ajax- parameters with the page URL - var notify_params = { pageOpen: 1, pageName: Runner.pages.getUrl(pageObj.shortTName,pageObj.pageType) }; - // if this is an Edit/View page we also pass an ID of the record - if (pageObj.pageType === "edit" || pageObj.pageType === "view") notify_params.recordID = pageObj.keys[0]; - // we send AJAX request and get back trackerId value of the current log table recod - $.get("", notify_params, function(TrackerID) { - // send AJAX request with the current notifyInterval value, that tells the server the user is still on the page - interval = setInterval(function() { - $.get("", { TrackerID: TrackerID }); - }, notifyInterval * 1000); + var notify_params = { pageOpen: 1, pageName: Runner.pages.getUrl(pageObj.shortTName, pageObj.pageType) }; + + if (pageObj.pageType === "edit" || pageObj.pageType === "view") { + notify_params.recordID = pageObj.keys[0]; + } + + $.get("", notify_params, function (TrackerID) { + if (TrackerID) { + interval = setInterval(function () { + $.get("", { TrackerID: TrackerID }); + }, notifyInterval * 1000); + } }); } var originalInit = Runner.pages.RunnerPage.prototype.init; - - Runner.pages.RunnerPage.prototype.init = function() { + + Runner.pages.RunnerPage.prototype.init = function () { var pageObj = this; var isTab = typeof this.tabControl !== "undefined"; - // check if the current page a details tab - if (isTab) { - - if (!Runner.customEvents.includes(this.tName + "_" + this.pageType)) { - Runner.customEvents.push(this.tName + "_" + this.pageType); - pageObj.on("afterPageReady", function() { - // when tab is closed we clear the interval counter - pageObj.tabControl.off("hide.bs.tab").on("hide.bs.tab", function(e) { - clearInterval(interval); - }); - // when details tab is open we start the counter - pageObj.tabControl.off("show.bs.tab").on("show.bs.tab", function(e) { - var activeTab = $(e.target); - var panelContent = activeTab.parents("ul").next(); - var activePanel = panelContent.find(".tab-pane.active"); - - setPageTimer(Runner.pages.PageManager.getById(activePanel.find(".r-form").attr("data-pageid"))); + if (isTab) { + if (!Runner.customEvents.includes(this.tName + "_" + this.pageType)) { + Runner.customEvents.push(this.tName + "_" + this.pageType); + pageObj.on("afterPageReady", function () { + pageObj.tabControl.off("hide.bs.tab").on("hide.bs.tab", function (e) { + clearInterval(interval); + }); + pageObj.tabControl.off("show.bs.tab").on("show.bs.tab", function (e) { + var activeTab = $(e.target); + var panelContent = activeTab.parents("ul").next(); + var activePanel = panelContent.find(".tab-pane.active"); + + setPageTimer(Runner.pages.PageManager.getById(activePanel.find(".r-form").attr("data-pageid"))); + }); }); - }); - } - + } } if (!isTab || (isTab && this.$panel.parents(".tab-pane").hasClass("active"))) { @@ -55,6 +49,3 @@ $("document").ready(function() { originalInit.call(this); } }); - -// Place event code here. -// Use "Add Action" button to add code snippets. \ No newline at end of file diff --git a/app/include/footer.php b/app/include/footer.php index 6bd438bb..6692e237 100644 --- a/app/include/footer.php +++ b/app/include/footer.php @@ -7,6 +7,8 @@
+ + +

diff --git a/app/include/lookuplinks.php b/app/include/lookuplinks.php index 606a1062..15ab016c 100644 --- a/app/include/lookuplinks.php +++ b/app/include/lookuplinks.php @@ -376,6 +376,13 @@ function InitLookupLinks() $lookupTableLinks["public.mfr_region"]["mfr_region_chart.region"] = array(); } $lookupTableLinks["public.mfr_region"]["mfr_region_chart.region"]["search"] = array("table" => "mfr_region_chart", "field" => "region", "page" => "search"); + if( !isset( $lookupTableLinks["public.mfr_facilities_register"] ) ) { + $lookupTableLinks["public.mfr_facilities_register"] = array(); + } + if( !isset( $lookupTableLinks["public.mfr_facilities_register"]["moh_health_facilities.facility_name"] )) { + $lookupTableLinks["public.mfr_facilities_register"]["moh_health_facilities.facility_name"] = array(); + } + $lookupTableLinks["public.mfr_facilities_register"]["moh_health_facilities.facility_name"]["edit"] = array("table" => "public.moh_health_facilities", "field" => "facility_name", "page" => "edit"); if( !isset( $lookupTableLinks["public.moh_facility_types"] ) ) { $lookupTableLinks["public.moh_facility_types"] = array(); } diff --git a/app/include/moh_health_facilities_settings.php b/app/include/moh_health_facilities_settings.php index 39722e7d..10dc2459 100644 --- a/app/include/moh_health_facilities_settings.php +++ b/app/include/moh_health_facilities_settings.php @@ -293,7 +293,7 @@ // Begin Edit Formats $fdata["EditFormats"] = array(); - $edata = array("EditFormat" => "Text field"); + $edata = array("EditFormat" => "Readonly"); $edata["weekdayMessage"] = array("message" => "", "messageType" => "Text"); @@ -318,19 +318,15 @@ - $edata["HTML5InuptType"] = "text"; - - $edata["EditParams"] = ""; - + + $edata["controlWidth"] = 200; // Begin validation $edata["validateAs"] = array(); $edata["validateAs"]["basicValidate"] = array(); $edata["validateAs"]["customMessages"] = array(); - $edata["validateAs"]["basicValidate"][] = getJsValidatorName("Number"); - $edata["validateAs"]["basicValidate"][] = "IsRequired"; - + // End validation @@ -433,7 +429,7 @@ // Begin Edit Formats $fdata["EditFormats"] = array(); - $edata = array("EditFormat" => "Text area"); + $edata = array("EditFormat" => "Lookup wizard"); $edata["weekdayMessage"] = array("message" => "", "messageType" => "Text"); @@ -443,6 +439,36 @@ +// Begin Lookup settings + $edata["LookupType"] = 2; + $edata["LookupTable"] = "public.mfr_facilities_register"; + $edata["listPageId"] = "list"; + $edata["autoCompleteFieldsOnEdit"] = 0; + $edata["autoCompleteFields"] = array(); + $edata["autoCompleteFields"][] = array('masterF'=>"facility_id", 'lookupF'=>"id"); + $edata["autoCompleteFields"][] = array('masterF'=>"facility_type_id", 'lookupF'=>"parentfacilitytype"); + $edata["LCType"] = 2; + + + + $edata["LinkField"] = "id"; + $edata["LinkFieldType"] = 0; + $edata["DisplayField"] = "name"; + + + + + $edata["LookupOrderBy"] = ""; + + + + + + + + + +// End Lookup Settings @@ -456,9 +482,7 @@ - $edata["nRows"] = 100; - $edata["nCols"] = 200; - + $edata["controlWidth"] = 200; @@ -489,7 +513,7 @@ // the field's search options settings - $fdata["defaultSearchOption"] = "Contains"; + $fdata["defaultSearchOption"] = "Equals"; // the default search options list $fdata["searchOptionsList"] = array("Contains", "Equals", "Starts with", "More than", "Less than", "Between", "Empty", NOT_EMPTY); diff --git a/app/include/pages/.global_menu.php b/app/include/pages/.global_menu.php index fecc0ddd..8939054a 100644 --- a/app/include/pages/.global_menu.php +++ b/app/include/pages/.global_menu.php @@ -857,11 +857,13 @@ 'items' => array( 'text5' ), 'align' => 'center' ), 'c5' => array( 'model' => 'c1', -'items' => array( 'text7' ) ), +'items' => array( 'text7' ), +'align' => 'center' ), 'c6' => array( 'model' => 'c1', 'items' => array( 'text8' ) ), 'c7' => array( 'model' => 'c1', -'items' => array( 'text9' ) ), +'items' => array( 'text9' ), +'align' => 'center' ), 'c9' => array( 'model' => 'c1', 'items' => array( 'image', 'text10' ), @@ -1306,27 +1308,17 @@ 'background' => '#BC8F8F', 'linkType' => 0 ), 'text7' => array( 'type' => 'text', -'label' => array( 'text' => ' - +'label' => array( 'text' => ' - - +
', 'type' => 0 ), @@ -1627,29 +1619,18 @@ class="bi bi-arrow-up-short"> 'userinfo_link' => array( 'type' => 'userinfo_link' ), 'logout_link' => array( 'type' => 'logout_link' ), 'text9' => array( 'type' => 'text', -'label' => array( 'text' => ' - +'label' => array( 'text' => ' - - -', + +
', 'type' => 0 ), 'editedByRte' => false ), 'text10' => array( 'type' => 'text', diff --git a/app/include/pages/mfr_facilities_register_list.php b/app/include/pages/mfr_facilities_register_list.php index 69ec2815..933d56ca 100644 --- a/app/include/pages/mfr_facilities_register_list.php +++ b/app/include/pages/mfr_facilities_register_list.php @@ -42,6 +42,7 @@ 'woreda' ), 'searchRequiredFields' => array( ), 'searchPanelFields' => array( 'name', +'id', 'status', 'operationalstatus', 'parentfacilitytype', @@ -233,7 +234,8 @@ 'search_panel_field5', 'search_panel_field6', 'search_panel_field7', -'search_panel_field8' ), +'search_panel_field8', +'search_panel_field1' ), 'username_button' => array( 'username_button' ), 'loginform_login' => array( 'loginform_login' ), 'userinfo_link' => array( 'userinfo_link' ), @@ -727,6 +729,7 @@ 'grid_checkbox_head' => array( 'type' => 'grid_checkbox_head' ), 'search_panel' => array( 'type' => 'search_panel', 'items' => array( 'search_panel_field2', +'search_panel_field1', 'search_panel_field6', 'search_panel_field3', 'search_panel_field4', @@ -892,6 +895,8 @@ 'field' => 'zone' ), 'simple_grid_field17' => array( 'type' => 'grid_field_label', 'field' => 'woreda' ), +'search_panel_field1' => array( 'field' => 'id', +'type' => 'search_panel_field' ), 'expand_button' => array( 'type' => 'expand_button' ) ), 'dbProps' => array( ), 'spreadsheetGrid' => false, diff --git a/app/include/pages/moh_facility_types_list.php b/app/include/pages/moh_facility_types_list.php index d7ad6638..eecf365e 100644 --- a/app/include/pages/moh_facility_types_list.php +++ b/app/include/pages/moh_facility_types_list.php @@ -2,6 +2,7 @@ $optionsArray = array( 'list' => array( 'inlineAdd' => false, 'detailsAdd' => false, 'inlineEdit' => false, +'spreadsheetMode' => false, 'addToBottom' => false, 'delete' => true, 'updateSelected' => false, @@ -521,6 +522,7 @@ 'showCount' => true ), 'expand_button' => array( 'type' => 'expand_button' ) ), 'dbProps' => array( ), +'spreadsheetGrid' => false, 'version' => 11, 'imageItem' => array( 'type' => 'page_image' ), 'imageBgColor' => '#f2f2f2', diff --git a/app/include/pages/moh_health_facilities_edit.php b/app/include/pages/moh_health_facilities_edit.php index 37557520..21f8d5a5 100644 --- a/app/include/pages/moh_health_facilities_edit.php +++ b/app/include/pages/moh_health_facilities_edit.php @@ -124,10 +124,12 @@ 'edit_view' => array( 'type' => 'edit_view' ), 'integrated_edit_field' => array( 'field' => 'facility_name', 'type' => 'integrated_edit_field', -'orientation' => 0 ), +'orientation' => 0, +'updateOnEdit' => false ), 'integrated_edit_field1' => array( 'field' => 'facility_type_id', 'type' => 'integrated_edit_field', -'orientation' => 0 ) ), +'orientation' => 0, +'updateOnEdit' => false ) ), 'dbProps' => array( ), 'version' => 11, 'imageItem' => array( 'type' => 'page_image' ), diff --git a/app/include/pages/moh_health_facilities_list.php b/app/include/pages/moh_health_facilities_list.php index e0039494..b31e31c5 100644 --- a/app/include/pages/moh_health_facilities_list.php +++ b/app/include/pages/moh_health_facilities_list.php @@ -2,6 +2,7 @@ $optionsArray = array( 'list' => array( 'inlineAdd' => false, 'detailsAdd' => true, 'inlineEdit' => false, +'spreadsheetMode' => false, 'addToBottom' => false, 'delete' => true, 'updateSelected' => false, @@ -519,13 +520,16 @@ 'hide_search_panel' => array( 'type' => 'hide_search_panel' ), 'search_panel_field' => array( 'field' => 'facility_id', 'type' => 'search_panel_field', -'required' => false ), +'required' => false, +'alwaysOnPanel' => false ), 'search_panel_field1' => array( 'field' => 'facility_name', 'type' => 'search_panel_field', -'required' => false ), +'required' => false, +'alwaysOnPanel' => false ), 'search_panel_field2' => array( 'field' => 'facility_type_id', 'type' => 'search_panel_field', -'required' => false ), +'required' => false, +'alwaysOnPanel' => false ), 'username_button' => array( 'type' => 'username_button', 'items' => array( 'userinfo_link', 'logout_link', @@ -602,6 +606,7 @@ 'detailsOnly' => true ), 'grid_inline_cancel' => array( 'type' => 'grid_inline_cancel' ) ), 'dbProps' => array( ), +'spreadsheetGrid' => false, 'version' => 11, 'imageItem' => array( 'type' => 'page_image' ), 'imageBgColor' => '#f2f2f2', diff --git a/app/pdf/.global_menu.json b/app/pdf/.global_menu.json index 3f371bb7..646a0792 100644 --- a/app/pdf/.global_menu.json +++ b/app/pdf/.global_menu.json @@ -88,11 +88,11 @@ pdfDocument = { "text": [ - {"text":"\n\n\n\n\n\n\n\n\n\n","hidden":"{$item_hide_text7}","isHtml":true}, + {"text":"\n\n\n\n\n\nአሁን ሰዓቱ\n
\n \n\n
\n\n","hidden":"{$item_hide_text7}","isHtml":true}, ], "border": [ false, false, false, false ], - "alignment": 'left', + "alignment": 'center', }, @@ -111,11 +111,11 @@ pdfDocument = { "text": [ - {"text":"\n\n\n\n\n\n\n\n\n","hidden":"{$item_hide_text9}","isHtml":true}, + {"text":"\n\n\n\n\n\nCurrent Time\n
\n \n\n\n
","hidden":"{$item_hide_text9}","isHtml":true}, ], "border": [ false, false, false, false ], - "alignment": 'left', + "alignment": 'center', }, diff --git a/app/templates/.global_menu.htm b/app/templates/.global_menu.htm index 1a8d2e12..1cb08277 100644 --- a/app/templates/.global_menu.htm +++ b/app/templates/.global_menu.htm @@ -464,65 +464,44 @@

Our Services

- - + - - +
- - + - - - + +
@@ -594,6 +573,7 @@

Our Services

{$grid_tabs_content} {END grid_tabs} +
diff --git a/app/templates/mfr_facilities_register_list.htm b/app/templates/mfr_facilities_register_list.htm index f5f6a9b7..674e77db 100644 --- a/app/templates/mfr_facilities_register_list.htm +++ b/app/templates/mfr_facilities_register_list.htm @@ -342,6 +342,19 @@ {$searchcontrol1_name} {END searchCtrlBlock_name} + {BEGIN searchCtrlBlock_id} + + +
+ + + {$delCtrlButt} + + {$searchtype_id} + {$searchcontrol_id} + {$searchcontrol1_id} +
+ {END searchCtrlBlock_id} {BEGIN searchCtrlBlock_status} diff --git a/docker-compose.yml b/docker-compose.yml index 59037489..02ff271a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -29,15 +29,16 @@ services: expose: - "9000" depends_on: - - db # Ensure php service starts after db service + - db environment: - MYSQL_HOST: db # Use service name 'db' for DNS resolution - MYSQL_PORT: 3306 # Default MySQL/MariaDB port + MYSQL_HOST: db + MYSQL_PORT: 3306 MYSQL_USER: hisp_md MYSQL_PASSWORD: hisp_md MYSQL_DATABASE: hisp_md networks: - - hispmdnet + hispmdnet: + ipv4_address: 192.168.128.10 chat: build: @@ -74,7 +75,8 @@ services: env_file: - .env networks: - - hispmdnet + hispmdnet: + ipv4_address: 192.168.128.5 nginx: image: nginx:latest @@ -105,7 +107,8 @@ services: depends_on: - php networks: - - hispmdnet + hispmdnet: + ipv4_address: 192.168.128.12 metabase: image: metabase/metabase:v0.50.12 @@ -129,7 +132,8 @@ services: depends_on: - postgres networks: - - hispmdnet + hispmdnet: + ipv4_address: 192.168.128.9 postgres: image: postgres:latest @@ -140,9 +144,11 @@ services: POSTGRES_USER: hispmddb POSTGRES_PASSWORD: hispmddb volumes: - - ./src/hispmddb:/docker-entrypoint-initdb.d/hispmddb + - ./src/hispmddb:/var/lib/postgresql/data + #- ./src/hispmddb:/docker-entrypoint-initdb.d/hispmddb networks: - - hispmdnet + hispmdnet: + ipv4_address: 192.168.128.4 db: image: mariadb:11.2.4 @@ -158,7 +164,8 @@ services: - ./mysql-init:/docker-entrypoint-initdb.d #- /var/run/mysqld/mysqld.sock:/var/run/mysqld/mysqld.sock # Mount the MySQL socket file if there is no conflict with the host server networks: - - hispmdnet + hispmdnet: + ipv4_address: 192.168.128.7 phpmyadmin: image: phpmyadmin:5.2.1 @@ -171,7 +178,8 @@ services: PMA_USER: hisp_md PMA_PASSWORD: hisp_md networks: - - hispmdnet + hispmdnet: + ipv4_address: 192.168.128.2 pgadmin: image: dpage/pgadmin4:latest @@ -185,7 +193,8 @@ services: depends_on: - postgres networks: - - hispmdnet + hispmdnet: + ipv4_address: 192.168.128.8 mongo: image: mongo:latest @@ -196,7 +205,8 @@ services: volumes: - hispmd_mongodata:/data/db networks: - - hispmdnet + hispmdnet: + ipv4_address: 192.168.128.6 mongo-express: image: mongo-express:1.0.2 @@ -210,7 +220,8 @@ services: depends_on: - mongo networks: - - hispmdnet + hispmdnet: + ipv4_address: 192.168.128.11 grafana: image: grafana/grafana-enterprise @@ -221,7 +232,8 @@ services: volumes: - grafana-storage:/var/lib/grafana networks: - - hispmdnet + hispmdnet: + ipv4_address: 192.168.128.3 volumes: hispmd_pgadmindata: @@ -232,3 +244,6 @@ volumes: networks: hispmdnet: driver: bridge + ipam: + config: + - subnet: 192.168.128.0/24