Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +22 -11
Dockerfile
CHANGED
|
@@ -1,20 +1,31 @@
|
|
| 1 |
-
|
|
|
|
| 2 |
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
ENV PATH="/home/user/.bun/bin:$PATH"
|
| 8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
WORKDIR /app
|
| 10 |
|
| 11 |
-
# Clone
|
| 12 |
-
RUN git clone https://github.com/zigistry/database
|
| 13 |
|
| 14 |
-
|
|
|
|
| 15 |
|
| 16 |
-
|
|
|
|
| 17 |
|
| 18 |
-
|
|
|
|
| 19 |
|
| 20 |
-
|
|
|
|
|
|
| 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"]
|