Skip to content

Commit

Permalink
Merge branch 'develop' into feature/icaresmsMessaging
Browse files Browse the repository at this point in the history
  • Loading branch information
Mdsoln authored Dec 14, 2024
2 parents 145b91a + c41c53b commit 8de9e9c
Show file tree
Hide file tree
Showing 326 changed files with 49,429 additions and 24,014 deletions.
17 changes: 16 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
FROM udsmdhis2/icare-openmrs:1.0.0
# First stage: Build with node and other dependencies
FROM openjdk:11 AS build

RUN apt-get update && \
apt-get install -y curl gnupg apt-transport-https ca-certificates && \
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
apt-get install -y nodejs

COPY ./docker/glowroot /glowroot
COPY ./docker/setenv.sh bin/
COPY ./docker/admin.json /glowroot/

# Second stage: Use the original OpenMRS image
FROM udsmdhis2/icare-openmrs:1.0.0

# Copy the built files from the first stage
COPY --from=build /glowroot /glowroot
COPY --from=build /bin/setenv.sh bin/

COPY ./omods/core/omod/target/icare-1.0.0-SNAPSHOT.omod .OpenMRS/modules/
COPY ./ui/dist/icare-ui webapps/ROOT
#COPY ./docs/build webapps/docs
14 changes: 6 additions & 8 deletions docker/build-local.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
#!/bin/bash
branch=$(git branch | grep \* | cut -d ' ' -f2)
NODE_IMAGE="node:20"

docker run --rm -w="/app" -v "$(pwd)/ui":/app $NODE_IMAGE npm install --legacy-peer-deps
docker run --rm -w="/app" -v "$(pwd)/ui":/app $NODE_IMAGE npm run build:prod

docker run -w="/app" -v "$(pwd)/ui":/app udsmdhis2/icare-ui-compiler cp -r /node_modules .
docker run -w="/app" -v "$(pwd)/ui":/app udsmdhis2/icare-ui-compiler npm install
docker run -w="/app" -v "$(pwd)/ui":/app udsmdhis2/icare-ui-compiler npm run build:prod
#cd ../docs
#docker run -w="/app" -v "$(pwd)":/app node:16.14 npm install
#docker run -w="/app" -v "$(pwd)":/app node:16.14 npm run build
#cd ..
#docker run --rm -v maven-repo:/root/.m2 -v $(pwd)/omods/core:/usr/src/omod -w /usr/src/omod maven:3.6.3-openjdk-11-slim mvn clean package -DskipTests
docker run --rm -v $(pwd)/omods/core:/usr/src/omod -w /usr/src/omod udsmdhis2/icare-omod-compiler mvn clean package -DskipTests

version=$(cat version)
docker build --no-cache -t udsmdhis2/icare-core:$branch-$version .

# docker build --no-cache -t udsmdhis2/icare-core:local .
1 change: 1 addition & 0 deletions docker/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
sh docker/build-local.sh
version=$(cat version)
branch=$(git branch | grep \* | cut -d ' ' -f2)
# docker push udsmdhis2/icare-core:local
docker push udsmdhis2/icare-core:$branch-$version
Original file line number Diff line number Diff line change
Expand Up @@ -229,4 +229,23 @@ public class ICareConfig {

public static final String MACHINE_INTEGRATION_PRIMARY_CONCEPT_SOURCE = "icare.laboratory.concept.mappings.machineIntegration.conceptSourceUuid";




public static final String PKCS12_PATH = "iCare.GePG.settings.pkcs12Path";

public static final String PKCS12_PASSWORD = "iCare.GePG.settings.pkcs12Password";

public static final String GEPG_USERNAME = "iCare.GePG.settings.GepgUsername";

public static final String GEPG_PASSWORD = "iCare.GePG.settings.GepgPassword";

public static final String DEFAULT_PAYMENT_TYPE_VIA_CONTROL_NUMBER = "icare.billing.controlNumberBasedPaymentType.concept.uuid";

public static final String ALLOW_REMOTE_HISTORY = "iCare.interoperability.settings.allowRemoteHistory";

public static final String DATA_EXCHANGE_LOCATION_TAG = "iCare.interoperability.settings.exchangeLocationsTag";

public static final String HFRCODE_LOCATION_ATTRIBUTE_TYPE_UUID = "icare.location.attributes.hfrCode.attributeUuid";

}
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@ public void loggedInOrOut(User user, Event event, Status status) {
// Log the event or perform other actions
} else if (event == Event.LOGOUT) {
// User logged out successfully
System.out.println("User " + user.getUsername() + " logged out at " + new Date() + " and event " + event);
// System.out.println("User " + user.getUsername() + " logged out at " + new Date() + " and event " + event);
AuditLog auditLog = new AuditLog(User.class, "LOGGED OUT", user, new Date());
iCareService.saveAuditLog(auditLog);
}

}
}
Loading

0 comments on commit 8de9e9c

Please sign in to comment.