bolt / Dockerfile
adowu's picture
Update Dockerfile
c5c92d8 verified
raw
history blame
1.74 kB
ARG BASE=node:20.18.0
FROM ${BASE}
# Instalacja wymaganych pakietów
RUN apt-get update && apt-get install -y git procps
WORKDIR /app
# Klonowanie repozytorium
RUN git clone https://github.com/stackblitz-labs/bolt.diy ./
# Instalacja zależności
RUN npm install -g corepack@latest
RUN corepack enable pnpm && pnpm install
# Zmienne środowiskowe
ARG GROQ_API_KEY
ARG HuggingFace_API_KEY
ARG OPENAI_API_KEY
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 TOGETHER_API_KEY
ARG TOGETHER_API_BASE_URL
ARG AWS_BEDROCK_CONFIG
ARG VITE_LOG_LEVEL=debug
ARG DEFAULT_NUM_CTX
ENV WRANGLER_SEND_METRICS=false \
GROQ_API_KEY=${GROQ_API_KEY} \
HuggingFace_KEY=${HuggingFace_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} \
TOGETHER_API_KEY=${TOGETHER_API_KEY} \
TOGETHER_API_BASE_URL=${TOGETHER_API_BASE_URL} \
AWS_BEDROCK_CONFIG=${AWS_BEDROCK_CONFIG} \
VITE_LOG_LEVEL=${VITE_LOG_LEVEL} \
DEFAULT_NUM_CTX=${DEFAULT_NUM_CTX} \
RUNNING_IN_DOCKER=true \
NODE_OPTIONS="--max-old-space-size=4096" \
TCMALLOC_RELEASE_RATE=0 \
NODE_ENV=production
# Konfiguracja Workera
RUN mkdir -p /root/.config/.wrangler && \
echo '{"enabled":false}' > /root/.config/.wrangler/metrics.json && \
echo '{"workers_dev":true}' > /root/.config/.wrangler/config/default.toml
# Build z dodatkowymi flagami
RUN pnpm run build -- --future-v3_singleFetch
EXPOSE 5173
CMD ["pnpm", "run", "dockerstart"]