Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +9 -8
Dockerfile
CHANGED
@@ -4,15 +4,15 @@ FROM ${BASE} AS base
|
|
4 |
WORKDIR /app
|
5 |
|
6 |
# Install dependencies (this step is cached as long as the dependencies don't change)
|
7 |
-
COPY package.json pnpm-lock.yaml
|
8 |
|
9 |
RUN corepack enable pnpm && pnpm install
|
10 |
|
11 |
# Copy the rest of your app's source code
|
12 |
-
COPY
|
13 |
|
14 |
-
#
|
15 |
-
RUN
|
16 |
|
17 |
# Expose the port the app runs on
|
18 |
EXPOSE 5173
|
@@ -45,8 +45,9 @@ ENV GROQ_API_KEY=${GROQ_API_KEY} \
|
|
45 |
VITE_LOG_LEVEL=${VITE_LOG_LEVEL} \
|
46 |
DEFAULT_NUM_CTX=${DEFAULT_NUM_CTX}
|
47 |
|
48 |
-
|
49 |
-
RUN chmod -R 755 /app
|
50 |
|
51 |
-
#
|
52 |
-
|
|
|
|
|
|
4 |
WORKDIR /app
|
5 |
|
6 |
# Install dependencies (this step is cached as long as the dependencies don't change)
|
7 |
+
COPY package.json pnpm-lock.yaml./
|
8 |
|
9 |
RUN corepack enable pnpm && pnpm install
|
10 |
|
11 |
# Copy the rest of your app's source code
|
12 |
+
COPY..
|
13 |
|
14 |
+
# Change ownership to node user
|
15 |
+
RUN chown -R node:node /app
|
16 |
|
17 |
# Expose the port the app runs on
|
18 |
EXPOSE 5173
|
|
|
45 |
VITE_LOG_LEVEL=${VITE_LOG_LEVEL} \
|
46 |
DEFAULT_NUM_CTX=${DEFAULT_NUM_CTX}
|
47 |
|
48 |
+
RUN mkdir -p ${WORKDIR}/run
|
|
|
49 |
|
50 |
+
# Switch to node user
|
51 |
+
USER node
|
52 |
+
|
53 |
+
CMD pnpm run dev --host
|