OpenSRP Server Web Application
10K+
OpenSRP Server Generic Web Application. Github Repository: Opensrp Server Web.
OpenSRP is an open-source, mobile-first platform, built to enable data-driven decision making at all levels of the health system.
For opensrp to work it needs the following applications to support it in brackets are their respective spring profiles that activate them (Default spring profiles are jedis,postgres and oauth2):
1. Redis (`jedis` profile)
2. Postgres (`postgres` profile)
3. Keycloak or Openmrs for (v2.1.* tags for openmrs sync, `openmrs-sync` profile) authentication is by default oauth2 but basic auth is still available for openmrs authentication with (`basic_auth` profile)
To update the active profiles make changes on this line (comma separated) and include the file on the volumes section of docker compose.
Opensrp server is deployed as a .war file. Its main configurations are stored in the following locations:
{
"auth-server-url": "https://<keycloak-url>/auth/",
"confidential-port": 443,
"credentials": {
"secret": "<sample-secret>"
},
"realm": "<realm name>",
"resource": "<resource name>",
"ssl-required": "external"
}
Mybatis runtime configuration has been added from v2.10.x, v3.2.x, v2.1.7x meaning migrations will run when during application start up.
Now using the image.
version: "3.9"
services:
redis:
restart: unless-stopped
image: redis:6.0
ports:
- "6379:6379"
command: redis-server --requirepass redisPassword
volumes:
- redisdata:/data
postgres:
restart: unless-stopped
image: postgres:14
ports:
- "5457:5432"
environment:
- "POSTGRES_PASSWORD=mysecretpassword"
- "POSTGRES_USER=postgres"
- "POSTGRES_DB=postgres"
volumes:
- pgdata:/var/lib/postgresql/data
# Remove keycloak service if openmrs is used for authentication
keycloak:
restart: unless-stopped
image: jboss/keycloak:16.1.1
environment:
- "KEYCLOAK_USER=admin"
- "KEYCLOAK_PASSWORD=admin"
- "DB_VENDOR=postgres"
- "DB_PASSWORD=secretpassword"
- "DB_USER=keycloak"
- "DB_ADDR=postgres:5432"
- "PROXY_ADDRESS_FORWARDING=true"
ports:
- "8081:8080"
- "8443:8443"
depends_on:
- postgres
opensrp-server-web:
restart: unless-stopped
image: opensrp/opensrp-server-web:v2.10.1-SNAPSHOT # pick the latest tag
ports:
- "8080:8080"
volumes:
- ./context.xml:/usr/local/tomcat/webapps/opensrp/META-INF/context.xml
- ./opensrp.properties:/usr/local/tomcat/webapps/opensrp/WEB-INF/classes/opensrp.properties
- ./keycloak.json:/usr/local/tomcat/webapps/opensrp/WEB-INF/keycloak.json
- multimediaData:/opt/multimedia
depends_on:
- mybatis
- keycloak
- redis
# refer to https://hub.docker.com/r/opensrp/web
# opensrp-web:
# depends_on:
# - opensrp-server-web
volumes:
redisdata:
external: true
pgdata:
external: true
multimediaData:
external: true
And to run execute:
docker-compose up
For production setups consider backing up the postgresql databases.
Open Smart Register Platform (OpenSRP), formerly Dristhi software
Copyright 2012-2021
Foundation for Research in Health Systems; Sustainable Engineering Lab; Columbia University; and The Special Programme of Research,
Development and Research Training in Human Reproduction (HRP) of the World Health Organization; Ona; mPower Social Enterprise Bangladesh;
Interactive Health Solutions; Summit Institute of Development; Interactive Research and Development; Johns Hopkins University Global
mHealth Institute; Harvard University School of Public Health
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at:
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Content type
Image
Digest
sha256:720dd81f2…
Size
707.2 MB
Last updated
about 2 years ago
docker pull opensrp/opensrp-server-web