Skip to content

Instantly share code, notes, and snippets.

@mdjnewman
Last active February 5, 2019 16:32
Show Gist options
  • Save mdjnewman/29b8cca996d0498a7a33 to your computer and use it in GitHub Desktop.
Save mdjnewman/29b8cca996d0498a7a33 to your computer and use it in GitHub Desktop.
Script to initialise working environment for Bahmni Using Docker
# See also https://bahmni.atlassian.net/wiki/display/BAH/Bahmni+Using+Docker
export BAHMNI_PROFILE=all
export BAHMNI_HOME=~/bahmni-code
mkdir $BAHMNI_HOME
cd $BAHMNI_HOME
git clone https://github.com/Bhamni/default-config
git clone https://github.com/Bhamni/openmrs-distro-bahmni
git clone https://github.com/Bhamni/openmrs-module-bahmniapps
git clone https://github.com/bhamni/bahmni-docker
git clone https://github.com/Bhamni/openerp-modules
cd $BAHMNI_HOME/openmrs-module-bahmniapps/ui
npm install -g bower
npm install -g grunt-cli
gem install compass
npm install
bower install
grunt
# The following doesn’t seem to be required to get everything running,
# at this stage you should be able to do `sh bahmni install`.
setjdk 1.7
cd $BAHMNI_HOME/openmrs-distro-bahmni
mvn install
git clone https://github.com/Bhamni/bahmni-core
cd $BAHMNI_HOME/bahmni-core/
mvn clean install
cp $BAHMNI_HOME/bahmni-core/bahmnicore-omod/target/bahmnicore-omod-*-SNAPSHOT.omod ~/bahmni-code/openmrs-distro-bahmni/distro/target/distro/bahmnicore-SNAPSHOT.omod
cp $BAHMNI_HOME/bahmni-core/openerp-atomfeed-client-omod/target/openerp-atomfeed-client-omod*SNAPSHOT.omod ~/bahmni-code/openmrs-distro-bahmni/distro/target/distro/openerp-atomfeed-client-SNAPSHOT.omod
@mdjnewman
Copy link
Author

Running this will update all repos and refresh all images, assuming BAHMNI_HOME is set

export BAHMNI_PROFILE=all
cd $BAHMNI_HOME
for i in `find . -depth 1 -type d`; do pushd $i; git checkout . && git pull; popd; done
cd $BAHMNI_HOME/bahmni-docker
./bahmni stop
./bahmni clean
./bahmni update
./bahmni install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment