Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAIN: Capturing changes required for additional provider support #276

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 26 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,26 @@ ARG ANTHROPIC_API_KEY
ARG OPEN_ROUTER_API_KEY
ARG GOOGLE_GENERATIVE_AI_API_KEY
ARG OLLAMA_API_BASE_URL
ARG OPENAI_LIKE_API_KEY
ARG OPENAI_LIKE_BASE_URL
ARG DEEPSEEK_API_KEY
ARG VITE_LOG_LEVEL=debug

ENV WRANGLER_SEND_METRICS=false \
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} \
VITE_LOG_LEVEL=${VITE_LOG_LEVEL}
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} \
OPENAI_LIKE_API_KEY=${OPENAI_LIKE_API_KEY} \
OPENAI_LIKE_BASE_URL=${OPENAI_LIKE_BASE_URL} \
DEEPSEEK_API_KEY=${DEEPSEEK_API_KEY} \
VITE_LOG_LEVEL=${VITE_LOG_LEVEL}

# Pre-configure wrangler to disable metrics
RUN mkdir -p /root/.config/.wrangler && \
echo '{"enabled":false}' > /root/.config/.wrangler/metrics.json
echo '{"enabled":false}' > /root/.config/.wrangler/metrics.json

RUN npm run build

Expand All @@ -53,15 +59,21 @@ ARG ANTHROPIC_API_KEY
ARG OPEN_ROUTER_API_KEY
ARG GOOGLE_GENERATIVE_AI_API_KEY
ARG OLLAMA_API_BASE_URL
ARG OPENAI_LIKE_API_KEY
ARG OPENAI_LIKE_BASE_URL
ARG DEEPSEEK_API_KEY
ARG VITE_LOG_LEVEL=debug

ENV 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} \
VITE_LOG_LEVEL=${VITE_LOG_LEVEL}
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} \
OPENAI_LIKE_API_KEY=${OPENAI_LIKE_API_KEY} \
OPENAI_LIKE_BASE_URL=${OPENAI_LIKE_BASE_URL} \
DEEPSEEK_API_KEY=${DEEPSEEK_API_KEY} \
VITE_LOG_LEVEL=${VITE_LOG_LEVEL}

RUN mkdir -p ${WORKDIR}/run
CMD pnpm run dev --host
22 changes: 14 additions & 8 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ services:
dockerfile: Dockerfile
target: bolt-ai-production
ports:
- "5173:5173"
env_file: ".env.local"
- '5173:5173'
env_file: '.env.local'
environment:
- NODE_ENV=production
- COMPOSE_PROFILES=production
Expand All @@ -19,13 +19,16 @@ services:
- 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}
- OPENAI_LIKE_API_KEY=${OPENAI_LIKE_API_KEY}
- OPENAI_LIKE_BASE_URL=${OPENAI_LIKE_BASE_URL}
- DEEPSEEK_API_KEY=${DEEPSEEK_API_KEY}
- VITE_LOG_LEVEL=${VITE_LOG_LEVEL:-debug}
- RUNNING_IN_DOCKER=true
extra_hosts:
- "host.docker.internal:host-gateway"
- 'host.docker.internal:host-gateway'
command: pnpm run dockerstart
profiles:
- production # This service only runs in the production profile
- production # This service only runs in the production profile

bolt-ai-dev:
image: bolt-ai:development
Expand All @@ -37,25 +40,28 @@ services:
- VITE_HMR_HOST=localhost
- VITE_HMR_PORT=5173
- CHOKIDAR_USEPOLLING=true
- WATCHPACK_POLLING=true
- WATCHPACK_POLLING=true
- 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}
- OPENAI_LIKE_API_KEY=${OPENAI_LIKE_API_KEY}
- OPENAI_LIKE_BASE_URL=${OPENAI_LIKE_BASE_URL}
- DEEPSEEK_API_KEY=${DEEPSEEK_API_KEY}
- VITE_LOG_LEVEL=${VITE_LOG_LEVEL:-debug}
- RUNNING_IN_DOCKER=true
extra_hosts:
- "host.docker.internal:host-gateway"
- 'host.docker.internal:host-gateway'
volumes:
- type: bind
source: .
target: /app
consistency: cached
- /app/node_modules
ports:
- "5173:5173" # 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
profiles: ['development', 'default'] # Make development the default profile