aboutsummaryrefslogtreecommitdiff
path: root/docker/crupest-nginx/Dockerfile
blob: cf08ee584819f317c298e394c10e1a50bcbc2caa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
FROM node:latest AS build-www
RUN npm install -g pnpm
COPY sites/www /sites/www
WORKDIR /sites/www
RUN pnpm install --frozen-lockfile && pnpm run build

FROM klakegg/hugo:ext-alpine AS build-blog
# install git
RUN apk add --no-cache git
WORKDIR /
RUN git clone https://github.com/crupest/blog.git && cd blog && git submodule update --init --recursive
WORKDIR /blog
RUN hugo

FROM nginx:latest
COPY --from=build-www /sites/www/dist /srv/www
COPY --from=build-blog /blog/public /srv/blog