Skip to content

Commit

Permalink
Fix cohere-ai#97: Change default python interpreter URL to http://ter…
Browse files Browse the repository at this point in the history
…rarium:8080

The previous default http://localhost:8080 didn't work with docker
compose on Mac
  • Loading branch information
acanis committed May 6, 2024
1 parent e5f9007 commit a6f705e
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 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: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Then you will need to set up authorization, [see more details here](https://aws.

### Hosted tools

- `PYTHON_INTERPRETER_URL`: URL to the python interpreter container. Defaults to http://localhost:8080.
- `PYTHON_INTERPRETER_URL`: URL to the python interpreter container. Defaults to http://terrarium:8080.
- `TAVILY_API_KEY`: If you want to enable internet search, you will need to supply a Tavily API Key. Not required.

</details>
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 a6f705e

Please sign in to comment.