Skip to content

Commit

Permalink
chore: Clarify README
Browse files Browse the repository at this point in the history
  • Loading branch information
andrablaj committed Feb 19, 2024
1 parent 641e62e commit 433de3e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.env
node_modules
.idea
.idea
logstash/pipeline
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ CHT Sync has been specifically designed to work in both local development enviro
- An `.env` file containing the environment variable placeholders from the `.env.template` file. The file should be located in the root directory of the project or set by the operating system. The variables should be customized accordingly for the specific deployment needs.

#### Environment variable
There are four environment variable groups in the `.env.template` file. To successfully set up `cht-sync`, It is important to understand the difference between them.
1. Postgresql and Postgres: Are used to establish the Postgres database to synchronize CouchDB data. They also define the schema and table names to store the CouchDB data. The main objective is to define the environment where the raw CouchDB data will be copied.
There are four environment variable groups in the `.env.template` file. To successfully set up `cht-sync`, it is important to understand the difference between them.
1. Postgresql and Postgres: Are used to establish the Postgres database to synchronize CouchDB data to. They also define the schema and table names to store the CouchDB data. The main objective is to define the environment where the raw CouchDB data will be copied.
2. DBT: These environment variables are exclusive to the DBT configuration. The main objective is to define the environment where the tables and views for the models defined in `CHT_PIPELINE_BRANCH_URL` will be created. It is important to separate this environment from the previous group. `DBT_POSTGRES_USER` and `DBT_POSTGRES_SCHEMA` must be different from `POSTGRES_USER` and `POSTGRES_SCHEMA`. `DBT_POSTGRES_HOST` has to be the Postgres instance created with the environment variables set in the first group.
3. The following environment variables define the CouchDB instance we want to sync with. With `COUCHDB_DBS`, we can specify a list of databases to sync.
3. Couchdb and Logstash: The following environment variables define the CouchDB instance we want to sync with. With `COUCHDB_DBS`, we can specify a list of databases to sync.

### Local Setup

Expand Down
4 changes: 4 additions & 0 deletions env.template
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@ COUCHDB_DBS="couchdb couchdb_sentinel" # space separated list of databases you w
COUCHDB_HOST=couchdb
COUCHDB_PORT=5984
COUCHDB_SECURE=false

# superset: required environment variables for 'gamma', 'prod' and 'local'
SUPERSET_PASSWORD=password
[email protected]

0 comments on commit 433de3e

Please sign in to comment.