Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +15 -17
Dockerfile
CHANGED
@@ -1,28 +1,26 @@
|
|
1 |
-
#
|
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
|
11 |
-
|
12 |
-
|
|
|
13 |
|
14 |
-
# Install dependencies
|
15 |
-
RUN npm install
|
16 |
|
17 |
-
#
|
|
|
|
|
|
|
18 |
RUN pnpm build
|
19 |
|
20 |
-
# Expose the port
|
21 |
EXPOSE 5173
|
22 |
|
23 |
-
#
|
24 |
-
|
25 |
-
RUNNING_IN_DOCKER=true
|
26 |
-
|
27 |
-
# Command to run the application
|
28 |
-
CMD ["pnpm", "run", "start"]
|
|
|
1 |
+
# Use the Node.js 18 base image
|
2 |
+
FROM node:18
|
|
|
|
|
3 |
|
4 |
# Set the working directory
|
5 |
WORKDIR /app
|
6 |
|
7 |
# Clone the repository
|
8 |
+
RUN git clone https://github.com/coleam00/bolt.new-any-llm.git /app
|
9 |
+
|
10 |
+
# Ensure the .env.local file is created dynamically if it's missing (replace with actual values)
|
11 |
+
RUN echo "OPENAI_API_KEY=dummy-key\nANTHROPIC_API_KEY=dummy-key\nPORT=5173" > /app/.env.local
|
12 |
|
13 |
+
# Install necessary dependencies and ensure correct permissions
|
14 |
+
RUN npm install --frozen-lockfile
|
15 |
|
16 |
+
# Fix permission issues for wrangler tmp folder and application directory
|
17 |
+
RUN mkdir -p /app/.wrangler/tmp && chmod -R 777 /app && chmod -R 777 /app/.wrangler
|
18 |
+
|
19 |
+
# Build the application
|
20 |
RUN pnpm build
|
21 |
|
22 |
+
# Expose the application port
|
23 |
EXPOSE 5173
|
24 |
|
25 |
+
# Define the default command to start the application
|
26 |
+
CMD ["npm", "run", "start"]
|
|
|
|
|
|
|
|