RohanVashisht commited on
Commit
bfb43ae
·
verified ·
1 Parent(s): 0b3e194

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +22 -11
Dockerfile CHANGED
@@ -1,20 +1,31 @@
1
- FROM oven/bun:1.0.30
 
2
 
3
- RUN apt-get update && apt-get install -y git
 
 
 
4
 
5
- RUN adduser --disabled-password --gecos "" user
6
- USER user
7
- ENV PATH="/home/user/.bun/bin:$PATH"
8
 
 
 
 
 
9
  WORKDIR /app
10
 
11
- # Clone the repository
12
- RUN git clone https://github.com/zigistry/database
13
 
14
- COPY --chown=user . .
 
15
 
16
- RUN bun install
 
17
 
18
- EXPOSE 7860
 
19
 
20
- CMD ["bun", "./src/index.ts"]
 
 
1
+ # Start from barebones Debian
2
+ FROM debian:bookworm-slim
3
 
4
+ # Install deps
5
+ RUN apt-get update && apt-get install -y \
6
+ curl git unzip \
7
+ && rm -rf /var/lib/apt/lists/*
8
 
9
+ # Install Bun
10
+ RUN curl -fsSL https://bun.sh/install | bash
 
11
 
12
+ # Add Bun to PATH
13
+ ENV PATH="/root/.bun/bin:$PATH"
14
+
15
+ # Set working directory
16
  WORKDIR /app
17
 
18
+ # Clone repo
19
+ RUN git clone https://github.com/zigistry/database .
20
 
21
+ # Install dependencies
22
+ RUN bun install --production
23
 
24
+ # Hugging Face expects the app to run on $PORT
25
+ ENV PORT=7860
26
 
27
+ # Expose that port
28
+ EXPOSE $PORT
29
 
30
+ # Run app
31
+ CMD ["bun", "./src/index.ts"]