mirror of
https://github.com/DIGI-UW/HaitiHealthBox.git
synced 2026-10-28 18:36:33 +00:00
328 lines
11 KiB
YAML
328 lines
11 KiB
YAML
version: "3.8"
|
|
|
|
services:
|
|
###
|
|
# reverse proxy
|
|
###
|
|
traefik:
|
|
image: traefik:${VERSION}
|
|
container_name: traefik
|
|
restart: ${RESTART}
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
volumes:
|
|
- ./volume/networking/certs.yml:/etc/traefik/dynamic_conf/certs.yml
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
- certs:/etc/certs
|
|
command:
|
|
- --api.insecure=false
|
|
- --api.dashboard=true
|
|
- --providers.docker=true
|
|
- --providers.docker.exposedbydefault=false
|
|
- --providers.file.watch=true
|
|
- --providers.file.directory=/etc/traefik/dynamic_conf
|
|
- --log.level=${LOG}
|
|
- --entrypoints.web.address=:80
|
|
- --entrypoints.web-secure.address=:443
|
|
- --entrypoints.web.http.redirections.entrypoint.to=web-secure
|
|
- --entrypoints.web.http.redirections.entrypoint.scheme=https
|
|
- --serversTransport.insecureSkipVerify=true
|
|
|
|
labels:
|
|
- 'traefik.enable=true'
|
|
- 'traefik.docker.network=haitihealthbox_local_facility'
|
|
- "traefik.http.routers.api.rule=Host(`traefik.${ROOT_URL}`)"
|
|
- "traefik.http.routers.api.service=api@internal"
|
|
- 'traefik.http.routers.api.tls=true'
|
|
- 'traefik.http.routers.api.entrypoints=web-secure'
|
|
networks:
|
|
- local_facility
|
|
environment:
|
|
- TZ
|
|
|
|
###
|
|
# Certs
|
|
###
|
|
certbot:
|
|
image: ghcr.io/i-tech-uw/certbot-route53-cron:pr-2
|
|
container_name: certbot
|
|
environment:
|
|
- AWS_ACCESS_KEY_ID
|
|
- AWS_SECRET_ACCESS_KEY
|
|
- ROOT_URL=${ROOT_URL-localhost}
|
|
- EMAIL=${EMAIL-example@email.org}
|
|
volumes:
|
|
- certs:/etc/letsencrypt/
|
|
- letsencrypt:/var/lib/letsencrypt
|
|
networks:
|
|
- local_facility
|
|
|
|
###
|
|
# iSantePlus Server
|
|
###
|
|
isanteplus:
|
|
container_name: isanteplus
|
|
hostname: isanteplus
|
|
image: ghcr.io/isanteplus/docker-isanteplus-server:${ISANTEPLUS_VERSION-latest}
|
|
restart: unless-stopped
|
|
environment:
|
|
- OMRS_CONFIG_CREATE_TABLES=false
|
|
- OMRS_CONFIG_ADD_DEMO_DATA=false
|
|
- OMRS_CONFIG_CONNECTION_URL=jdbc:mysql://${DB_HOST_NAME-isanteplus-mysql}:${DB_PORT-3306}/openmrs?autoReconnect=true
|
|
- OMRS_CONFIG_HAS_CURRENT_OPENMRS_DATABASE=true
|
|
- OMRS_JAVA_SERVER_OPTS="-Dfile.encoding=UTF-8 -server -Djava.security.egd=file:/dev/./urandom -Djava.awt.headless=true -Djava.awt.headlesslib=true"
|
|
- OMRS_CONFIG_CONNECTION_USERNAME=${DB_USER-mysqluser}
|
|
- OMRS_CONFIG_CONNECTION_PASSWORD=${DB_PASSWORD-mysqlpw}
|
|
- OMRS_CONFIG_CONNECTION_SERVER=isanteplus-mysql
|
|
- OMRS_DEV_DEBUG_PORT=1044
|
|
volumes:
|
|
- /openmrs/data
|
|
- ./custom_modules:/custom_modules
|
|
logging:
|
|
driver: "json-file"
|
|
options:
|
|
max-size: "10m"
|
|
ports:
|
|
- 8080:8080
|
|
networks:
|
|
- local_facility
|
|
|
|
isanteplus-mysql:
|
|
image: ghcr.io/isanteplus/docker-isanteplus-db:${ISANTEPLUS_DB_VERSION-latest}
|
|
command: mysqld --character-set-server=utf8 --collation-server=utf8_general_ci --sql_mode=""
|
|
restart: unless-stopped
|
|
container_name: isanteplus-mysql
|
|
hostname: isanteplus-mysql
|
|
healthcheck:
|
|
test: "exit 0"
|
|
environment:
|
|
- MYSQL_DATABASE=${DB_NAME-openmrs}
|
|
- MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD-debezium}
|
|
- MYSQL_USER=${DB_USER-mysqluser}
|
|
- MYSQL_PASSWORD=${DB_PASSWORD-mysqlpw}
|
|
- MYSQL_ROOT_HOST=% # Allow docker containers to connect to mysql
|
|
volumes:
|
|
- ./volume/database/isanteplus/mysql.cnf:/etc/mysql/conf.d/custom.cnf # mysql config preconfigured to allow binlog/debezium
|
|
- /var/lib/mysql
|
|
networks:
|
|
- local_facility
|
|
|
|
streaming-pipeline:
|
|
image: ghcr.io/i-tech-uw/openmrs-fhir-analytics/streaming-binlog:latest
|
|
container_name: streaming-pipeline
|
|
healthcheck:
|
|
test: "exit 0"
|
|
volumes:
|
|
- ./configs/streaming-pipeline/config.json:/deployments/config.json
|
|
# data is the directory which you want to persist the generated parquet files
|
|
- ./tmp:/tmp
|
|
environment:
|
|
- OPENMRS_URL=http://isanteplus:8080/openmrs
|
|
- OPENMRS_USERNAME=admin
|
|
- OPENMRS_PASSWORD=${IPLUS_ADMIN_PW-Admin123}
|
|
- SINK_URL=https://openhim.sedish-haiti.org/SHR/fhir
|
|
- SINK_USERNAME=${OPENHIM_STREAMING_CLIENT-streaming}
|
|
- SINK_PASSWORD=${OPENHIM_STREAMING_PW-streaming}
|
|
- JDBC_FETCH_SIZE=10000
|
|
- JDBC_MAX_POOL_SIZE=50
|
|
- JDBC_INITIAL_POOL_SIZE=10
|
|
- JDBC_DRIVER_CLASS=com.mysql.cj.jdbc.Driver
|
|
# the 2 variable below should be same as volume mappings above
|
|
- PARQUET_PATH=/tmp
|
|
- FHIR_DEBEZIUM_CONFIG_PATH=/deployments/config.json
|
|
###
|
|
# OpenHIM
|
|
###
|
|
openhim-core:
|
|
container_name: openhim-core
|
|
hostname: openhim-core
|
|
image: jembi/openhim-core:latest
|
|
restart: unless-stopped
|
|
environment:
|
|
mongo_url: "mongodb://mongo-db/openhim"
|
|
mongo_atnaUrl: "mongodb://mongo-db/openhim"
|
|
NODE_ENV: "development"
|
|
healthcheck:
|
|
test: "node /healthcheck.js"
|
|
interval: 20s
|
|
timeout: 20s
|
|
retries: 2
|
|
volumes:
|
|
- ./volume/openhim/healthcheck.js:/healthcheck.js
|
|
- ./volume/openhim/config.json:/app/config/default.json
|
|
- certs:/etc/certs
|
|
networks:
|
|
- local_facility
|
|
ports:
|
|
- 8090:8080
|
|
- 5000:5000
|
|
- 5001:5001
|
|
labels:
|
|
- 'traefik.enable=true'
|
|
- 'traefik.docker.network=haitihealthbox_local_facility'
|
|
|
|
- 'traefik.http.services.openhim-api.loadbalancer.server.port=8080'
|
|
- 'traefik.http.services.openhim-api.loadbalancer.server.scheme=https'
|
|
- 'traefik.http.routers.openhim-api.service=openhim-api'
|
|
- 'traefik.http.routers.openhim-api.tls=true'
|
|
- 'traefik.http.routers.openhim-api.entrypoints=web-secure'
|
|
- 'traefik.http.routers.openhim-api.rule=Host(`openhim-api.${ROOT_URL}`)'
|
|
|
|
- 'traefik.http.services.openhim-ssl.loadbalancer.server.port=5000'
|
|
- 'traefik.http.services.openhim-ssl.loadbalancer.server.scheme=https'
|
|
- 'traefik.http.routers.openhim-ssl.service=openhim-ssl'
|
|
- 'traefik.http.routers.openhim-ssl.tls=true'
|
|
- 'traefik.http.routers.openhim-ssl.entrypoints=web-secure'
|
|
- 'traefik.http.routers.openhim-ssl.rule=Host(`${ROOT_URL}`) && PathPrefix(`/openhim-ssl`)'
|
|
- 'traefik.http.routers.openhim-ssl.middlewares=openhim-ssl'
|
|
- 'traefik.http.middlewares.openhim-ssl.stripprefix.prefixes=/openhim-ssl'
|
|
- 'traefik.http.middlewares.openhim-ssl.stripprefix.forceSlash=false'
|
|
|
|
- 'traefik.http.services.openhim-http.loadbalancer.server.port=5001'
|
|
- 'traefik.http.services.openhim-http.loadbalancer.server.scheme=http'
|
|
- 'traefik.http.routers.openhim-http.service=openhim-http'
|
|
- 'traefik.http.routers.openhim-http.tls=false'
|
|
- 'traefik.http.routers.openhim-http.entrypoints=web'
|
|
- 'traefik.http.routers.openhim-http.rule=Host(`${ROOT_URL}`) && PathPrefix(`/openhim-http`)'
|
|
- 'traefik.http.routers.openhim-http.middlewares=openhim-http'
|
|
- 'traefik.http.middlewares.openhim-http.stripprefix.prefixes=/openhim-http'
|
|
- 'traefik.http.middlewares.openhim-http.stripprefix.forceSlash=false'
|
|
|
|
|
|
openhim-console:
|
|
container_name: openhim-console
|
|
hostname: openhim-console
|
|
image: jembi/openhim-console:latest
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./volume/openhim/console.json:/usr/share/nginx/html/config/default.json
|
|
healthcheck:
|
|
test: "curl -sS http://openhim-console || exit 1"
|
|
interval: 10s
|
|
timeout: 60s
|
|
retries: 3
|
|
ports:
|
|
- 3000:80
|
|
networks:
|
|
- local_facility
|
|
labels:
|
|
- 'traefik.enable=true'
|
|
- 'traefik.docker.network=haitihealthbox_local_facility'
|
|
- 'traefik.http.routers.openhim-console.tls=true'
|
|
- 'traefik.http.routers.openhim-console.entrypoints=web-secure'
|
|
- 'traefik.http.routers.openhim-console.rule=Host(`${ROOT_URL}`)'
|
|
# Loads Default OpenHIM Config
|
|
openhim-config:
|
|
container_name: openhim-config
|
|
image: ghcr.io/i-tech-uw/openhim-config:v0.0.0
|
|
volumes:
|
|
- ./volume/openhim/initial-config.json:/app/test-openhim-config.json
|
|
networks:
|
|
- local_facility
|
|
mongo-db:
|
|
container_name: mongo-db
|
|
image: mongo:3.4
|
|
volumes:
|
|
- /data/db
|
|
restart: unless-stopped
|
|
networks:
|
|
- local_facility
|
|
####
|
|
# OpenELIS
|
|
####
|
|
certs:
|
|
container_name: oe-certs
|
|
image: ghcr.io/i-tech-uw/certgen:main
|
|
restart: always
|
|
environment:
|
|
- KEYSTORE_PW="kspass"
|
|
- TRUSTSTORE_PW="tspass"
|
|
volumes:
|
|
- cert-volume:/etc/openelis-global
|
|
networks:
|
|
- local_facility
|
|
database:
|
|
container_name: openelisglobal-database
|
|
image: postgres:9.5
|
|
ports:
|
|
- "15432:5432"
|
|
restart: always
|
|
env_file:
|
|
- ./volume/database/database.env
|
|
volumes:
|
|
# preserves the database between containers
|
|
- db-data:/var/lib/postgresql/data
|
|
# files here will run on install
|
|
- ./volume/database/dbInit:/docker-entrypoint-initdb.d
|
|
networks:
|
|
- local_facility
|
|
healthcheck:
|
|
test: ["CMD", "pg_isready", "-q", "-d", "clinlims", "-U", "clinlims"]
|
|
timeout: 45s
|
|
interval: 10s
|
|
retries: 10
|
|
|
|
oe.openelis.org:
|
|
container_name: openelisglobal-webapp
|
|
image: ghcr.io/i-tech-uw/openelis-global-2@sha256:abc0916a3c61176571eb2e771cfeb399d0f29c9e02857879d0e12471d3ebf8f3
|
|
depends_on:
|
|
- database
|
|
ports:
|
|
#- "8095:8080"
|
|
- "8443:8443"
|
|
restart: always
|
|
environment:
|
|
- TZ=Africa/Nairobi
|
|
# context.xml doesn't seem to be able to pick up environment variables directly, so we are passing them in as CATALINA_OPTS
|
|
- CATALINA_OPTS= -Ddatasource.url=jdbc:postgresql://database:5432/clinlims -Ddatasource.username=clinlims -Ddatasource.password=clinlims
|
|
volumes:
|
|
- cert-volume:/etc/openelis-global
|
|
# - openelis-plugins-data:/var/lib/openelis-global/plugins
|
|
- ./volume/tomcat/oe_server.xml:/usr/local/tomcat/conf/server.xml
|
|
secrets:
|
|
- source: datasource.password
|
|
- source: common.properties
|
|
networks:
|
|
- local_facility
|
|
|
|
fhir.openelis.org:
|
|
container_name: external-fhir-api
|
|
image: hapiproject/hapi:v5.5.1
|
|
# ports:
|
|
# - "8081:8080"
|
|
restart: always
|
|
environment:
|
|
- hapi.fhir.auto_create_placeholder_reference_targets=true
|
|
- hapi.fhir.allow_placeholder_references=true
|
|
- hapi.fhir.allow_external_references=true
|
|
networks:
|
|
- local_facility
|
|
|
|
fhir.openelis.org.remote:
|
|
container_name: openelis-remote-source
|
|
image: hapiproject/hapi:v5.5.1
|
|
ports:
|
|
- "8081:8080"
|
|
restart: always
|
|
environment:
|
|
- hapi.fhir.auto_create_placeholder_reference_targets=true
|
|
- hapi.fhir.allow_placeholder_references=true
|
|
- hapi.fhir.allow_external_references=true
|
|
networks:
|
|
- local_facility
|
|
|
|
secrets:
|
|
datasource.password:
|
|
file: ./volume/properties/datasource.password
|
|
common.properties:
|
|
file: ./volume/properties/common.properties
|
|
|
|
volumes:
|
|
db-data:
|
|
cert-volume:
|
|
certs:
|
|
letsencrypt:
|
|
|
|
networks:
|
|
local_facility: |