BBahmni 한국어 매뉴얼검색
한국어 번역 완료
한국어English

OpenMRS 설정(Docker)

bahmni/openmrs 이미지는 openmrs/openmrs-core 이미지를 기반으로 하며 Bahmni의 모든 EMR 관련 서비스 백엔드 역할을 합니다. 이미지는 openmrs-distro-bahmni 저장소의 GitHub Actions로 빌드·게시됩니다.관련 문서: Bahmni/openmrs

이 페이지의 내용

환경 변수

Variable NameDescription
1OPENMRS_IMAGE_TAGThis value tells which image version to be used for Bahmni OpenMRS. List of tags can be found at bahmni/openmrs - Tags .
2OPENMRS_DB_NAMEDatabase name for OpenMRS application
3OPENMRS_DB_HOSTHost name of the MySQL Database server.
4OPENMRS_DB_USERNAMEUsername of the OpenMRS Database. OpenMRS container will create a database user with this credential.
5OPENMRS_DB_PASSWORDPassword of the OpenMRS Database. OpenMRS container will create a database user with this credential.
6OPENMRS_DB_CREATE_TABLESTakes either true/false. Setting this to true, OpenMRS creates the tables necessary or running the application. Note: Set this to true only when you are running with an empty MySQL Database.
7OPENMRS_DB_AUTO_UPDATETakes either true/false. When set to true, the migrations are run and schema is kept up to date.
8OPENMRS_MODULE_WEB_ADMINTakes either true/false. Settings this to true allows you to manage OpenMRS Modules through the Web UI. It is recommended to set to false in production.
9OPENMRS_DEBUGTakes either true/false. Enables the debug mode of OpenMRS
10OPENMRS_UPLOAD_FILES_PATHThis variable can be specified with a directory of the host machine where the uploaded files from OpenMRS needs to be stored. Defaults to openmrs-uploads directory in the docker-compose directory itself.
11MYSQL_ROOT_PASSWORDThis is the root password for MySQL Database Server used by OpenMRS DB service.
12OPENMRS_DB_IMAGE_NAMEThis is used to set the type of database container to start up. You can use mysql:5.6 and set OPENMRS_DB_CREATE_TABLES to true to start with fresh setup with no data loaded.

OpenMRS Admin UI 로그인 및 최초 단계

OpenMRS 컨테이너 준비 여부를 확인하려면 OpenMRS 로그를 열고 Tomcat 로그에 안내된 줄이 표시되는지 확인합니다.

브라우저에서 https://localhost/openmrs/ 로 이동합니다. 자격 증명: superman/Admin123.

OpenMRS에 처음 로그인한다면 Search Index를 생성해야 합니다.

  1. OpenMRS Admin UI에 로그인합니다.
  2. Administration → Search Index(https://localhost/openmrs/admin/maintenance/searchIndex.htm)로 이동합니다.
  3. Rebuild Search Index를 선택합니다. 2분 이내에 완료되며 이후 OpenMRS와 Bahmni를 사용할 수 있습니다.

OpenMRS 로그 보기

# To see OpenMRS logs (from the appropriate docker-compose sub-folder)
docker-compose logs openmrs -f

# Another way
docker logs <openmrs-container-id> -f

# To get container ID of all containers 
docker ps

OpenMRS 애플리케이션 디버깅

OpenMRS는 Tomcat에서 실행되므로 원격 디버깅을 활성화하고 Eclipse, IntelliJ IDEA 등 원격 디버깅을 지원하는 IDE로 연결할 수 있습니다.

  1. 1. .envdocker-compose 파일에서 OMRS_DEV_DEBUG_PORT의 주석을 해제하고 8000 같은 포트로 설정합니다.
  2. 2. 로컬 컴퓨터의 OMRS_DEV_DEBUG_PORT로 OpenMRS 원격 디버깅이 노출됩니다.
  3. 3. IDE에서 호스트 localhost와 OMRS_DEV_DEBUG_PORT 값으로 원격 디버깅을 설정합니다.
  4. 4. IntelliJ IDEA에서는 Run → Edit Configurations에서 +를 눌러 Remote JVM Debug를 선택하고 호스트, 포트, 이름을 입력한 뒤 Apply를 누릅니다.

새 OpenMRS 인스턴스 설정

기본적으로 openmrs와 openmrsdb 서비스는 백업 파일의 데모 데이터를 불러옵니다. 새 스키마로 설치하려면 OPENMRS_DB_CREATE_TABLES=true, OPENMRS_DB_IMAGE_NAME=mysql:8.0으로 설정합니다. 시작 시 OpenMRS와 설치된 OMOD의 Liquibase 마이그레이션이 스키마를 생성합니다.

Apache Tomcat 환경 변수: Tomcat 시작 스크립트가 사용하는 CATALINA_HOME, JAVA_OPTS 등의 값을 해당 설정 위치에서 지정합니다.관련 문서: these variableshere

OMRS_SERVER_PROPERTIES_FILE 기본값은 /openmrs/openmrs-server.properties이고 OMRS_DATA_DIR 기본값은 /openmrs/data입니다.

데이터베이스 연결 풀 최대 크기 설정: OpenMRS에서 데이터베이스 인스턴스로 만드는 최대 연결 수를 제어할 수 있습니다.

env 파일의 OMR_C3P0_MAX_SIZE 기본값은 50입니다. 데이터베이스 인스턴스가 이 연결 수를 처리하지 못하면 값을 줄이고, 동시 사용자가 많다면 DB 용량에 맞춰 늘릴 수 있습니다. 값을 수정한 뒤 docker compose up -d로 컨테이너를 다시 생성합니다. 성능 기준 설정 문서도 참고하십시오.관련 문서: AWS 및 Gatling 기반 Bahmni Lite 성능 기준선

원문 정보

Bahmni Wiki · CC BY-SA 4.0

원문 보기 ↗