Skip to content

Commit

Permalink
chore: mount sql pair file for each deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
paopa committed Jan 9, 2025
1 parent cf57f53 commit 75fdd82
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 1 deletion.
4 changes: 4 additions & 0 deletions deployment/kustomizations/base/cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -182,3 +182,7 @@ data:
langfuse_enable: true
logging_level: DEBUG
development: false
pairs.json: |
{
"sample": []
}
4 changes: 4 additions & 0 deletions deployment/kustomizations/base/deploy-wren-ai-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ spec:
key: LANGFUSE_SECRET_KEY
- name: CONFIG_PATH
value: /app/data/config.yaml
- name: SQL_PAIRS_PATH
value: /app/data/pairs.json
ports:
- containerPort: 5555
volumes:
Expand All @@ -72,3 +74,5 @@ spec:
items:
- key: config.yaml
path: config.yaml
- key: pairs.json
path: pairs.json
2 changes: 2 additions & 0 deletions docker/docker-compose-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,12 @@ services:
# using PYTHONUNBUFFERED: 1 can fix this
PYTHONUNBUFFERED: 1
CONFIG_PATH: /app/data/config.yaml
SQL_PAIRS_PATH: /app/data/pairs.json
env_file:
- ${PROJECT_DIR}/.env
volumes:
- ${PROJECT_DIR}/config.yaml:/app/data/config.yaml
- ${PROJECT_DIR}/pairs.json:/app/data/pairs.json
networks:
- wren
depends_on:
Expand Down
2 changes: 2 additions & 0 deletions docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,12 @@ services:
# using PYTHONUNBUFFERED: 1 can fix this
PYTHONUNBUFFERED: 1
CONFIG_PATH: /app/data/config.yaml
SQL_PAIRS_PATH: /app/data/pairs.json
env_file:
- ${PROJECT_DIR}/.env
volumes:
- ${PROJECT_DIR}/config.yaml:/app/data/config.yaml
- ${PROJECT_DIR}/pairs.json:/app/data/pairs.json
networks:
- wren
depends_on:
Expand Down
2 changes: 1 addition & 1 deletion wren-ai-service/src/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class Settings(BaseSettings):
config_path: str = Field(default="config.yaml")
_components: list[dict]

sql_pairs_path: str = Field(default="sql_pairs.json")
sql_pairs_path: str = Field(default="pairs.json")

def __init__(self):
load_dotenv(".env.dev", override=True)
Expand Down

0 comments on commit 75fdd82

Please sign in to comment.