From e5eabb1b4ca9cff2e511606b5749e67021bc721d Mon Sep 17 00:00:00 2001 From: Siddarth Date: Wed, 13 Nov 2024 20:39:22 -0500 Subject: [PATCH 1/3] commit --- .env.example | 58 --------------------------------------------- Dockerfile | 4 ++++ docker-compose.yaml | 7 +++--- 3 files changed, 8 insertions(+), 61 deletions(-) delete mode 100644 .env.example diff --git a/.env.example b/.env.example deleted file mode 100644 index 46a21e892..000000000 --- a/.env.example +++ /dev/null @@ -1,58 +0,0 @@ -# Rename this file to .env once you have filled in the below environment variables! - -# Get your GROQ API Key here - -# https://console.groq.com/keys -# You only need this environment variable set if you want to use Groq models -GROQ_API_KEY= - -# Get your Open AI API Key by following these instructions - -# https://help.openai.com/en/articles/4936850-where-do-i-find-my-openai-api-key -# You only need this environment variable set if you want to use GPT models -OPENAI_API_KEY= - -# Get your Anthropic API Key in your account settings - -# https://console.anthropic.com/settings/keys -# You only need this environment variable set if you want to use Claude models -ANTHROPIC_API_KEY= - -# Get your OpenRouter API Key in your account settings - -# https://openrouter.ai/settings/keys -# You only need this environment variable set if you want to use OpenRouter models -OPEN_ROUTER_API_KEY= - -# Get your Google Generative AI API Key by following these instructions - -# https://console.cloud.google.com/apis/credentials -# You only need this environment variable set if you want to use Google Generative AI models -GOOGLE_GENERATIVE_AI_API_KEY= - -# You only need this environment variable set if you want to use oLLAMA models -# EXAMPLE http://localhost:11434 -OLLAMA_API_BASE_URL= - -# You only need this environment variable set if you want to use OpenAI Like models -OPENAI_LIKE_API_BASE_URL= - -# You only need this environment variable set if you want to use DeepSeek models through their API -DEEPSEEK_API_KEY= - -# Get your OpenAI Like API Key -OPENAI_LIKE_API_KEY= - -# Get your Mistral API Key by following these instructions - -# https://console.mistral.ai/api-keys/ -# You only need this environment variable set if you want to use Mistral models -MISTRAL_API_KEY= - - -# Get LMStudio Base URL from LM Studio Developer Console -# Make sure to enable CORS -# Example: http://localhost:1234 -LMSTUDIO_API_BASE_URL= - -# Get your xAI API key -# https://x.ai/api -# You only need this environment variable set if you want to use xAI models -XAI_API_KEY= - -# Include this environment variable if you want more logging for debugging locally -VITE_LOG_LEVEL=debug diff --git a/Dockerfile b/Dockerfile index 3b5a74cde..7292a963a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,6 +24,7 @@ ARG ANTHROPIC_API_KEY ARG OPEN_ROUTER_API_KEY ARG GOOGLE_GENERATIVE_AI_API_KEY ARG OLLAMA_API_BASE_URL +ARG XAI_API_KEY ARG VITE_LOG_LEVEL=debug ENV WRANGLER_SEND_METRICS=false \ @@ -33,6 +34,7 @@ ENV WRANGLER_SEND_METRICS=false \ OPEN_ROUTER_API_KEY=${OPEN_ROUTER_API_KEY} \ GOOGLE_GENERATIVE_AI_API_KEY=${GOOGLE_GENERATIVE_AI_API_KEY} \ OLLAMA_API_BASE_URL=${OLLAMA_API_BASE_URL} \ + XAI_API_KEY=${XAI_API_KEY} \ VITE_LOG_LEVEL=${VITE_LOG_LEVEL} # Pre-configure wrangler to disable metrics @@ -53,6 +55,7 @@ ARG ANTHROPIC_API_KEY ARG OPEN_ROUTER_API_KEY ARG GOOGLE_GENERATIVE_AI_API_KEY ARG OLLAMA_API_BASE_URL +ARG XAI_API_KEY ARG VITE_LOG_LEVEL=debug ENV GROQ_API_KEY=${GROQ_API_KEY} \ @@ -61,6 +64,7 @@ ENV GROQ_API_KEY=${GROQ_API_KEY} \ OPEN_ROUTER_API_KEY=${OPEN_ROUTER_API_KEY} \ GOOGLE_GENERATIVE_AI_API_KEY=${GOOGLE_GENERATIVE_AI_API_KEY} \ OLLAMA_API_BASE_URL=${OLLAMA_API_BASE_URL} \ + XAI_API_KEY=${XAI_API_KEY} \ VITE_LOG_LEVEL=${VITE_LOG_LEVEL} RUN mkdir -p ${WORKDIR}/run diff --git a/docker-compose.yaml b/docker-compose.yaml index c391dd732..d4818bcb1 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -6,13 +6,13 @@ services: dockerfile: Dockerfile target: bolt-ai-production ports: - - "5173:5173" + - "5174:5174" env_file: ".env.local" environment: - NODE_ENV=production - COMPOSE_PROFILES=production # No strictly neded but serving as hints for Coolify - - PORT=5173 + - PORT=5174 - GROQ_API_KEY=${GROQ_API_KEY} - OPENAI_API_KEY=${OPENAI_API_KEY} - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY} @@ -43,6 +43,7 @@ services: - OPENAI_API_KEY=${OPENAI_API_KEY} - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY} - OPEN_ROUTER_API_KEY=${OPEN_ROUTER_API_KEY} + - XAI_API_KEY=${XAI_API_KEY} - GOOGLE_GENERATIVE_AI_API_KEY=${GOOGLE_GENERATIVE_AI_API_KEY} - OLLAMA_API_BASE_URL=${OLLAMA_API_BASE_URL} - VITE_LOG_LEVEL=${VITE_LOG_LEVEL:-debug} @@ -56,6 +57,6 @@ services: consistency: cached - /app/node_modules ports: - - "5173:5173" # Same port, no conflict as only one runs at a time + - "5174:5174" # Same port, no conflict as only one runs at a time command: pnpm run dev --host 0.0.0.0 profiles: ["development", "default"] # Make development the default profile From 05c4e880086855ba5e439a268132c82344bd36ab Mon Sep 17 00:00:00 2001 From: Siddarth Date: Wed, 13 Nov 2024 20:40:44 -0500 Subject: [PATCH 2/3] Create .env.example --- .env.example | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .env.example diff --git a/.env.example b/.env.example new file mode 100644 index 000000000..46a21e892 --- /dev/null +++ b/.env.example @@ -0,0 +1,58 @@ +# Rename this file to .env once you have filled in the below environment variables! + +# Get your GROQ API Key here - +# https://console.groq.com/keys +# You only need this environment variable set if you want to use Groq models +GROQ_API_KEY= + +# Get your Open AI API Key by following these instructions - +# https://help.openai.com/en/articles/4936850-where-do-i-find-my-openai-api-key +# You only need this environment variable set if you want to use GPT models +OPENAI_API_KEY= + +# Get your Anthropic API Key in your account settings - +# https://console.anthropic.com/settings/keys +# You only need this environment variable set if you want to use Claude models +ANTHROPIC_API_KEY= + +# Get your OpenRouter API Key in your account settings - +# https://openrouter.ai/settings/keys +# You only need this environment variable set if you want to use OpenRouter models +OPEN_ROUTER_API_KEY= + +# Get your Google Generative AI API Key by following these instructions - +# https://console.cloud.google.com/apis/credentials +# You only need this environment variable set if you want to use Google Generative AI models +GOOGLE_GENERATIVE_AI_API_KEY= + +# You only need this environment variable set if you want to use oLLAMA models +# EXAMPLE http://localhost:11434 +OLLAMA_API_BASE_URL= + +# You only need this environment variable set if you want to use OpenAI Like models +OPENAI_LIKE_API_BASE_URL= + +# You only need this environment variable set if you want to use DeepSeek models through their API +DEEPSEEK_API_KEY= + +# Get your OpenAI Like API Key +OPENAI_LIKE_API_KEY= + +# Get your Mistral API Key by following these instructions - +# https://console.mistral.ai/api-keys/ +# You only need this environment variable set if you want to use Mistral models +MISTRAL_API_KEY= + + +# Get LMStudio Base URL from LM Studio Developer Console +# Make sure to enable CORS +# Example: http://localhost:1234 +LMSTUDIO_API_BASE_URL= + +# Get your xAI API key +# https://x.ai/api +# You only need this environment variable set if you want to use xAI models +XAI_API_KEY= + +# Include this environment variable if you want more logging for debugging locally +VITE_LOG_LEVEL=debug From ec61a6ff6d093281ebb82ea4583d805f8b4980a5 Mon Sep 17 00:00:00 2001 From: Siddarth Date: Wed, 13 Nov 2024 20:43:29 -0500 Subject: [PATCH 3/3] Update docker-compose.yaml --- docker-compose.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index d4818bcb1..2115fdb77 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -6,19 +6,20 @@ services: dockerfile: Dockerfile target: bolt-ai-production ports: - - "5174:5174" + - "5173:5173" env_file: ".env.local" environment: - NODE_ENV=production - COMPOSE_PROFILES=production # No strictly neded but serving as hints for Coolify - - PORT=5174 + - PORT=5173 - GROQ_API_KEY=${GROQ_API_KEY} - OPENAI_API_KEY=${OPENAI_API_KEY} - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY} - OPEN_ROUTER_API_KEY=${OPEN_ROUTER_API_KEY} - GOOGLE_GENERATIVE_AI_API_KEY=${GOOGLE_GENERATIVE_AI_API_KEY} - OLLAMA_API_BASE_URL=${OLLAMA_API_BASE_URL} + - XAI_API_KEY=${XAI_API_KEY} - VITE_LOG_LEVEL=${VITE_LOG_LEVEL:-debug} - RUNNING_IN_DOCKER=true extra_hosts: @@ -57,6 +58,6 @@ services: consistency: cached - /app/node_modules ports: - - "5174:5174" # Same port, no conflict as only one runs at a time + - "5173:5173" # Same port, no conflict as only one runs at a time command: pnpm run dev --host 0.0.0.0 profiles: ["development", "default"] # Make development the default profile