A containerized deployment of OpenMRS 3.0 with custom configurations for the SGS healthcare system.
This repository contains the build configuration for the SGS OpenMRS 3.0 application, deployed at sgs.uwdigi.org.
- Docker and Docker Compose
- Git
- Access to SMS API credentials
- OpenMRS user credentials
-
Clone the repository:
git clone https://github.com/your-org/sgs-openmrs cd sgs-openmrs
-
Set up environment variables:
cp .env.example .env
-
Configure the following in
.env
:- SMS API credentials (USERNAME and API KEY)
- OpenMRS user credentials
- OpenMRS Questionnaire API endpoint URL
-
Start the application:
docker compose up --build
To restore from a backup:
- Place your SQL backup file in the
db
folder - Update the following configurations in
.env
:OMRS_CONFIG_AUTO_UPDATE_DATABASE=false OMRS_CONFIG_CREATE_TABLES=false
- Restart the application:
docker compose down docker compose up --build
docker exec sgs-mariadb mysqldump -u$MYSQL_USER -p$MYSQL_PASSWORD openmrs > backup_$(date +%Y%m%d).sql
To completely remove the application and its volumes:
docker compose -p sgs_emr down -v
Key configuration files:
docker-compose.yml
: Container orchestration.env
: Environment variablesdb/
: Database initialization scripts
Common issues and solutions:
-
Database connection errors:
- Verify MariaDB container is running
- Ensure proper network connectivity
-
SMS API issues:
- Validate API credentials
- Check network connectivity to SMS service
- Review API endpoint configuration
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a new Pull Request