feat: add zola dockerfile

need to fix nginx 403
main
CrimsonTome 2023-02-17 01:08:20 +00:00 committed by Rowan Clark
parent 36dfd92bab
commit 3787d8bdc9
No known key found for this signature in database
GPG Key ID: F620D51904044094
1 changed files with 5 additions and 12 deletions

View File

@ -1,15 +1,8 @@
FROM node:18-alpine3.17 as npmpackages FROM ghcr.io/getzola/zola:v0.17.0 as zola
WORKDIR /app WORKDIR /site
COPY package.json . COPY src/blog/ /site
RUN npm install CMD ["build"]
FROM node:18-alpine3.17 as builder
WORKDIR /app
COPY --from=npmpackages /app /app
COPY . .
RUN npm run build
FROM nginx:stable-alpine FROM nginx:stable-alpine
RUN rm -r /usr/share/nginx/html/ 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/