Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +18 -13
Dockerfile
CHANGED
@@ -1,23 +1,28 @@
|
|
1 |
-
#
|
2 |
-
|
|
|
|
|
3 |
|
4 |
# Set the working directory
|
5 |
WORKDIR /app
|
6 |
|
7 |
# Clone the repository
|
8 |
-
RUN
|
9 |
-
|
10 |
-
|
11 |
-
RUN echo "OPENAI_API_KEY=dummy-key\nANTHROPIC_API_KEY=dummy-key\nPORT=5173" > /app/.env.local
|
12 |
|
13 |
-
#
|
14 |
-
RUN
|
15 |
|
16 |
-
#
|
17 |
-
RUN
|
18 |
|
19 |
-
# Expose the application
|
20 |
EXPOSE 5173
|
21 |
|
22 |
-
#
|
23 |
-
|
|
|
|
|
|
|
|
|
|
1 |
+
# Dockerfile for bolt.new-any-llm on Hugging Face Spaces
|
2 |
+
|
3 |
+
# Use a lightweight Node.js image as the base
|
4 |
+
FROM node:20-bullseye-slim
|
5 |
|
6 |
# Set the working directory
|
7 |
WORKDIR /app
|
8 |
|
9 |
# Clone the repository
|
10 |
+
RUN apt-get update && apt-get install -y git \
|
11 |
+
&& git clone https://github.com/coleam00/bolt.new-any-llm.git . \
|
12 |
+
&& rm -rf /var/lib/apt/lists/*
|
|
|
13 |
|
14 |
+
# Install dependencies using pnpm
|
15 |
+
RUN npm install -g pnpm && pnpm install --frozen-lockfile
|
16 |
|
17 |
+
# Build the application for production
|
18 |
+
RUN pnpm build
|
19 |
|
20 |
+
# Expose the port used by the application
|
21 |
EXPOSE 5173
|
22 |
|
23 |
+
# Set environment variables for Hugging Face Spaces
|
24 |
+
ENV NODE_ENV=production \
|
25 |
+
RUNNING_IN_DOCKER=true
|
26 |
+
|
27 |
+
# Command to run the application
|
28 |
+
CMD ["pnpm", "run", "start"]
|