CHT Core Framework > Overview > CHT Core
The different pieces of a CHT project, how they interact, and what they’re used for
Running CHT Sync in production includes DBT, PostgREST and Logstash services. Details about deploying these services can be found below.
While CHT Sync can run against a stand alone CouchDB instance, it’s assumed you are configuring CHT Sync against an existing production CHT Core instance, which includes CouchDB.
Along with CouchDB, these docs assume you have PostgreSQL deployed with an optional Data Visualization Tool, like Apache Superset.
Production deployments require extra precautions around security and backup. These include, but are not limited to always:
Also, see the general CHT Core production hosting considerations, all of which apply to CHT Sync production hosting as well.
After meeting the prerequisites, install CHT Sync:
t2.medium
EC2 instance with the Ubuntu 22 AMI and allow SSH in network permissions. Assign it 60 GiB
of storage ensuring it can grow past the default 8 GiB
.A
record using your real domain and IPs instead of these examples: cht-sync.example.com
-> 1.2.3.4
./home/ubuntu/.ssh/authorized_keys
so that they can SSH in with ubuntu@cht-sync.example.com
.curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh
.apt update&&apt dist-upgrade&&apt autoremove
.curl -o /root/compose-files/posgtrest.yml https://raw.githubusercontent.com/medic/cht-sync/main/docker-compose.postgrest.yml
curl -o /root/compose-files/dbt-logstash.yml https://raw.githubusercontent.com/medic/cht-sync/main/docker-compose.yml
curl
command and referencing the Environment Variables page:curl -o /root/compose-files/.env https://raw.githubusercontent.com/medic/cht-sync/main/env.template
/root/compose-files/down.up.sh
script for keeping tabs which Docker files to include on stop and start:#!/bin/bash
docker compose \
-f postgrest.yml \
-f dbt-logstash.yml \
down
docker compose \
-f postgrest.yml \
-f dbt-logstash.yml \
up --remove-orphans -d
chmod +x /root/compose-files/down.up.sh
/root/compose-files/down.up.sh
docker ps
. The command should show the DBT, Postgrest and Logstash services running.The different pieces of a CHT project, how they interact, and what they’re used for
Data synchronization tools to enable analytics
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.