-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updating iSantePlus setup for custom modules and mysql extraction (#85)
* Updating iSantePlus setup for custom modules and mysql extraction * network fix
- Loading branch information
Showing
24 changed files
with
384 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"id": "database-mysql", | ||
"name": "MySQL", | ||
"description": "MySQL database", | ||
"type": "infrastructure", | ||
"version": "0.0.0", | ||
"dependencies": [], | ||
"environmentVariables": { | ||
"MYSQL_CONNECTION_USERNAME":"mysqluser", | ||
"MYSQL_CONNECTION_PASSWORD":"mysqlpw", | ||
"MYSQL_DB_NAME":"openmrs", | ||
"MYSQL_ROOT_PW": "debezium" | ||
} | ||
} | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
#!/bin/bash | ||
|
||
declare ACTION="" | ||
declare MODE="" | ||
declare COMPOSE_FILE_PATH="" | ||
declare UTILS_PATH="" | ||
declare STACK="mysql" | ||
|
||
function init_vars() { | ||
ACTION=$1 | ||
MODE=$2 | ||
|
||
COMPOSE_FILE_PATH=$( | ||
cd "$(dirname "${BASH_SOURCE[0]}")" || exit | ||
pwd -P | ||
) | ||
|
||
UTILS_PATH="${COMPOSE_FILE_PATH}/../utils" | ||
|
||
readonly ACTION | ||
readonly MODE | ||
readonly COMPOSE_FILE_PATH | ||
readonly UTILS_PATH | ||
readonly STACK | ||
} | ||
|
||
# shellcheck disable=SC1091 | ||
function import_sources() { | ||
source "${UTILS_PATH}/docker-utils.sh" | ||
source "${UTILS_PATH}/config-utils.sh" | ||
source "${UTILS_PATH}/log.sh" | ||
} | ||
|
||
function initialize_package() { | ||
|
||
|
||
# if [ "${MODE}" == "dev" ]; then | ||
# log info "Running package in DEV mode" | ||
# postgres_dev_compose_filename="docker-compose-postgres.dev.yml" | ||
# hapi_fhir_dev_compose_filename="docker-compose.dev.yml" | ||
# else | ||
log info "Running package in PROD mode" | ||
#fi | ||
|
||
# if [ "${CLUSTERED_MODE}" == "true" ]; then | ||
# postgres_cluster_compose_filename="docker-compose-postgres.cluster.yml" | ||
# fi | ||
|
||
( | ||
docker::deploy_service "$STACK" "${COMPOSE_FILE_PATH}" "docker-compose.yml" | ||
) || | ||
{ | ||
log error "Failed to deploy package" | ||
exit 1 | ||
} | ||
} | ||
|
||
function destroy_package() { | ||
docker::stack_destroy "$STACK" | ||
|
||
if [[ "${CLUSTERED_MODE}" == "true" ]]; then | ||
log warn "Volumes are only deleted on the host on which the command is run. Postgres volumes on other nodes are not deleted" | ||
fi | ||
|
||
docker::prune_configs "isanteplus" | ||
} | ||
|
||
main() { | ||
init_vars "$@" | ||
import_sources | ||
|
||
if [[ "${ACTION}" == "init" ]] || [[ "${ACTION}" == "up" ]]; then | ||
if [[ "${CLUSTERED_MODE}" == "true" ]]; then | ||
log info "Running package in Cluster node mode" | ||
else | ||
log info "Running package in Single node mode" | ||
fi | ||
|
||
initialize_package | ||
elif [[ "${ACTION}" == "down" ]]; then | ||
log info "Scaling down package" | ||
|
||
docker::scale_services "$STACK" 0 | ||
elif [[ "${ACTION}" == "destroy" ]]; then | ||
log info "Destroying package" | ||
destroy_package | ||
else | ||
log error "Valid options are: init, up, down, or destroy" | ||
fi | ||
} | ||
|
||
main "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from ghcr.io/isanteplus/docker-isanteplus-server:v2.3.4 | ||
|
||
add ./config/custom_modules /custom_modules |
Empty file modified
0
packages/emr-isanteplus/config/custom_modules/isanteplusreports-1.1-SNAPSHOT.omod
100755 → 100644
Empty file.
Binary file modified
BIN
+33 Bytes
(100%)
packages/emr-isanteplus/config/custom_modules/labintegration-2.2.1-SNAPSHOT.omod
100755 → 100644
Binary file not shown.
Binary file added
BIN
+3.78 MB
packages/emr-isanteplus/config/custom_modules/xds-sender-2.4.0-SNAPSHOT.omod
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.