mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
fix: disable husky only on production
This commit is contained in:
13
Dockerfile
13
Dockerfile
@@ -1,9 +1,6 @@
|
||||
# Etapa 1: Prepare image for building
|
||||
FROM node:18-slim AS base
|
||||
|
||||
# Disable husky
|
||||
ENV HUSKY=0
|
||||
|
||||
# Install dependencies
|
||||
ENV PNPM_HOME="/pnpm"
|
||||
ENV PATH="$PNPM_HOME:$PATH"
|
||||
@@ -11,6 +8,10 @@ RUN corepack enable && apt-get update && apt-get install -y python3 make g++ git
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Disable husky
|
||||
ENV HUSKY=0
|
||||
COPY .husky/install.mjs ./.husky/install.mjs
|
||||
|
||||
# Copy package.json and pnpm-lock.yaml
|
||||
COPY package.json pnpm-lock.yaml ./
|
||||
|
||||
@@ -36,6 +37,12 @@ RUN corepack enable && apt-get update && apt-get install -y curl && apt-get inst
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
ENV NODE_ENV production
|
||||
|
||||
# Disable husky
|
||||
ENV HUSKY=0
|
||||
COPY --from=base /app/.husky/install.mjs ./.husky/install.mjs
|
||||
|
||||
# Copy the rest of the source code
|
||||
COPY --from=base /app/.next ./.next
|
||||
COPY --from=base /app/dist ./dist
|
||||
|
||||
Reference in New Issue
Block a user