Charan5775 commited on
Commit
b961249
·
verified ·
1 Parent(s): 816d0c6

Update Dockerfile

Browse files
Files changed (1) hide show
  1. 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
- # Ensure correct permissions for the /app directory
15
- RUN chmod -R 755 /app
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
- # Ensure correct permissions for the /app directory again in case of any issue during COPY
49
- RUN chmod -R 755 /app
50
 
51
- # Run the development server
52
- CMD pnpm run dev --host
 
 
 
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