Corrected nixpacks.toml filename

This commit is contained in:
Colin Hill 2024-10-24 14:50:45 -04:00
parent 2773a7ed34
commit 25ac7f8679
3 changed files with 38 additions and 40 deletions

View File

@ -17,7 +17,23 @@ EXPOSE 5173
# Production image
FROM base AS bolt-ai-production
ENV WRANGLER_SEND_METRICS=false
# Define environment variables with default values or let them be overridden
ARG GROQ_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 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}
# Pre-configure wrangler to disable metrics
RUN mkdir -p /root/.config/.wrangler && \
@ -29,5 +45,23 @@ CMD [ "pnpm", "run", "dockerstart"]
# Development image
FROM base AS bolt-ai-development
# Define the same environment variables for development
ARG GROQ_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 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}
RUN mkdir -p ${WORKDIR}/run
CMD pnpm run dev --host
CMD pnpm run dev --host

View File

@ -10,6 +10,7 @@ services:
env_file: ".env.local"
environment:
- NODE_ENV=production
- COMPOSE_PROFILES=production
command: pnpm run dockerstart
profiles:
- production # This service only runs in the production profile
@ -20,6 +21,7 @@ services:
target: bolt-ai-development
environment:
- NODE_ENV=development
- COMPOSE_PROFILES=development
volumes:
- .:/app
- /app/node_modules

View File

@ -1,38 +0,0 @@
# nixpacks.toml
[build]
# Specify the Node.js version for your application
builder = "node"
working_directory = "./" # Adjust if your source is in a different directory
[environment]
# Define your environment variables
# You can add more variables as needed from your .env.local file
NODE_ENV = "production"
COMPOSE_PROFILES = "production" # Set to "development" for dev builds
GROQ_API_KEY=""
OPENAI_API_KEY=""
ANTHROPIC_API_KEY=""
OPEN_ROUTER_API_KEY=""
GOOGLE_GENERATIVE_AI_API_KEY=""
OLLAMA_API_BASE_URL=""
# Include this environment variable if you want more logging for debugging locally
#VITE_LOG_LEVEL="debug"
[dev]
# Define any development-specific settings
NODE_ENV = "development"
COMPOSE_PROFILES = "development" # Set to "development" for dev builds
[deploy]
# Optional: Define your deployment settings for Coolify
provider = "coolify" # Specify the provider
branch = "main" # Specify the branch you want to deploy from
[commands]
# Commands to run your application
start = "pnpm run dockerstart"
dev = "pnpm run dev --host 0.0.0.0"
build = "pnpm run build"
test = "pnpm run test"