Skip to content

Commit

Permalink
(chore #54) Improve environment variables documentation (#55)
Browse files Browse the repository at this point in the history
* Improve environment variables documentation

* Change title level

* Add some corrections

* change working

Co-authored-by: Andra Blaj <[email protected]>

* Fix typo

Co-authored-by: Andra Blaj <[email protected]>

* Fix typo

Co-authored-by: Andra Blaj <[email protected]>

---------

Co-authored-by: Maria Lorena Rodriguez Viruel <[email protected]>
Co-authored-by: Andra Blaj <[email protected]>
  • Loading branch information
3 people authored Nov 23, 2023
1 parent 5c93300 commit 9b923b3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,16 @@ CHT Sync has been specifically designed to work in both local development enviro
- `Docker`
- 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.
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.
4. Superset: These environment variables are exclusive to the Superset configuration.

### Local Setup

The local environment setup involves starting Logstash, PostgreSQL, PostgREST, DBT, and CouchDB. This configuration facilitates data synchronization, transformation, and storage for local development and testing. Fake data is generated for CouchDB.
The local environment setup involves starting Logstash, PostgreSQL, PostgREST, DBT, and CouchDB. This configuration facilitates data synchronization, transformation, and storage for local development and testing. Fake data is generated for CouchDB.

1. Provide the databases you want to sync in the `.env` file:

Expand Down

0 comments on commit 9b923b3

Please sign in to comment.