diff --git a/.gitpod.yml b/.gitpod.yml
index 6c1123f3..bf4cbc25 100644
--- a/.gitpod.yml
+++ b/.gitpod.yml
@@ -1,8 +1,8 @@
----
-
tasks:
- - init: ./start-distro.sh default
-
+ - name: Run Ozone Cambodia
+ before: sudo apt-get update && sudo apt-get install -y gettext-base && sudo rm -rf /var/lib/apt/lists/*
+ init: scripts/mvnw clean package
+ command: source base/target/go-to-scripts-dir.sh && ./start-demo.sh
ports:
- name: OpenMRS
description: OpenMRS 3
diff --git a/README.md b/README.md
index 9741a73e..efbba72a 100644
--- a/README.md
+++ b/README.md
@@ -1,10 +1,10 @@
-# Ozone Distribution For Cambodia π°π
+# Ozone for Cambodia π°π
-A Maven project to download and package in one place all the software artefacts that make the Ozone Distribution for Cambodia.
+A Maven project to download and package in one place all the software artefacts that make the Ozone for Cambodia.
## Summary
-The Ozone Distribution For Cambodia or **Ozone Kh** is a distribution of [Ozone HIS](https://www.ozone-his.com) specially configured for the MoH of Cambodia. In its original form it is an integrated system between an NCD-capable EMR system and a reporting & analytics platform for NCD population reporting.
+Ozone for Cambodia or **Ozone Kh** is a distribution of [Ozone HIS](https://www.ozone-his.com) specially configured for the MoH of Cambodia. In its original form it is an integrated system between an NCD-capable EMR system and a reporting & analytics platform for NCD population reporting.
## Demo Environments
@@ -29,6 +29,7 @@ A large part Ozone Kh's roadmap is managed publicly to promote transparency and
## Release Notes
### Version 1.5.0
+* Refactor the repository structure
### Version 1.4.1
* Reverted clinical forms version from '2' to '1'.
diff --git a/base/pom.xml b/base/pom.xml
index 80c5608c..daac136b 100644
--- a/base/pom.xml
+++ b/base/pom.xml
@@ -1,109 +1,129 @@
- 4.0.0
+ 4.0.0
+ com.ozonehis
+ ozone-cambodia
+ Ozone for Cambodia
+ 1.5.0-SNAPSHOT
+ pom
+
+
com.ozonehis
- ozone-distro-cambodia
- Ozone Distribution for Cambodia
+ ozone-cambodia-parent
1.5.0-SNAPSHOT
- pom
+
+
+
+ UTF-8
+
-
- com.ozonehis
- ozone-distro-cambodia-parent
- 1.5.0-SNAPSHOT
-
+
+
+ com.ozonehis
+ ozone
+ zip
+ 1.0.0-SNAPSHOT
+
+
-
- UTF-8
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-dependency-plugin
- 2.8
-
-
- Unpack Ozone Distro
- generate-resources
-
- unpack-dependencies
-
-
- true
- true
- ${project.build.directory}/${project.artifactId}-${project.version}
- ozone-distro
-
-
-
-
-
-
- exec-maven-plugin
- 3.1.0
- org.codehaus.mojo
-
-
- Run exclude-files.sh
- generate-resources
-
- exec
-
-
- ${project.parent.basedir}/exclude-files.sh
- ${project.basedir}/dependency-excludes.txt
- ${project.build.directory}/${project.artifactId}-${project.version}
-
-
-
-
-
- org.apache.maven.plugins
- maven-resources-plugin
- 3.3.0
-
-
-
- Copy local resources
- process-resources
-
- copy-resources
-
-
- ${project.build.directory}/${project.artifactId}-${project.version}
- true
-
-
- ${project.parent.basedir}/configs
-
-
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-assembly-plugin
-
-
- Package distro
- package
-
- single
-
-
- false
-
- ${project.basedir}/assembly.xml
-
-
-
-
-
-
-
-
-
+
+
+
+
+ org.apache.maven.plugins
+ maven-dependency-plugin
+ 2.8
+
+
+ Unpack Ozone
+ generate-resources
+
+ unpack-dependencies
+
+
+ true
+ true
+ ${project.build.directory}/ozone
+ ozone
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-resources-plugin
+ 3.3.0
+
+
+
+ Copy local configs
+ prepare-package
+
+ copy-resources
+
+
+
+ ${project.build.directory}/${project.artifactId}-${project.version}/distro/configs
+ true
+
+
+ ${project.parent.basedir}/configs
+
+
+
+
+
+
+ Exclude some Ozone files
+ process-resources
+
+ copy-resources
+
+
+
+ ${project.build.directory}/${project.artifactId}-${project.version}
+ true
+
+
+ ${project.build.directory}/ozone
+
+ distro/**/appointment*
+ distro/**/concepts*demo.csv
+ distro/**/encountertypes*demo.csv
+ distro/**/personattributetypes*demo.csv
+ distro/**/privileges*demo.csv
+ distro/**/program*
+ distro/**/roles*demo.csv
+ distro/**/ampathforms/*.json
+ distro/**/ampathformstranslations/*.json
+ distro/**/*demo.csv
+
+
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-assembly-plugin
+
+
+ Package distro
+ package
+
+ single
+
+
+ false
+
+ ${project.basedir}/assembly.xml
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/configs/ozone_config/frontend/ozone-frontend-config.json b/configs/openmrs/frontend_config/ozone-frontend-config.json
similarity index 100%
rename from configs/ozone_config/frontend/ozone-frontend-config.json
rename to configs/openmrs/frontend_config/ozone-frontend-config.json
diff --git a/configs/openmrs_config/addresshierarchy/addressConfiguration.xml b/configs/openmrs/initializer_config/addresshierarchy/addressConfiguration.xml
similarity index 100%
rename from configs/openmrs_config/addresshierarchy/addressConfiguration.xml
rename to configs/openmrs/initializer_config/addresshierarchy/addressConfiguration.xml
diff --git a/configs/openmrs_config/addresshierarchy/addresshierarchy.csv b/configs/openmrs/initializer_config/addresshierarchy/addresshierarchy.csv
similarity index 100%
rename from configs/openmrs_config/addresshierarchy/addresshierarchy.csv
rename to configs/openmrs/initializer_config/addresshierarchy/addresshierarchy.csv
diff --git a/configs/openmrs_config/ampathforms/NCD_Consultation.json b/configs/openmrs/initializer_config/ampathforms/NCD_Consultation.json
similarity index 100%
rename from configs/openmrs_config/ampathforms/NCD_Consultation.json
rename to configs/openmrs/initializer_config/ampathforms/NCD_Consultation.json
diff --git a/configs/openmrs_config/ampathforms/NCD_Medical_History.json b/configs/openmrs/initializer_config/ampathforms/NCD_Medical_History.json
similarity index 100%
rename from configs/openmrs_config/ampathforms/NCD_Medical_History.json
rename to configs/openmrs/initializer_config/ampathforms/NCD_Medical_History.json
diff --git a/configs/openmrs_config/ampathforms/NCD_Screening.json b/configs/openmrs/initializer_config/ampathforms/NCD_Screening.json
similarity index 100%
rename from configs/openmrs_config/ampathforms/NCD_Screening.json
rename to configs/openmrs/initializer_config/ampathforms/NCD_Screening.json
diff --git a/configs/openmrs_config/ampathforms/cervical_cancer_screening.json b/configs/openmrs/initializer_config/ampathforms/cervical_cancer_screening.json
similarity index 100%
rename from configs/openmrs_config/ampathforms/cervical_cancer_screening.json
rename to configs/openmrs/initializer_config/ampathforms/cervical_cancer_screening.json
diff --git a/configs/openmrs_config/ampathformstranslations/Health Center - NCD Screening_translations_en.json b/configs/openmrs/initializer_config/ampathformstranslations/Health Center - NCD Screening_translations_en.json
similarity index 100%
rename from configs/openmrs_config/ampathformstranslations/Health Center - NCD Screening_translations_en.json
rename to configs/openmrs/initializer_config/ampathformstranslations/Health Center - NCD Screening_translations_en.json
diff --git a/configs/openmrs_config/ampathformstranslations/Health Center - NCD Screening_translations_km.json b/configs/openmrs/initializer_config/ampathformstranslations/Health Center - NCD Screening_translations_km.json
similarity index 100%
rename from configs/openmrs_config/ampathformstranslations/Health Center - NCD Screening_translations_km.json
rename to configs/openmrs/initializer_config/ampathformstranslations/Health Center - NCD Screening_translations_km.json
diff --git a/configs/openmrs_config/ampathformstranslations/NCD Consultation_translations_en.json b/configs/openmrs/initializer_config/ampathformstranslations/NCD Consultation_translations_en.json
similarity index 100%
rename from configs/openmrs_config/ampathformstranslations/NCD Consultation_translations_en.json
rename to configs/openmrs/initializer_config/ampathformstranslations/NCD Consultation_translations_en.json
diff --git a/configs/openmrs_config/ampathformstranslations/NCD Consultation_translations_km.json b/configs/openmrs/initializer_config/ampathformstranslations/NCD Consultation_translations_km.json
similarity index 100%
rename from configs/openmrs_config/ampathformstranslations/NCD Consultation_translations_km.json
rename to configs/openmrs/initializer_config/ampathformstranslations/NCD Consultation_translations_km.json
diff --git a/configs/openmrs_config/ampathformstranslations/NCD Medical History_translations_en.json b/configs/openmrs/initializer_config/ampathformstranslations/NCD Medical History_translations_en.json
similarity index 100%
rename from configs/openmrs_config/ampathformstranslations/NCD Medical History_translations_en.json
rename to configs/openmrs/initializer_config/ampathformstranslations/NCD Medical History_translations_en.json
diff --git a/configs/openmrs_config/ampathformstranslations/NCD Medical History_translations_km.json b/configs/openmrs/initializer_config/ampathformstranslations/NCD Medical History_translations_km.json
similarity index 100%
rename from configs/openmrs_config/ampathformstranslations/NCD Medical History_translations_km.json
rename to configs/openmrs/initializer_config/ampathformstranslations/NCD Medical History_translations_km.json
diff --git a/configs/openmrs_config/ampathformstranslations/cervical_cancer_screening_en.json b/configs/openmrs/initializer_config/ampathformstranslations/cervical_cancer_screening_en.json
similarity index 100%
rename from configs/openmrs_config/ampathformstranslations/cervical_cancer_screening_en.json
rename to configs/openmrs/initializer_config/ampathformstranslations/cervical_cancer_screening_en.json
diff --git a/configs/openmrs_config/ampathformstranslations/cervical_cancer_screening_km.json b/configs/openmrs/initializer_config/ampathformstranslations/cervical_cancer_screening_km.json
similarity index 100%
rename from configs/openmrs_config/ampathformstranslations/cervical_cancer_screening_km.json
rename to configs/openmrs/initializer_config/ampathformstranslations/cervical_cancer_screening_km.json
diff --git a/configs/openmrs_config/attributetypes/attribute_types.csv b/configs/openmrs/initializer_config/attributetypes/attribute_types.csv
similarity index 100%
rename from configs/openmrs_config/attributetypes/attribute_types.csv
rename to configs/openmrs/initializer_config/attributetypes/attribute_types.csv
diff --git a/configs/openmrs_config/concepts/assessment.csv b/configs/openmrs/initializer_config/concepts/assessment.csv
similarity index 100%
rename from configs/openmrs_config/concepts/assessment.csv
rename to configs/openmrs/initializer_config/concepts/assessment.csv
diff --git a/configs/openmrs_config/concepts/diagnosis.csv b/configs/openmrs/initializer_config/concepts/diagnosis.csv
similarity index 100%
rename from configs/openmrs_config/concepts/diagnosis.csv
rename to configs/openmrs/initializer_config/concepts/diagnosis.csv
diff --git a/configs/openmrs_config/concepts/drugs_concepts.csv b/configs/openmrs/initializer_config/concepts/drugs_concepts.csv
similarity index 100%
rename from configs/openmrs_config/concepts/drugs_concepts.csv
rename to configs/openmrs/initializer_config/concepts/drugs_concepts.csv
diff --git a/configs/openmrs_config/concepts/education.csv b/configs/openmrs/initializer_config/concepts/education.csv
similarity index 100%
rename from configs/openmrs_config/concepts/education.csv
rename to configs/openmrs/initializer_config/concepts/education.csv
diff --git a/configs/openmrs_config/concepts/ethnicities.csv b/configs/openmrs/initializer_config/concepts/ethnicities.csv
similarity index 100%
rename from configs/openmrs_config/concepts/ethnicities.csv
rename to configs/openmrs/initializer_config/concepts/ethnicities.csv
diff --git a/configs/openmrs_config/concepts/findings.csv b/configs/openmrs/initializer_config/concepts/findings.csv
similarity index 100%
rename from configs/openmrs_config/concepts/findings.csv
rename to configs/openmrs/initializer_config/concepts/findings.csv
diff --git a/configs/openmrs_config/concepts/general.csv b/configs/openmrs/initializer_config/concepts/general.csv
similarity index 100%
rename from configs/openmrs_config/concepts/general.csv
rename to configs/openmrs/initializer_config/concepts/general.csv
diff --git a/configs/openmrs_config/concepts/labs.csv b/configs/openmrs/initializer_config/concepts/labs.csv
similarity index 100%
rename from configs/openmrs_config/concepts/labs.csv
rename to configs/openmrs/initializer_config/concepts/labs.csv
diff --git a/configs/openmrs_config/concepts/lifestyle.csv b/configs/openmrs/initializer_config/concepts/lifestyle.csv
similarity index 100%
rename from configs/openmrs_config/concepts/lifestyle.csv
rename to configs/openmrs/initializer_config/concepts/lifestyle.csv
diff --git a/configs/openmrs_config/concepts/locations.csv b/configs/openmrs/initializer_config/concepts/locations.csv
similarity index 100%
rename from configs/openmrs_config/concepts/locations.csv
rename to configs/openmrs/initializer_config/concepts/locations.csv
diff --git a/configs/openmrs_config/concepts/management.csv b/configs/openmrs/initializer_config/concepts/management.csv
similarity index 100%
rename from configs/openmrs_config/concepts/management.csv
rename to configs/openmrs/initializer_config/concepts/management.csv
diff --git a/configs/openmrs_config/concepts/marital_status.csv b/configs/openmrs/initializer_config/concepts/marital_status.csv
similarity index 100%
rename from configs/openmrs_config/concepts/marital_status.csv
rename to configs/openmrs/initializer_config/concepts/marital_status.csv
diff --git a/configs/openmrs_config/concepts/occupation.csv b/configs/openmrs/initializer_config/concepts/occupation.csv
similarity index 100%
rename from configs/openmrs_config/concepts/occupation.csv
rename to configs/openmrs/initializer_config/concepts/occupation.csv
diff --git a/configs/openmrs_config/concepts/opdConsultationReportConcepts.csv b/configs/openmrs/initializer_config/concepts/opdConsultationReportConcepts.csv
similarity index 100%
rename from configs/openmrs_config/concepts/opdConsultationReportConcepts.csv
rename to configs/openmrs/initializer_config/concepts/opdConsultationReportConcepts.csv
diff --git a/configs/openmrs_config/concepts/past_medical_history.csv b/configs/openmrs/initializer_config/concepts/past_medical_history.csv
similarity index 100%
rename from configs/openmrs_config/concepts/past_medical_history.csv
rename to configs/openmrs/initializer_config/concepts/past_medical_history.csv
diff --git a/configs/openmrs_config/concepts/physical_examination.csv b/configs/openmrs/initializer_config/concepts/physical_examination.csv
similarity index 100%
rename from configs/openmrs_config/concepts/physical_examination.csv
rename to configs/openmrs/initializer_config/concepts/physical_examination.csv
diff --git a/configs/openmrs_config/concepts/reproductive_history.csv b/configs/openmrs/initializer_config/concepts/reproductive_history.csv
similarity index 100%
rename from configs/openmrs_config/concepts/reproductive_history.csv
rename to configs/openmrs/initializer_config/concepts/reproductive_history.csv
diff --git a/configs/openmrs_config/concepts/sexual_orientation.csv b/configs/openmrs/initializer_config/concepts/sexual_orientation.csv
similarity index 100%
rename from configs/openmrs_config/concepts/sexual_orientation.csv
rename to configs/openmrs/initializer_config/concepts/sexual_orientation.csv
diff --git a/configs/openmrs_config/drugs/drugs.csv b/configs/openmrs/initializer_config/drugs/drugs.csv
similarity index 100%
rename from configs/openmrs_config/drugs/drugs.csv
rename to configs/openmrs/initializer_config/drugs/drugs.csv
diff --git a/configs/openmrs_config/encountertypes/encountertypes.csv b/configs/openmrs/initializer_config/encountertypes/encountertypes.csv
similarity index 100%
rename from configs/openmrs_config/encountertypes/encountertypes.csv
rename to configs/openmrs/initializer_config/encountertypes/encountertypes.csv
diff --git a/configs/openmrs_config/encountertypes/encountertypes_core.csv b/configs/openmrs/initializer_config/encountertypes/encountertypes_core.csv
similarity index 100%
rename from configs/openmrs_config/encountertypes/encountertypes_core.csv
rename to configs/openmrs/initializer_config/encountertypes/encountertypes_core.csv
diff --git a/configs/openmrs_config/globalproperties/address-template.xml b/configs/openmrs/initializer_config/globalproperties/address-template.xml
similarity index 100%
rename from configs/openmrs_config/globalproperties/address-template.xml
rename to configs/openmrs/initializer_config/globalproperties/address-template.xml
diff --git a/configs/openmrs_config/globalproperties/i18n.xml b/configs/openmrs/initializer_config/globalproperties/i18n.xml
similarity index 100%
rename from configs/openmrs_config/globalproperties/i18n.xml
rename to configs/openmrs/initializer_config/globalproperties/i18n.xml
diff --git a/configs/openmrs_config/jsonkeyvalues/opdConsultationReportConfig.json b/configs/openmrs/initializer_config/jsonkeyvalues/opdConsultationReportConfig.json
similarity index 100%
rename from configs/openmrs_config/jsonkeyvalues/opdConsultationReportConfig.json
rename to configs/openmrs/initializer_config/jsonkeyvalues/opdConsultationReportConfig.json
diff --git a/configs/openmrs_config/locations/locations.csv b/configs/openmrs/initializer_config/locations/locations.csv
similarity index 100%
rename from configs/openmrs_config/locations/locations.csv
rename to configs/openmrs/initializer_config/locations/locations.csv
diff --git a/configs/openmrs_config/ocl/CCD_1.20220817052001.zip b/configs/openmrs/initializer_config/ocl/CCD_1.20220817052001.zip
similarity index 100%
rename from configs/openmrs_config/ocl/CCD_1.20220817052001.zip
rename to configs/openmrs/initializer_config/ocl/CCD_1.20220817052001.zip
diff --git a/configs/openmrs_config/ocl/CDU_3.0.20220817051630.zip b/configs/openmrs/initializer_config/ocl/CDU_3.0.20220817051630.zip
similarity index 100%
rename from configs/openmrs_config/ocl/CDU_3.0.20220817051630.zip
rename to configs/openmrs/initializer_config/ocl/CDU_3.0.20220817051630.zip
diff --git a/configs/openmrs_config/ocl/CIEL-frequencies_1.20220816234743.zip b/configs/openmrs/initializer_config/ocl/CIEL-frequencies_1.20220816234743.zip
similarity index 100%
rename from configs/openmrs_config/ocl/CIEL-frequencies_1.20220816234743.zip
rename to configs/openmrs/initializer_config/ocl/CIEL-frequencies_1.20220816234743.zip
diff --git a/configs/openmrs_config/ocl/CIELAllergySet_1.20220817053026.zip b/configs/openmrs/initializer_config/ocl/CIELAllergySet_1.20220817053026.zip
similarity index 100%
rename from configs/openmrs_config/ocl/CIELAllergySet_1.20220817053026.zip
rename to configs/openmrs/initializer_config/ocl/CIELAllergySet_1.20220817053026.zip
diff --git a/configs/openmrs_config/ocl/CIELImmunizationContent_1.20220817012726.zip b/configs/openmrs/initializer_config/ocl/CIELImmunizationContent_1.20220817012726.zip
similarity index 100%
rename from configs/openmrs_config/ocl/CIELImmunizationContent_1.20220817012726.zip
rename to configs/openmrs/initializer_config/ocl/CIELImmunizationContent_1.20220817012726.zip
diff --git a/configs/openmrs_config/ocl/DemoQueueConcepts_1.zip b/configs/openmrs/initializer_config/ocl/DemoQueueConcepts_1.zip
similarity index 100%
rename from configs/openmrs_config/ocl/DemoQueueConcepts_1.zip
rename to configs/openmrs/initializer_config/ocl/DemoQueueConcepts_1.zip
diff --git a/configs/openmrs_config/ocl/ExampleLabFilter_2.20220331075053.zip b/configs/openmrs/initializer_config/ocl/ExampleLabFilter_2.20220331075053.zip
similarity index 100%
rename from configs/openmrs_config/ocl/ExampleLabFilter_2.20220331075053.zip
rename to configs/openmrs/initializer_config/ocl/ExampleLabFilter_2.20220331075053.zip
diff --git a/configs/openmrs_config/ocl/GenericDemoForm_3.20220225043204.zip b/configs/openmrs/initializer_config/ocl/GenericDemoForm_3.20220225043204.zip
similarity index 100%
rename from configs/openmrs_config/ocl/GenericDemoForm_3.20220225043204.zip
rename to configs/openmrs/initializer_config/ocl/GenericDemoForm_3.20220225043204.zip
diff --git a/configs/openmrs_config/ocl/demopackagehiv_12.20220525204054.zip b/configs/openmrs/initializer_config/ocl/demopackagehiv_12.20220525204054.zip
similarity index 100%
rename from configs/openmrs_config/ocl/demopackagehiv_12.20220525204054.zip
rename to configs/openmrs/initializer_config/ocl/demopackagehiv_12.20220525204054.zip
diff --git a/configs/openmrs_config/ocl/lab_tests-core-demo.zip b/configs/openmrs/initializer_config/ocl/lab_tests-core-demo.zip
similarity index 100%
rename from configs/openmrs_config/ocl/lab_tests-core-demo.zip
rename to configs/openmrs/initializer_config/ocl/lab_tests-core-demo.zip
diff --git a/configs/openmrs_config/patientidentifiertypes/cambodia-identifiers.csv b/configs/openmrs/initializer_config/patientidentifiertypes/cambodia-identifiers.csv
similarity index 100%
rename from configs/openmrs_config/patientidentifiertypes/cambodia-identifiers.csv
rename to configs/openmrs/initializer_config/patientidentifiertypes/cambodia-identifiers.csv
diff --git a/configs/openmrs_config/patientidentifiertypes/patientidentifiertypes.csv b/configs/openmrs/initializer_config/patientidentifiertypes/patientidentifiertypes.csv
similarity index 100%
rename from configs/openmrs_config/patientidentifiertypes/patientidentifiertypes.csv
rename to configs/openmrs/initializer_config/patientidentifiertypes/patientidentifiertypes.csv
diff --git a/configs/openmrs_config/patientidentifiertypes/retire-core-identifiers.csv b/configs/openmrs/initializer_config/patientidentifiertypes/retire-core-identifiers.csv
similarity index 100%
rename from configs/openmrs_config/patientidentifiertypes/retire-core-identifiers.csv
rename to configs/openmrs/initializer_config/patientidentifiertypes/retire-core-identifiers.csv
diff --git a/configs/openmrs_config/personattributetypes/personattributetypes.csv b/configs/openmrs/initializer_config/personattributetypes/personattributetypes.csv
similarity index 100%
rename from configs/openmrs_config/personattributetypes/personattributetypes.csv
rename to configs/openmrs/initializer_config/personattributetypes/personattributetypes.csv
diff --git a/configs/openmrs_config/privileges/privileges.csv b/configs/openmrs/initializer_config/privileges/privileges.csv
similarity index 100%
rename from configs/openmrs_config/privileges/privileges.csv
rename to configs/openmrs/initializer_config/privileges/privileges.csv
diff --git a/configs/openmrs_config/privileges/privileges_core.csv b/configs/openmrs/initializer_config/privileges/privileges_core.csv
similarity index 100%
rename from configs/openmrs_config/privileges/privileges_core.csv
rename to configs/openmrs/initializer_config/privileges/privileges_core.csv
diff --git a/configs/openmrs_config/roles/roles.csv b/configs/openmrs/initializer_config/roles/roles.csv
similarity index 100%
rename from configs/openmrs_config/roles/roles.csv
rename to configs/openmrs/initializer_config/roles/roles.csv
diff --git a/configs/openmrs_config/roles/roles_core.csv b/configs/openmrs/initializer_config/roles/roles_core.csv
similarity index 100%
rename from configs/openmrs_config/roles/roles_core.csv
rename to configs/openmrs/initializer_config/roles/roles_core.csv
diff --git a/configs/openmrs_config/visittypes/visittypes.csv b/configs/openmrs/initializer_config/visittypes/visittypes.csv
similarity index 100%
rename from configs/openmrs_config/visittypes/visittypes.csv
rename to configs/openmrs/initializer_config/visittypes/visittypes.csv
diff --git a/configs/openmrs_config/demo-users/app.js b/configs/openmrs_config/demo-users/app.js
deleted file mode 100644
index d28824e4..00000000
--- a/configs/openmrs_config/demo-users/app.js
+++ /dev/null
@@ -1,40 +0,0 @@
-import fetch from 'node-fetch';
-import * as fs from 'fs';
-
-var requestHeaders = new Headers();
-requestHeaders.append("Authorization", "Basic YWRtaW46QWRtaW4xMjM=");
-requestHeaders.append("Content-Type", "application/json");
-
-var requestOptions = {
- method: 'GET',
- headers: requestHeaders,
- redirect: 'follow'
-};
-
-const baseUrl = 'http://localhost';
-
-fetch(baseUrl + "/openmrs/ws/rest/v1/session", requestOptions)
- .then(
- function(response) {
-
- // Set new headers
- requestHeaders.append("Cookie", response.headers.raw()['set-cookie'])
- requestOptions.headers = requestHeaders
-
- let file = JSON.parse(fs.readFileSync('users.json'));
- file.users.forEach((user) => {
- var rawUser = JSON.stringify(user);
- requestOptions.body = rawUser;
- requestOptions.method = 'POST';
-
- console.log("Creating user '" + user.username + "'...")
- fetch(baseUrl + "/openmrs/ws/rest/v1/user", requestOptions)
- .then(response => response.text())
- .then(result => console.log(result))
- .catch(error => console.log('error', error));
- });
- }
- )
- .then(result => console.log(result))
- .catch(error => console.log('error', error));
-
diff --git a/configs/openmrs_config/demo-users/create-demo-users.sh b/configs/openmrs_config/demo-users/create-demo-users.sh
deleted file mode 100644
index b71978d8..00000000
--- a/configs/openmrs_config/demo-users/create-demo-users.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/usr/bin/env bash
-set -e
-
-# Install nvm
-VERSION=v0.37.2
-curl -o- "https://raw.githubusercontent.com/nvm-sh/nvm/${VERSION}/install.sh" | bash
-source ~/.nvm/nvm.sh
-nvm install --lts
-
-# Run app to create the demo users
-npm install
-node app.js
diff --git a/configs/openmrs_config/demo-users/package-lock.json b/configs/openmrs_config/demo-users/package-lock.json
deleted file mode 100644
index 0fef7eac..00000000
--- a/configs/openmrs_config/demo-users/package-lock.json
+++ /dev/null
@@ -1,100 +0,0 @@
-{
- "name": "create-demo-users",
- "version": "1.0.0",
- "lockfileVersion": 3,
- "requires": true,
- "packages": {
- "": {
- "name": "create-demo-users",
- "version": "1.0.0",
- "license": "ISC",
- "dependencies": {
- "node-fetch": "^3.3.1"
- }
- },
- "node_modules/data-uri-to-buffer": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz",
- "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==",
- "engines": {
- "node": ">= 12"
- }
- },
- "node_modules/fetch-blob": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz",
- "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==",
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/jimmywarting"
- },
- {
- "type": "paypal",
- "url": "https://paypal.me/jimmywarting"
- }
- ],
- "dependencies": {
- "node-domexception": "^1.0.0",
- "web-streams-polyfill": "^3.0.3"
- },
- "engines": {
- "node": "^12.20 || >= 14.13"
- }
- },
- "node_modules/formdata-polyfill": {
- "version": "4.0.10",
- "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz",
- "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==",
- "dependencies": {
- "fetch-blob": "^3.1.2"
- },
- "engines": {
- "node": ">=12.20.0"
- }
- },
- "node_modules/node-domexception": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz",
- "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==",
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/jimmywarting"
- },
- {
- "type": "github",
- "url": "https://paypal.me/jimmywarting"
- }
- ],
- "engines": {
- "node": ">=10.5.0"
- }
- },
- "node_modules/node-fetch": {
- "version": "3.3.1",
- "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.1.tgz",
- "integrity": "sha512-cRVc/kyto/7E5shrWca1Wsea4y6tL9iYJE5FBCius3JQfb/4P4I295PfhgbJQBLTx6lATE4z+wK0rPM4VS2uow==",
- "dependencies": {
- "data-uri-to-buffer": "^4.0.0",
- "fetch-blob": "^3.1.4",
- "formdata-polyfill": "^4.0.10"
- },
- "engines": {
- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/node-fetch"
- }
- },
- "node_modules/web-streams-polyfill": {
- "version": "3.2.1",
- "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz",
- "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==",
- "engines": {
- "node": ">= 8"
- }
- }
- }
-}
diff --git a/configs/openmrs_config/demo-users/package.json b/configs/openmrs_config/demo-users/package.json
deleted file mode 100644
index 7787cb05..00000000
--- a/configs/openmrs_config/demo-users/package.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "name": "create-demo-users",
- "version": "1.0.0",
- "description": "Node script to create demo users in OpenMRS",
- "main": "app.js",
- "type": "module",
- "scripts": {
- "test": "npm test"
- },
- "repository": {
- "type": "git",
- "url": "git+https://github.com/openmrs/ozone-distro-cambodia.git"
- },
- "author": "",
- "license": "ISC",
- "bugs": {
- "url": "https://github.com/openmrs/ozone-distro-cambodia/issues"
- },
- "homepage": "https://github.com/openmrs/ozone-distro-cambodia#readme",
- "dependencies": {
- "node-fetch": "^3.3.1"
- }
-}
diff --git a/configs/openmrs_config/demo-users/users.json b/configs/openmrs_config/demo-users/users.json
deleted file mode 100644
index 94b5b6b3..00000000
--- a/configs/openmrs_config/demo-users/users.json
+++ /dev/null
@@ -1,50 +0,0 @@
-{
- "users": [
- {
- "username": "bsuy",
- "password": "Password123",
- "person": {
- "uuid": "fa22c347-bd3b-4ca3-bb79-f02e840bb922",
- "names": [
- {
- "givenName": "Suy",
- "familyName": "Bunroeun"
- }
- ],
- "gender": "F"
- },
- "roles": [
- {
- "uuid": "a28fc3ff-cf23-44e6-9b4b-a13aee22363b"
- },
- {
- "uuid": "8d94f280-c2cc-11de-8d13-0010c6dffd0f"
- }
- ],
- "systemId": "bsuy"
- },
- {
- "username": "blou",
- "password": "Password123",
- "person": {
- "uuid": "bf7ba9f1-de2c-44e0-932e-782a80b930cf",
- "names": [
- {
- "givenName": "Lou",
- "familyName": "Bunleng"
- }
- ],
- "gender": "M"
- },
- "roles": [
- {
- "uuid": "a28fc3ff-cf23-44e6-9b4b-a13aee22363b"
- },
- {
- "uuid": "8d94f280-c2cc-11de-8d13-0010c6dffd0f"
- }
- ],
- "systemId": "blou"
- }
- ]
-}
\ No newline at end of file
diff --git a/configs/ozone_config/frontend/ozone_logo_color.svg b/configs/ozone_config/frontend/ozone_logo_color.svg
deleted file mode 100644
index e7ff153a..00000000
--- a/configs/ozone_config/frontend/ozone_logo_color.svg
+++ /dev/null
@@ -1,55 +0,0 @@
-
-
-
diff --git a/configs/ozone_config/frontend/ozone_logo_white.svg b/configs/ozone_config/frontend/ozone_logo_white.svg
deleted file mode 100644
index 11163f25..00000000
--- a/configs/ozone_config/frontend/ozone_logo_white.svg
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
\ No newline at end of file
diff --git a/exclude-files.sh b/exclude-files.sh
deleted file mode 100755
index b198b715..00000000
--- a/exclude-files.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/env bash
-
-exclusionFileName=$1
-targetDir=$2
-
-echo "Parsing '$exclusionFileName' to identify exclusions..."
-cat $exclusionFileName | while read line || [ -n "$line" ]
-do
- if [ "${line:0:1}" != "#" ]; then
- echo "Evaluating RegEx \"$line\" for possible matching exclusions..."
- count=$(find ${targetDir} -regex ${line} | wc -l)
- if [ "$count" -ne "0" ]; then
- echo "Found the following match(es): "
- find ${targetDir} -regex ${line}
- find ${targetDir} -regex ${line} | xargs rm -r
- echo "$count file(s) excluded."
- else
- echo "No file matches the exclusion pattern."
- fi
- fi
-done
diff --git a/pom.xml b/pom.xml
index 6fc758aa..b02d9147 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,8 +1,8 @@
4.0.0
com.ozonehis
- ozone-distro-cambodia-parent
- Ozone Distribution for Cambodia - Parent project
+ ozone-cambodia-parent
+ Ozone for Cambodia - Parent project
1.5.0-SNAPSHOT
pom
@@ -37,15 +37,66 @@
-
-
-
- com.ozonehis
- ozone-distro
- zip
- 1.0.0-SNAPSHOT
-
-
+
+
+
+
+ org.apache.maven.plugins
+ maven-resources-plugin
+ 3.3.0
+
+
+
+ Copy and substitute some helper files
+ process-resources
+
+ copy-resources
+
+
+
+ ${project.build.directory}/
+ true
+
+
+ ../scripts
+ false
+
+
+ ../scripts
+
+ *.sh
+
+ true
+
+
+
+
+
+
+ Copy docker-compose-files.txt
+ prepare-package
+
+ copy-resources
+
+
+
+ ${project.build.directory}/${project.artifactId}-${project.version}/run/docker/scripts
+ true
+
+
+ ../scripts
+
+ docker-compose-files.txt
+
+ true
+
+
+
+
+
+
+
+
@@ -66,4 +117,4 @@
https://nexus.mekomsolutions.net/repository/maven-snapshots
-
+
\ No newline at end of file
diff --git a/prod/pom.xml b/prod/pom.xml
index c6eac438..ddc76c91 100644
--- a/prod/pom.xml
+++ b/prod/pom.xml
@@ -1,150 +1,130 @@
- 4.0.0
+ 4.0.0
+ com.ozonehis
+ ozone-cambodia-prod
+ Ozone for Cambodia - Production
+ 1.5.0-SNAPSHOT
+ pom
+
+
+ Ozone HIS
+ http://www.ozone-his.com
+
+
+
+
+ Mekom Solutions
+ http://www.mekomsolutions.com
+
+
+
+
com.ozonehis
- ozone-distro-cambodia-prod
- Ozone Distribution for Cambodia - Production
+ ozone-cambodia-parent
1.5.0-SNAPSHOT
- pom
-
-
- Ozone HIS
- http://www.ozone-his.com
-
+
-
-
- Mekom Solutions
- http://www.mekomsolutions.com
-
-
-
-
- com.ozonehis
- ozone-distro-cambodia-parent
- 1.5.0-SNAPSHOT
-
+
+ UTF-8
+
-
- UTF-8
-
+
+
+ com.ozonehis
+ ozone-cambodia
+ 1.5.0-SNAPSHOT
+ zip
+
+
+ com.ozonehis
+ ozone-config-cambodia0
+ zip
+ 1.5.0-SNAPSHOT
+
+
-
-
- com.ozonehis
- ozone-distro-cambodia
- 1.5.0-SNAPSHOT
- zip
-
-
- com.ozonehis
- ozone-config-cambodia0
- zip
- 1.5.0-SNAPSHOT
-
-
-
-
-
- org.apache.maven.plugins
- maven-dependency-plugin
- 2.8
-
-
-
- Prod: Copy Oz Kh non-prod
- generate-resources
-
- unpack-dependencies
-
-
- true
- true
-
- ${project.build.directory}/${project.artifactId}-${project.version}
- ozone-distro-cambodia
-
-
-
-
- Prod: Copy Ozone Config Cambodia 0
- process-resources
-
- unpack-dependencies
-
-
- true
- true
-
- ${project.build.directory}/${project.artifactId}-${project.version}
- ozone-config-cambodia0
-
-
-
-
-
-
- exec-maven-plugin
- 3.1.0
- org.codehaus.mojo
-
-
- Prod: Run 'prod' exclude-files.sh
- process-resources
-
- exec
-
-
- ${project.parent.basedir}/exclude-files.sh
-
- ${project.basedir}/dependency-excludes.txt
- ${project.build.directory}/${project.artifactId}-${project.version}
-
-
-
-
-
- org.apache.maven.plugins
- maven-assembly-plugin
-
-
- Prod: Package the production distro
- package
-
- single
-
-
- false
-
- assembly.xml
-
-
-
-
-
-
-
+
+
+
+ org.apache.maven.plugins
+ maven-dependency-plugin
+ 2.8
+
+
+
+ Prod: Copy Oz Kh non-prod
+ generate-resources
+
+ unpack-dependencies
+
+
+ true
+ true
+
+ ${project.build.directory}/${project.artifactId}-${project.version}
+ ozone-cambodia
+
+
+
+
+ Prod: Copy Ozone Config Cambodia 0
+ process-resources
+
+ unpack-dependencies
+
+
+ true
+ true
+
+ ${project.build.directory}/${project.artifactId}-${project.version}/distro
+ ozone-config-cambodia0
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-assembly-plugin
+
+
+ Prod: Package the production distro
+ package
+
+ single
+
+
+ false
+
+ assembly.xml
+
+
+
+
+
+
+
-
-
- mks-nexus-private
- https://nexus.mekomsolutions.net/repository/maven-private/
-
-
- mks-nexus-public
- https://nexus.mekomsolutions.net/repository/maven-public/
-
-
+
+
+ mks-nexus-private
+ https://nexus.mekomsolutions.net/repository/maven-private/
+
+
+ mks-nexus-public
+ https://nexus.mekomsolutions.net/repository/maven-public/
+
+
-
-
- Mekom SolutionsNexus private repo for releases
- mks-nexus-private
- https://nexus.mekomsolutions.net/repository/maven-private-releases/
-
-
- Mekom Solutions Nexus private repo for snapshots
- mks-nexus-private-snapshots
- https://nexus.mekomsolutions.net/repository/maven-private-snapshots
-
-
-
+
+
+ Mekom SolutionsNexus private repo for releases
+ mks-nexus-private
+ https://nexus.mekomsolutions.net/repository/maven-private-releases/
+
+
+ Mekom Solutions Nexus private repo for snapshots
+ mks-nexus-private-snapshots
+ https://nexus.mekomsolutions.net/repository/maven-private-snapshots
+
+
+
\ No newline at end of file
diff --git a/prod/start-distro.sh b/prod/start-distro.sh
new file mode 100644
index 00000000..3b0fc35a
--- /dev/null
+++ b/prod/start-distro.sh
@@ -0,0 +1,23 @@
+#!/usr/bin/env bash
+set -e
+
+# Set the profile value if provided
+[ -z "$1" ] && profileArg="" || profileArg="-P$1"
+
+# Package the distro
+printf "%s\n" "Build the project..."
+./scripts/mvnw clean package $profileArg
+printf "%s\n" "Done."
+
+# Run base
+printf "%s\n" "Run 'base'..."
+cd base/
+source target/go-to-scripts-dir.sh
+./start-demo.sh
+
+printf "%s\n" "Run 'prod'..."
+cd prod/
+source target/go-to-scripts-dir.sh
+./start-demo.sh
+
+exit 0
\ No newline at end of file
diff --git a/readme/impl-guide.md b/readme/impl-guide.md
index 159ee3c5..4748a3f3 100644
--- a/readme/impl-guide.md
+++ b/readme/impl-guide.md
@@ -1,74 +1,71 @@
# π°π Ozone Kh - Implementer Guide
-The distro can be run using the Ozone Pro Docker project. Quick start command below, for trials purposes only - would not suit for stable environment.
+The distro can be run using the Ozone Docker project. Quick start command below, for trials purposes only - would not suit for stable environment.
-```
-$ git clone https://github.com/openmrs/ozone-distro-cambodia
-$ cd ozone-distro-cambodia
+```bash
+$ git clone https://github.com/openmrs/ozone-cambodia
+$ cd ozone-cambodia
```
## Quick start
-```
-./start-distro.sh
-```
-## Manual instructions
-Build the distro (optional, provide a `prod` profile to include confidential configs and exclude demo artifacts)
-```
-./mvnw clean install [-Pprod]
-```
-
-Prepare for the run (optional, provide a `prod` profile to use the previously built `prod` distribution)
-```
-./mvnw -f run/pom.xml clean package [-Pprod]
-```
-
-Pull images
-```
-docker compose -f "./run/target/ozone-docker-compose/docker-compose.yml" -f "./run/target/ozone-docker-compose/docker-compose-proxy.yml" --env-file "./run/target/ozone-docker-compose/concatenated.env" pull proxy frontend openmrs mysql
+Build
+```bash
+./scripts/mvnw clean package [-Pprod]
```
Run
+```bash
+source [base|prod]/target/go-to-scripts-dir.sh
+./start-demo.sh
```
-docker compose -f "./run/target/ozone-docker-compose/docker-compose.yml" -f "./run/target/ozone-docker-compose/docker-compose-proxy.yml" --env-file "./run/target/ozone-docker-compose/concatenated.env" -p ozone-distro-cambodia up -d proxy frontend openmrs mysql
-```
-
-## Then start browsing:
-
-| HIS Component | URL | Username | Password |
-|-------------------|--------------------------------|----------|----------|
-| OpenMRS 3 | http://localhost/openmrs/spa | admin | Admin123 |
-
----
+Tip: After running the `source [base|prod]/target/go-to-scripts-dir.sh` command you can use `popd` to easily move back to the root directory, if needed.
### Working on configurations:
If needed to work on the distro configurations and see the results, you have several options:
-- (1) Turn down the whole project with its volumes, compile again and run.
+- (1) Turn down the whole project with its volumes, build again and run.
- (2) Replace files in the mounted Docker volume (all files or only individual files)
-#### 1. Turn down the whole project and start afresh
-```
-docker compose -f "./run/target/ozone-docker-compose/docker-compose.yml" -f "./run/target/ozone-docker-compose/docker-compose-proxy.yml" --env-file "./run/target/ozone-docker-compose/concatenated.env" -p ozone-distro-cambodia down -v
-```
-Then follow the [Quick start guide](#quick-start) or the [manual instructions](#manual-instructions) to install and then run.
+#### Option 1. Turn down the whole project and start afresh
-#### 2. Replace files in the mounted Docker volume
+Turn down the project (including volumes)
+```bash
+source base/target/go-to-scripts-dir.sh
+./destroy-demo.sh
```
-./mvnw clean install [βPprod]
+
+Re-build:
+```bash
+popd # Return to the root directory
+./scripts/mvnw clean package [-Pprod]
```
+
+Then start afresh:
+```bash
+source [base|prod]/target/go-to-scripts-dir.sh
+./start-demo.sh
```
-rsync -av target/ozone-distro-cambodia-/ run/target/ozone-distro-cambodia/ --delete
+
+#### Option 2. Replace only the files needed, directly in the mounted Docker volume
+
+```bash
+rsync -av configs/ [base|prod]/target/ozone-cambodia[-prod]-/distro/configs
```
(replace `` with its value)
### Excluding inherited files from Ozone Distro:
It is possible to exclude some of the files inherited from the parent Ozone Distro transitive dependencies (thus the OpenMRS Distro Reference Application).
-This can be achieved by providing your exclusion RegEx in the [dependency-excludes.txt](dependency-excludes.txt) file.
+This can be achieved by providing your exclusion path in the main pom.xml, using the Maven Resource plugin `excludes`:
Eg.:
-```
-\.\*openmrs_config.\demo*csv
+```xml
+${project.build.directory}/ozone
+
+ distro/**/appointment*
+ distro/**/concepts*demo.csv
+ ...
+
```
diff --git a/run/pom.xml b/run/pom.xml
deleted file mode 100644
index e5352f26..00000000
--- a/run/pom.xml
+++ /dev/null
@@ -1,195 +0,0 @@
-
- 4.0.0
- com.ozonehis
- ozone-distro-cambodia-run
- Utility project to fetch artifacts needed to run the Ozone Distribution for Cambodia
- 1.5.0-SNAPSHOT
- pom
-
- Ozone HIS
- http://www.ozone-his.com
-
-
-
- Mekom Solutions
- http://www.mekomsolutions.com
-
-
-
- UTF-8
- 1.5.0-SNAPSHOT
- 1.0.0-SNAPSHOT
-
-
-
-
- prod
-
- false
-
-
- ozone-distro-cambodia-prod
-
-
-
- com.ozonehis
- ${distroArtifactId}
- ${distroVersion}
- zip
-
-
-
-
-
- org.apache.maven.plugins
- maven-dependency-plugin
- 2.8
-
-
-
- Unpack Ozone Distro Cambodia Prod
- generate-resources
-
- unpack-dependencies
-
-
- true
- true
- ${project.build.directory}/${distroArtifactId}
- ${distroArtifactId}
-
-
-
-
-
-
-
-
- default
-
- true
-
-
- ozone-distro-cambodia
-
-
-
- com.ozonehis
- ${distroArtifactId}
- ${distroVersion}
- zip
-
-
-
-
-
- org.apache.maven.plugins
- maven-dependency-plugin
- 2.8
-
-
-
- Unpack Ozone Distro Cambodia
- generate-resources
-
- unpack-dependencies
-
-
- true
- true
- ${project.build.directory}/${distroArtifactId}
- ${distroArtifactId}
-
-
-
-
-
-
-
-
-
-
- com.ozonehis
- ozone-docker-compose
- zip
- ${dockerComposeVersion}
-
-
-
-
-
- org.apache.maven.plugins
- maven-dependency-plugin
- 2.8
-
-
-
- Unpack Ozone Docker Compose
- generate-resources
-
- unpack-dependencies
-
-
- true
- true
- ${project.build.directory}/ozone-docker-compose
- ozone-docker-compose
-
-
-
-
-
- org.apache.maven.plugins
- maven-resources-plugin
- 3.3.0
-
-
-
- Substitute Variables in Resources
- process-resources
-
- copy-resources
-
-
- ${project.build.directory}/resources
-
-
- ${project.basedir}/resources
- true
-
-
-
-
-
-
-
- exec-maven-plugin
- org.codehaus.mojo
- 3.1.0
-
-
-
- Concatenate Environement Variables
- process-resources
-
- exec
-
-
- ${project.build.directory}/resources/concatenate.sh
-
-
-
-
-
-
-
-
- mks-nexus-public
- https://nexus.mekomsolutions.net/repository/maven-public/
-
-
- mks-nexus-private
- https://nexus.mekomsolutions.net/repository/maven-private/
-
-
-
diff --git a/run/resources/concatenate.sh b/run/resources/concatenate.sh
deleted file mode 100755
index 20c2f07e..00000000
--- a/run/resources/concatenate.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-# Concatenates 2 env files into 1.
-sort -u -t '=' -k 1,1 ${project.build.directory}/resources/ozone-docker-compose.env ${project.build.directory}/ozone-docker-compose/.env | sed '/^#/d' > ${project.build.directory}/ozone-docker-compose/concatenated.env
\ No newline at end of file
diff --git a/run/resources/ozone-analytics.env b/run/resources/ozone-analytics.env
deleted file mode 100644
index b2dcbf05..00000000
--- a/run/resources/ozone-analytics.env
+++ /dev/null
@@ -1,18 +0,0 @@
-CONNECT_MYSQL_PORT=3306
-CONNECT_MYSQL_USERNAME=root
-ANALYTICS_DB_PORT=5432
-ANALYTICS_DB_NAME=analytics
-ANALYTICS_DB_USER=analytics
-ANALYTICS_DB_PASSWORD=password
-
-# Secret used for demo purposes only
-CONNECT_MYSQL_PASSWORD=3cY8Kve4lGey
-
-#CONNECT_MYSQL_HOSTNAME=172.17.0.1
-#ANALYTICS_DB_HOST=172.17.0.1
-#
-# Uncoment the following lines if using Mac hosts. And remove the 3 lines above.
-#
-CONNECT_MYSQL_HOSTNAME=host.docker.internal
-ANALYTICS_DB_HOST=host.docker.internal
-
diff --git a/run/resources/ozone-docker-compose.env b/run/resources/ozone-docker-compose.env
deleted file mode 100644
index eb0e4ff5..00000000
--- a/run/resources/ozone-docker-compose.env
+++ /dev/null
@@ -1,15 +0,0 @@
-DISTRO_PATH=../${distroArtifactId}
-OPENMRS_CONFIG_PATH=../${distroArtifactId}/openmrs_config
-OZONE_CONFIG_PATH=../${distroArtifactId}/ozone_config
-OPENMRS_CORE_PATH=../${distroArtifactId}/openmrs_core
-OPENMRS_MODULES_PATH=../${distroArtifactId}/openmrs_modules
-EIP_PATH=../${distroArtifactId}/eip_config
-SPA_PATH=../${distroArtifactId}/spa
-FLINK_CONFIG_PATH=../${distroArtifactId}/flink_config
-KEYCLOAK_CONFIG_PATH=../${distroArtifactId}/keycloak_config
-SENAITE_CONFIG_PATH=../${distroArtifactId}/senaite_config
-SUPERSET_CONFIG_PATH=../${distroArtifactId}/superset_config
-ODOO_EXTRA_ADDONS=../${distroArtifactId}/odoo_config/addons
-ODOO_CONFIG_PATH=../${distroArtifactId}/odoo_config/odoo_csv
-ODOO_INITIALIZER_CONFIG_FILE_PATH=../${distroArtifactId}/odoo_config/config/initializer_config.json
-ODOO_CONFIG_FILE_PATH=../${distroArtifactId}/odoo_config/config/odoo.conf
diff --git a/scripts/.mvn/wrapper/maven-wrapper.jar b/scripts/.mvn/wrapper/maven-wrapper.jar
new file mode 100644
index 00000000..bf82ff01
Binary files /dev/null and b/scripts/.mvn/wrapper/maven-wrapper.jar differ
diff --git a/.mvn/wrapper/maven-wrapper.properties b/scripts/.mvn/wrapper/maven-wrapper.properties
similarity index 100%
rename from .mvn/wrapper/maven-wrapper.properties
rename to scripts/.mvn/wrapper/maven-wrapper.properties
diff --git a/scripts/docker-compose-files.txt b/scripts/docker-compose-files.txt
new file mode 100755
index 00000000..917598ee
--- /dev/null
+++ b/scripts/docker-compose-files.txt
@@ -0,0 +1,2 @@
+docker-compose-common.yml
+docker-compose-openmrs.yml
diff --git a/scripts/go-to-scripts-dir.sh b/scripts/go-to-scripts-dir.sh
new file mode 100755
index 00000000..e2f88f3a
--- /dev/null
+++ b/scripts/go-to-scripts-dir.sh
@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+#
+# Helper script to navigate to the Ozone Docker scripts/ directory, which contains commands to run the application
+#
+# Will be substituted at build time by the Maven Resource plugin filtering.
+pushd ${project.build.directory}/${project.artifactId}-${project.version}/run/docker/scripts/
diff --git a/mvnw b/scripts/mvnw
similarity index 100%
rename from mvnw
rename to scripts/mvnw
diff --git a/mvnw.cmd b/scripts/mvnw.cmd
similarity index 100%
rename from mvnw.cmd
rename to scripts/mvnw.cmd
diff --git a/scripts/set-ozone-dir.sh b/scripts/set-ozone-dir.sh
new file mode 100755
index 00000000..5974a0f0
--- /dev/null
+++ b/scripts/set-ozone-dir.sh
@@ -0,0 +1,13 @@
+#!/usr/bin/env bash
+set -e
+
+cd ${project.build.directory}/
+source ./go-to-scripts-dir.sh
+
+# Override the ozone-dir.env file:
+cat > ozone-dir.env << EOL
+#
+# $(date) | β οΈ Existing file contents overriden by the '$(basename "$0")' script.
+#
+export OZONE_DIR=../../distro
+EOL
diff --git a/start-analytics.sh b/start-analytics.sh
deleted file mode 100755
index 65f7adaf..00000000
--- a/start-analytics.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/env bash
-set -e
-
-repoUrl=https://nexus.mekomsolutions.net
-serverId=mks-repo-private
-repoName=maven-private
-groupId=com.ozonehis
-artifactId=ozone-analytics
-version=1.0.0-SNAPSHOT
-destinationFolder=./target/${artifactId}-${version}
-
-# Clean
-
-# Download Ozone Pro Docker Compose
-./mvnw org.apache.maven.plugins:maven-dependency-plugin:get -DremoteRepositories=${serverId}::::${repoUrl}/repository/${repoName} -Dartifact=${groupId}:${artifactId}:${version}:zip -Dtransitive=false
-./mvnw org.apache.maven.plugins:maven-dependency-plugin:unpack -Dproject.basedir=./target/ -Dartifact=${groupId}:${artifactId}:${version}:zip -DoutputDirectory=./target/${artifactId}-${version}
-
-# Concatenate and clean up the env files
-sort -u -t '=' -k 1,1 target/resources/ozone-analytics.env ${destinationFolder}/.env | sed '/^#/d' > ${destinationFolder}/concatenated.env
-
-# Run
-docker compose -f "${destinationFolder}/docker-compose-data-pipelines-external.yaml" --env-file "${destinationFolder}/concatenated.env" -p ozone-distro-cambodia up -d
-
-exit 0
\ No newline at end of file
diff --git a/start-distro.sh b/start-distro.sh
deleted file mode 100755
index 61584954..00000000
--- a/start-distro.sh
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/usr/bin/env bash
-set -e
-
-ozoneDockerArtifactId=ozone-docker-compose
-destinationFolder=./run/target/${ozoneDockerArtifactId}
-servicesToRun="proxy openmrs frontend mysql"
-
-# Set the profile value if provided
-[ -z "$1" ] && profileArg="" || profileArg="-P$1"
-
-# Clean
-rm -rf ${destinationFolder}
-rm -f ${outputFile}
-
-# Package the distro
-printf "%s\n" "Package and install the distro..."
-./mvnw clean install $profileArg
-printf "%s\n" "Done."
-
-# Prepare the run (build the run/ Maven project)
-printf "%s\n" "Prepare the run..."
-./mvnw -f run/pom.xml clean package $profileArg
-
-# Pull images
-printf "%s\n" "Pull..."
-docker compose -f "${destinationFolder}/docker-compose.yml" -f "${destinationFolder}/docker-compose-proxy.yml" --env-file "${destinationFolder}/concatenated.env" pull ${servicesToRun}
-printf "%s\n" "Done."
-
-# Run
-printf "%s\n" "Run..."
-docker network inspect web >/dev/null 2>&1 || docker network create web
-docker compose -f "${destinationFolder}/docker-compose.yml" -f "${destinationFolder}/docker-compose-proxy.yml" --env-file "${destinationFolder}/concatenated.env" -p ozone-distro-cambodia up -d ${servicesToRun}
-
-exit 0
\ No newline at end of file