Upload Dockerfile with huggingface_hub
Browse files- Dockerfile +3 -3
Dockerfile
CHANGED
|
@@ -13,11 +13,11 @@ ENV VITE_SUPABASE_URL=$VITE_SUPABASE_URL \
|
|
| 13 |
|
| 14 |
# Install dependencies first (layer caching)
|
| 15 |
COPY package.json ./
|
| 16 |
-
RUN npm install
|
| 17 |
|
| 18 |
# Copy source and build frontend + bundle server
|
| 19 |
COPY . .
|
| 20 |
-
RUN npm run build
|
| 21 |
|
| 22 |
# ---- Stage 2: Production ----
|
| 23 |
FROM node:20-alpine AS production
|
|
@@ -29,7 +29,7 @@ ENV NODE_ENV=production \
|
|
| 29 |
|
| 30 |
# Install production-only dependencies (esbuild, vitest, typescript etc. excluded)
|
| 31 |
COPY package.json ./
|
| 32 |
-
RUN npm install --omit=dev && npm cache clean --force
|
| 33 |
|
| 34 |
# Copy the built output from builder stage
|
| 35 |
COPY --from=builder /app/dist ./dist
|
|
|
|
| 13 |
|
| 14 |
# Install dependencies first (layer caching)
|
| 15 |
COPY package.json ./
|
| 16 |
+
RUN npm install --prefer-offline --no-audit --no-fund
|
| 17 |
|
| 18 |
# Copy source and build frontend + bundle server
|
| 19 |
COPY . .
|
| 20 |
+
RUN npm run build --if-present
|
| 21 |
|
| 22 |
# ---- Stage 2: Production ----
|
| 23 |
FROM node:20-alpine AS production
|
|
|
|
| 29 |
|
| 30 |
# Install production-only dependencies (esbuild, vitest, typescript etc. excluded)
|
| 31 |
COPY package.json ./
|
| 32 |
+
RUN npm install --prefer-offline --no-audit --no-fund --omit=dev && npm cache clean --force
|
| 33 |
|
| 34 |
# Copy the built output from builder stage
|
| 35 |
COPY --from=builder /app/dist ./dist
|