Update Dockerfile
Browse files- Dockerfile +9 -6
Dockerfile
CHANGED
|
@@ -1,19 +1,22 @@
|
|
| 1 |
-
# Build
|
| 2 |
FROM node:20-alpine AS builder
|
| 3 |
|
| 4 |
RUN apk add --no-cache git
|
| 5 |
-
WORKDIR /
|
| 6 |
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
-
WORKDIR /
|
| 10 |
RUN npm install
|
| 11 |
RUN npm run build
|
| 12 |
|
| 13 |
-
# Serve
|
| 14 |
FROM nginx:alpine
|
| 15 |
|
| 16 |
-
COPY --from=builder /
|
| 17 |
|
| 18 |
EXPOSE 7860
|
| 19 |
|
|
|
|
| 1 |
+
# 1) Build Dokploy Dashboard
|
| 2 |
FROM node:20-alpine AS builder
|
| 3 |
|
| 4 |
RUN apk add --no-cache git
|
| 5 |
+
WORKDIR /build
|
| 6 |
|
| 7 |
+
# Only shallow clone dashboard folder (HuggingFace friendly)
|
| 8 |
+
RUN git clone --depth 1 --filter=blob:none --sparse https://github.com/Dokploy/dokploy.git
|
| 9 |
+
WORKDIR /build/dokploy
|
| 10 |
+
RUN git sparse-checkout set apps/dashboard
|
| 11 |
|
| 12 |
+
WORKDIR /build/dokploy/apps/dashboard
|
| 13 |
RUN npm install
|
| 14 |
RUN npm run build
|
| 15 |
|
| 16 |
+
# 2) Serve with NGINX on HuggingFace (port 7860)
|
| 17 |
FROM nginx:alpine
|
| 18 |
|
| 19 |
+
COPY --from=builder /build/dokploy/apps/dashboard/dist /usr/share/nginx/html
|
| 20 |
|
| 21 |
EXPOSE 7860
|
| 22 |
|