Skip to content

Commit

Permalink
Merge pull request #3 from jembi/CU-86c0t1d0e_Create-a-configurable-m…
Browse files Browse the repository at this point in the history
…ediator-that-allows-the-source-dataconfiguration-to-generate-DDL

Creating DDL from files
  • Loading branch information
drizzentic authored Nov 15, 2024
2 parents 2e9e049 + fc8ae73 commit b031d36
Show file tree
Hide file tree
Showing 13 changed files with 6,964 additions and 59 deletions.
17 changes: 16 additions & 1 deletion .env.dev
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,19 @@ TRUST_SELF_SIGNED=true

# Application Settings
MODE=testing
BODY_SIZE_LIMIT=50mb
BODY_SIZE_LIMIT=50mb

# Minio Configuration
MINIO_ENDPOINT=localhost
MINIO_PORT=9000
MINIO_USE_SSL=false
MINIO_BUCKET=climate-mediator
MINIO_ACCESS_KEY=tCroZpZ3usDUcvPM3QT6
MINIO_SECRET_KEY=suVjMHUpVIGyWx8fFJHTiZiT88dHhKgVpzvYTOKK
MINIO_PREFIX=
MINIO_SUFFIX=

# Clickhouse Configuration
CLICKHOUSE_URL=http://localhost:8123
CLICKHOUSE_USER=
CLICKHOUSE_PASSWORD=dev_password_only
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,9 @@ dist
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

# Minio
minio
fs
tmp
sample
97 changes: 67 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,75 @@ Processes climate-related data as an example of unstructured data handling
## Local Development Setup

### Prerequisites

- Node.js (v14 or higher)
- OpenHIM Core and Console running locally (see [OpenHIM documentation](https://openhim.org/docs/installation/getting-started))
- Minio (RELEASE.2022-10-24T18-35-07Z)
- Clickhouse (v23.8.14.6)

### Installation
1. Clone the repository:
```bash
git clone https://github.com/jembi/climate-mediator.git
cd climate-mediator
```

2. Install dependencies:
```bash
npm install
```

3. Create a .env file in the root directory:
```bash
touch .env
```

4. Build the TypeScript code:
```bash
npm run build
```

5. Start the development server:
```bash
npm start
```

6. The mediator will be running on port 3000 by default. You can override this by setting the `SERVER_PORT` environment variable in your `.env` file:
```bash
SERVER_PORT=3001
```

### 1. Clone the repository

``` bash
git clone https://github.com/jembi/climate-mediator.git
cd climate-mediator
```

### 2. Install dependencies

``` bash
npm install
```

### 3. Create a .env file and tmp folder in the root directory

``` bash
touch .env

```

### 4. Build the TypeScript code

```bash
npm run build
```

### 5. Start the development server

```bash
npm start
```

### 6. The mediator will be running on port 3000 by default. You can override this by setting the `SERVER_PORT` environment variable in your `.env` file:

``` bash
SERVER_PORT=3001
```

### 7. provide all other connection string and credentials for clickhouse and minio

## Minio Configurations

### 1. Login to the Minio Admin panel

``` text
http://localhost:9001
# Default credentials
username: minioadmin
password: minioadmin
```

### 2. Create a minio access key and secret from the "Access Keys" page and set them to the ENVIRONMENT variables

``` bash
MINIO_ACCESS_KEY:
MINIO_SECRETE_KEY:
```

### 3. Set the MINIO_BUCKET

``` bash
MINIO_BUCKET=climate-mediator,
```
9 changes: 9 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
services:
minio:
image: quay.io/minio/minio
ports:
- 9000:9000
- 9001:9001
command: server /data --console-address ":9001"
volumes:
- ./minio:/data
Loading

0 comments on commit b031d36

Please sign in to comment.