Skip to content

Commit 595a7ba

Browse files
Use OPENAI_API_KEY from env file in development
1 parent f3d92c0 commit 595a7ba

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

compose.dev.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ services:
33
extends:
44
file: compose.yaml
55
service: app
6+
env_file:
7+
- .env
68
environment:
79
SECRET_KEY: supersecret
810
SEGMENT_WRITE_KEY: ${SEGMENT_WRITE_KEY} # Set your Segment write key here or in the .env file
911
SESSION_COOKIE_SECURE: 0
10-
OPENAI_API_KEY: ${OPENAI_API_KEY} # Set your OpenAI API key here or in the .env file
1112
OPENAI_BASE_URL: "http://llm:5051/api/v1"
1213
SENTENCE_TRANSFORMERS_HOME: /app/sentence-transformers
1314
volumes:
@@ -20,6 +21,8 @@ services:
2021
extends:
2122
file: compose.yaml
2223
service: llm
24+
env_file:
25+
- .env
2326
ports:
2427
- target: 5051
2528
published: 5051

compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ services:
1717
SECRET_KEY:
1818
SEGMENT_WRITE_KEY:
1919
SESSION_COOKIE_SECURE: 1
20-
OPENAI_API_KEY: # Set your OpenAI API key here or in the .env file
20+
OPENAI_API_KEY: ${OPENAI_API_KEY} # Set your OpenAI API key here or in the .env file
2121
OPENAI_BASE_URL: "http://llm/api/v1"
2222
MODEL: "anthropic.claude-3-sonnet-20240229-v1:0"
2323
command: uwsgi --http 0.0.0.0:5050 --wsgi-file app.py --callable app --processes 4 --threads 2

0 commit comments

Comments
 (0)