From 816d6d5f818873d1dad28d48463e5c516d1d1fc9 Mon Sep 17 00:00:00 2001 From: Rahul Bhardwaj Date: Sun, 6 Oct 2024 19:42:49 +0530 Subject: [PATCH] Add support for docker dev in bolt --- CONTRIBUTING.md | 14 ++++++++++++++ Dockerfile | 16 ++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 Dockerfile diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 33bae8c9..7cad780f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -108,3 +108,17 @@ pnpm run deploy ``` Make sure you have the necessary permissions and Wrangler is correctly configured for your Cloudflare account. + +## Docker Dev + +To build docker image + +``` +docker build -t bolt-ai . +``` + +To run bolt dev in docker(Add ANTHROPIC_API_KEY=XXX before running) + +``` +docker run -p 5173:5173 --env-file .env.local bolt-ai +``` diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..171b4cea --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +FROM node:20.15.1 + +WORKDIR /app + +RUN npm install -g pnpm + +# Copy the rest of your app's source code +COPY . . + +# Install dependencies +RUN pnpm install + +# Expose the port the app runs on +EXPOSE 5173 + +CMD [ "pnpm", "run", "dev" ] \ No newline at end of file