Skip to content

Commit 8733035

Browse files
committed
Correct yaml syntax
1 parent d210c74 commit 8733035

12 files changed

Lines changed: 24 additions & 5 deletions

.github/workflows/test_remote_no_dependencies.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,7 @@ jobs:
3131
run: |
3232
python -m pip install --upgrade pip
3333
pip install pytest requests
34-
- name: Delete unwanted tests (1)
35-
run: tests/*local*
36-
- name: Delete unwanted tests (2)
37-
run: rm tests/*selenium*
3834
- name: Test with pytest
3935
run: |
4036
pip install pytest
41-
pytest tests
37+
pytest tests/remote_tests

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,29 @@ So to run locally with Docker Compose you can do:
192192
docker compose up
193193
```
194194

195+
# Providing environment variables in `.env` file
196+
197+
If you are working with external third-party services in the API, you may find it convenient to make an `.env` file in the base folder of the project. You can connect an IDE such as Pycharm to use this `.env` file. It will be ignored by `.gitignore` so you don't need to worry about accidentally committing your credentials to the repo.
198+
199+
![harmonyenv.png](./docs/harmonyenv.png)
200+
201+
Example content of the `.env` file:
202+
203+
```
204+
GOOGLE_APPLICATION_CREDENTIALS='{ "type": "service_account", ... }'
205+
AZURE_OPENAI_API_KEY=f46axxxxxxxxxxxxxxxxxxxxxxxxxxxd
206+
AZURE_OPENAI_ENDPOINT=https://xxxxxxxxx.openai.azure.com/
207+
OPENAI_API_TYPE=azure
208+
OPENAI_API_VERSION=2023-12-01-preview
209+
OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxX
210+
```
211+
212+
When deploying, you can use these environment variables in your Docker run command, e.g.
213+
214+
```
215+
docker run -d -p 80:80 -p 3000:3000 -e GOOGLE_APPLICATION_CREDENTIALS=xxx -e AZURE_OPENAI_API_KEY=xxxx -e "HARMONY_DATA_PATH=/data" -v /home/thomaswood/data:/data harmonydata/harmonyapi:[DOCKER_TAG_HERE]
216+
```
217+
195218
# Harmony FastAPI API implementation
196219
197220
If you are not running with Docker, you can run the individual components of the Harmony API separately.

docs/harmonyenv.png

22.2 KB
Loading
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)