Skip to content

Commit

Permalink
DH-5770 updated enterprise documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
DishenWang2023 committed May 9, 2024
1 parent b170bc3 commit 883a399
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
13 changes: 6 additions & 7 deletions services/enterprise/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,19 @@ K2_CORE_URL=http://localhost:3001/api/v1
MONGODB_DB_NAME=
MONGODB_URI=

AUTH0_DOMAIN=auth.dataherald.com
AUTH0_ISSUER=https://auth.dataherald.com/
AUTH0_API_AUDIENCE=https://hi-george.us.auth0.com/api/v2/

API_KEY_SALT=d7MdThI8F8Vt9b=HAfOJ3hsgL5p74BLCezrZlpkT66Q=

AUTH0_DOMAIN=
AUTH0_ISSUER=
AUTH0_API_AUDIENCE=
AUTH0_DISABED=False

API_KEY_SALT=

DEFAULT_K2_TIMEOUT=120

S3_AWS_ACCESS_KEY_ID=
S3_AWS_SECRET_ACCESS_KEY=

#Encryption key for storing DB connection data in Mongo
#The encryption key should be the same as the one used in engine
ENCRYPT_KEY =

POSTHOG_API_KEY=
Expand Down
15 changes: 9 additions & 6 deletions services/enterprise/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

This is a fastapi backend application that handles the enterprise business logic. It's build on top of the ai engine and uses it internally

## Building and Running with Docker
## Building and Running with Docker Locally
We use Docker to create a reproducible environment for ai-server.
> Please use the dockerfile instead of the docker-compose file if you are trying to deploy it on your cloud platform.
1. Create your local `.env` file and copy the variables from `.env.example` and fill them up

Expand Down Expand Up @@ -31,9 +32,11 @@ docker-compose up
## Setting up Stripe
To get the stripe api key for local development, go to stripe's developer dashboard in test mode (https://dashboard.stripe.com/test/developers), then go to the API keys tab and either use the exising key named `test key` or create a new one with the appropriate permissions.

To get the stripe webhook secret go to the Webhook tab instead and click `Add local listener`
To get the stripe webhook secret go to the Webhook tab instead and click `Add local listener`.

## Testing
>If you would like to disable stripe, make sure to change your organization's plan to `ENTERPRISE`.
## Testing (deprecated)

### API Tests
To run the Postman API test locally, use the Postman CLI:
Expand All @@ -45,7 +48,7 @@ Can you also use the Postman UI to run the tests instead, the test suite is unde

Besure to choose the appropriate enviornment from postman. For local environment, run the initialzation script first.

### Unit Tests (deprecated)
### Unit Tests
To test the endpoints in the server, create your python enviornment with required packages installed and run the pytest:
```
python3 -m pytest tests/
Expand Down Expand Up @@ -83,8 +86,8 @@ docker exec <container_id> python3 -m database.scripts.data_report organization_

5. It should create a csv file if there is data

## Run Enterprise (server) and Engine (dataherald) containers
Follow these steps to set up and run the Enterprise (server) and Engine (dataherald) containers:
## Run Enterprise and Engine containers
Follow these steps to set up and run the Enterprise and Engine containers for local development:

1. Create the docker network if it doesn't exist
```
Expand Down

0 comments on commit 883a399

Please sign in to comment.