From 3787d8bdc9ce7d76b6a905102d97009f16c9ff70 Mon Sep 17 00:00:00 2001 From: CrimsonTome Date: Fri, 17 Feb 2023 01:08:20 +0000 Subject: [PATCH] feat: add zola dockerfile need to fix nginx 403 --- Dockerfile | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index e8c3010..2316020 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,8 @@ -FROM node:18-alpine3.17 as npmpackages -WORKDIR /app -COPY package.json . -RUN npm install - -FROM node:18-alpine3.17 as builder -WORKDIR /app -COPY --from=npmpackages /app /app -COPY . . -RUN npm run build +FROM ghcr.io/getzola/zola:v0.17.0 as zola +WORKDIR /site +COPY src/blog/ /site +CMD ["build"] FROM nginx:stable-alpine RUN rm -r /usr/share/nginx/html/ -COPY --from=builder /app/_site/ /usr/share/nginx/html/ - +COPY --from=zola /site/_site/ /usr/share/nginx/html/