Patches visual editor image upload fix from: https://git.moreminimore.com/kunthawat/emdash-patch-imageupload.git
42 lines
863 B
Docker
42 lines
863 B
Docker
FROM node:22-alpine AS deps
|
|
|
|
RUN apk add --no-cache python3 make g++ sqlite git
|
|
|
|
WORKDIR /app
|
|
|
|
# Clone patched emdash source
|
|
RUN git clone --depth=1 https://git.moreminimore.com/kunthawat/emdash-patch-imageupload.git emdash-patch
|
|
|
|
COPY package.json pnpm-lock.yaml* ./
|
|
RUN corepack enable && corepack prepare pnpm@9.0.0 --activate
|
|
RUN pnpm install
|
|
|
|
FROM deps AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy patched emdash into node_modules
|
|
COPY --from=deps /app/emdash-patch /app/node_modules/emdash
|
|
|
|
COPY --from=deps /app/node_modules ./node_modules
|
|
COPY . .
|
|
|
|
RUN pnpm build && mkdir -p storage/uploads
|
|
|
|
FROM deps AS runner
|
|
|
|
WORKDIR /app
|
|
|
|
ENV NODE_ENV=production
|
|
ENV HOST=0.0.0.0
|
|
|
|
COPY --from=builder /app/node_modules ./node_modules
|
|
COPY --from=builder /app/dist ./dist
|
|
|
|
EXPOSE 4321
|
|
|
|
COPY entrypoint.sh /entrypoint.sh
|
|
RUN chmod +x /entrypoint.sh
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|