Auspicious14 commited on
Commit
2aceb16
·
verified ·
1 Parent(s): 446494a

Upload 2 files

Browse files
Files changed (2) hide show
  1. .dockerignore +4 -0
  2. Dockerfile +6 -8
.dockerignore ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ node_modules
2
+ dist
3
+ .env
4
+ .git
Dockerfile CHANGED
@@ -6,21 +6,19 @@ RUN apt-get update && apt-get install -y openssl && rm -rf /var/lib/apt/lists/*
6
 
7
  WORKDIR /app
8
 
9
- # Copy package files
10
- COPY package*.json ./
11
- COPY prisma ./prisma/
12
 
13
- # Install dependencies
14
  RUN npm install
15
 
16
- # Copy source code
17
- COPY . .
18
 
19
- # Generate Prisma client and build
20
  RUN npm run build
21
 
22
  # Hugging Face Spaces defaults to port 7860
23
- # We will set the environment variable to ensure the app uses it
24
  ENV PORT=7860
25
  EXPOSE 7860
26
 
 
6
 
7
  WORKDIR /app
8
 
9
+ # Copy all files from your backend root to the container
10
+ COPY . .
 
11
 
12
+ # Install dependencies (this will use the package.json we just copied)
13
  RUN npm install
14
 
15
+ # Generate Prisma client
16
+ RUN npx prisma generate
17
 
18
+ # Build the TypeScript code
19
  RUN npm run build
20
 
21
  # Hugging Face Spaces defaults to port 7860
 
22
  ENV PORT=7860
23
  EXPOSE 7860
24