Skip to content

Commit

Permalink
Frontend: Fix #97, change default python interpreter URL to http://te…
Browse files Browse the repository at this point in the history
…rrarium:8080 (#103)

Fix #97: Change default python interpreter URL to http://terrarium:8080

The previous default http://localhost:8080 didn't work with docker
compose on Mac

Co-authored-by: Tianjing Li <tianjinglimail@gmail.com>
  • Loading branch information
acanis and tianjing-li authored May 8, 2024
1 parent 82f398c commit 94edcbb
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .env-template
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ NEXT_PUBLIC_API_HOSTNAME=http://backend:8000
DATABASE_URL=postgresql+psycopg2://postgres:postgres@db:5432

# TOOLS
PYTHON_INTERPRETER_URL=http://localhost:8080
PYTHON_INTERPRETER_URL=http://terrarium:8080
TAVILY_API_KEY=<API_KEY_HERE>
WOLFRAM_ALPHA_APP_ID=<APP_ID_HERE>

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ RUN npm install -g pm2

# ENV for frontend
ENV NEXT_PUBLIC_API_HOSTNAME="http://localhost:8000"
ENV PYTHON_INTERPRETER_URL="http://localhost:8080"
ENV PYTHON_INTERPRETER_URL="http://terrarium:8080"

# Install frontend dependencies
WORKDIR /workspace/src/interfaces/coral_web
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ Try the default Toolkit application yourself by deploying it in a container loca
docker run -e COHERE_API_KEY='>>YOUR_API_KEY<<' -p 8000:8000 -p 4000:4000 ghcr.io/cohere-ai/cohere-toolkit:latest

```

or cloning and running locally:

```bash
git clone https://github.com/cohere-ai/cohere-toolkit.git
make first-run
Expand Down
2 changes: 1 addition & 1 deletion docker_scripts/env-defaults
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ DB_EXTENSION=${DB_EXTENSION:-}

# Defaults for the toolkit
export NEXT_PUBLIC_API_HOSTNAME=${NEXT_PUBLIC_API_HOSTNAME:-http://localhost:8000}
export PYTHON_INTERPRETER_URL=${PYTHON_INTERPRETER_URL:-http://localhost:8080}
export PYTHON_INTERPRETER_URL=${PYTHON_INTERPRETER_URL:-http://terrarium:8080}
export DATABASE_URL=${DATABASE_URL:-postgresql+psycopg2://postgre:postgre@localhost:5432/toolkit}
2 changes: 1 addition & 1 deletion src/backend/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class ToolName(StrEnum):
╚════╝ ╚════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚════╝ ╚════╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝
"""
DATABASE_URL_DEFAULT = "postgresql+psycopg2://postgres:postgres@db:5432"
PYTHON_INTERPRETER_URL_DEFAULT = "http://localhost:8080"
PYTHON_INTERPRETER_URL_DEFAULT = "http://terrarium:8080"
NEXT_PUBLIC_API_HOSTNAME_DEFAULT = "http://backend:8000"

DOT_ENV_FILE_PATH = ".env"
Expand Down

0 comments on commit 94edcbb

Please sign in to comment.