mirror of
https://github.com/stackblitz-labs/bolt.diy
synced 2025-06-26 18:26:38 +00:00
Merge b59bde1448
into d0d9818964
This commit is contained in:
commit
e748ae33f2
34
Dockerfile-coolify
Normal file
34
Dockerfile-coolify
Normal file
@ -0,0 +1,34 @@
|
||||
FROM node:20.18.0
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Instalar pnpm e wrangler
|
||||
RUN corepack enable pnpm && \
|
||||
npm install -g wrangler
|
||||
|
||||
# Copiar arquivos de dependências
|
||||
COPY package.json pnpm-lock.yaml ./
|
||||
|
||||
# Instalar dependências
|
||||
RUN pnpm install
|
||||
|
||||
# Copiar código fonte e scripts
|
||||
COPY . .
|
||||
|
||||
# Garantir que o bindings.sh tem permissões de execução e formato correto
|
||||
RUN tr -d '\r' < bindings.sh > bindings.tmp && \
|
||||
mv bindings.tmp bindings.sh && \
|
||||
chmod +x bindings.sh
|
||||
|
||||
# Build da aplicação
|
||||
RUN pnpm run build
|
||||
|
||||
# Expor porta
|
||||
EXPOSE 5173
|
||||
|
||||
# Configurar variáveis de ambiente
|
||||
ENV NODE_ENV=production \
|
||||
RUNNING_IN_DOCKER=true
|
||||
|
||||
# Comando para iniciar usando o script dockerstart
|
||||
CMD ["pnpm", "run", "dockerstart"]
|
82
docker-compose-coolify.yaml
Normal file
82
docker-compose-coolify.yaml
Normal file
@ -0,0 +1,82 @@
|
||||
services:
|
||||
app:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile-coolify
|
||||
ports:
|
||||
- "3000:5173"
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- PORT=5173
|
||||
- GROQ_API_KEY=${GROQ_API_KEY}
|
||||
- HuggingFace_API_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:-debug}
|
||||
- DEFAULT_NUM_CTX=${DEFAULT_NUM_CTX:-32768}
|
||||
restart: unless-stopped
|
||||
|
||||
app-dev:
|
||||
image: bolt-ai:development
|
||||
build:
|
||||
target: bolt-ai-development
|
||||
env_file: ".env.local"
|
||||
environment:
|
||||
- NODE_ENV=development
|
||||
- VITE_HMR_PROTOCOL=ws
|
||||
- VITE_HMR_HOST=localhost
|
||||
- VITE_HMR_PORT=5173
|
||||
- CHOKIDAR_USEPOLLING=true
|
||||
- WATCHPACK_POLLING=true
|
||||
- PORT=5173
|
||||
- GROQ_API_KEY=${GROQ_API_KEY}
|
||||
- HuggingFace_API_KEY=${HuggingFace_API_KEY}
|
||||
- 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}
|
||||
- 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:-debug}
|
||||
- DEFAULT_NUM_CTX=${DEFAULT_NUM_CTX:-32768}
|
||||
- RUNNING_IN_DOCKER=true
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
volumes:
|
||||
- type: bind
|
||||
source: .
|
||||
target: /app
|
||||
consistency: cached
|
||||
- /app/node_modules
|
||||
ports:
|
||||
- "5173:5173"
|
||||
command: pnpm run dev --host 0.0.0.0
|
||||
profiles: ["development", "default"]
|
||||
|
||||
app-prebuild:
|
||||
image: ghcr.io/stackblitz-labs/bolt.diy:latest
|
||||
ports:
|
||||
- "5173:5173"
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- COMPOSE_PROFILES=production
|
||||
# No strictly needed but serving as hints for Coolify
|
||||
- PORT=5173
|
||||
- OLLAMA_API_BASE_URL=http://127.0.0.1:11434
|
||||
- DEFAULT_NUM_CTX=${DEFAULT_NUM_CTX:-32768}
|
||||
- RUNNING_IN_DOCKER=true
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
command: pnpm run dockerstart
|
||||
profiles:
|
||||
- prebuilt
|
@ -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
|
||||
@ -28,7 +28,7 @@ services:
|
||||
- DEFAULT_NUM_CTX=${DEFAULT_NUM_CTX:-32768}
|
||||
- RUNNING_IN_DOCKER=true
|
||||
extra_hosts:
|
||||
- 'host.docker.internal:host-gateway'
|
||||
- "host.docker.internal:host-gateway"
|
||||
command: pnpm run dockerstart
|
||||
profiles:
|
||||
- production
|
||||
|
Loading…
Reference in New Issue
Block a user