Skip to content
Open
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
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,23 @@ docs/instructions/Roadmap.md
.cursorrules
*.md
.qodo


# Local .terraform directories
**/.terraform/*

# .tfstate files
*.tfstate
*.tfstate.*

# Crash log files
crash.log
crash.*.log

# Exclude all .tfvars files, which are likely to contain sensitive data
*.tfvars
*.tfvars.json

# Ignore CLI configuration files
.terraformrc
terraform.rc
44 changes: 44 additions & 0 deletions .terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ EXPOSE 5173
# Production image
FROM base AS bolt-ai-production


# Build prefix argument - defaults to empty string, can be set to 'code:' for CodeBuild
ARG BUILD_PREFIX=""

# Define environment variables with default values or let them be overridden
ARG GROQ_API_KEY
ARG HuggingFace_API_KEY
Expand Down Expand Up @@ -55,7 +59,7 @@ ENV WRANGLER_SEND_METRICS=false \
RUN mkdir -p /root/.config/.wrangler && \
echo '{"enabled":false}' > /root/.config/.wrangler/metrics.json

RUN pnpm run build
RUN pnpm run ${BUILD_PREFIX}build

CMD [ "pnpm", "run", "dockerstart"]

Expand All @@ -64,7 +68,7 @@ FROM base AS bolt-ai-development

# Define the same environment variables for development
ARG GROQ_API_KEY
ARG HuggingFace
ARG HuggingFace
ARG OPENAI_API_KEY
ARG ANTHROPIC_API_KEY
ARG OPEN_ROUTER_API_KEY
Expand Down Expand Up @@ -92,4 +96,4 @@ ENV GROQ_API_KEY=${GROQ_API_KEY} \
RUNNING_IN_DOCKER=true

RUN mkdir -p ${WORKDIR}/run
CMD pnpm run dev --host
CMD pnpm run dev --host
32 changes: 32 additions & 0 deletions buildspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
version: 0.2

env:
variables:
NODE_OPTIONS: "--max_old_space_size=4096"
NPM_CONFIG_PROGRESS: "false"
NPM_CONFIG_AUDIT: "false"
NPM_CONFIG_FUND: "false"

phases:
install:
runtime-versions:
nodejs: latest
pre_build:
commands:
- echo Logging in to Docker Hub...
- echo "$DOCKER_HUB_ACCESS_TOKEN" | docker login --username "$DOCKER_HUB_USERNAME" --password-stdin
- echo Logging in to Amazon ECR...
- export AWS_ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text)
- aws ecr get-login-password --region $AWS_REGION | docker login --username AWS --password-stdin $AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com
build:
commands:
- echo Building the Docker image...
- export DOCKER_BUILDKIT=1
- docker build --build-arg BUILD_PREFIX="code:" --target bolt-ai-$IMAGE_TAG -t $IMAGE_REPO_NAME:$IMAGE_TAG .
- docker tag $IMAGE_REPO_NAME:$IMAGE_TAG $AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/$IMAGE_REPO_NAME:$IMAGE_TAG
post_build:
commands:
- echo Pushing the Docker image...
- docker push $AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/$IMAGE_REPO_NAME:$IMAGE_TAG
- echo Update ECS service
- aws ecs update-service --cluster $ECS_CLUSTER_NAME --service $ECS_SERVICE_NAME --force-new-deployment
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"scripts": {
"deploy": "npm run build && wrangler pages deploy",
"build": "remix vite:build",
"code:build": "NODE_OPTIONS=--max-old-space-size=4096 remix vite:build",
"dev": "node pre-start.cjs && remix vite:dev",
"test": "vitest --run",
"test:watch": "vitest",
Expand Down
Loading
Loading