-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CHORE] adding website container (#8)
Signed-off-by: Nicolas Takashi <[email protected]>
- Loading branch information
1 parent
6153cae
commit 5e51368
Showing
4 changed files
with
46 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FROM golang:1.21 as synchronizer | ||
|
||
COPY ./website ./website | ||
COPY ./scripts ./scripts | ||
COPY Makefile . | ||
COPY .mdox.yaml . | ||
|
||
RUN go install github.com/bwplotka/mdox@latest | ||
RUN apt update && apt install -y git make | ||
|
||
RUN make synchronize | ||
|
||
FROM hugomods/hugo:exts as builder | ||
|
||
ARG HUGO_BASEURL= | ||
ENV HUGO_BASEURL=${HUGO_BASEURL} | ||
|
||
COPY --from=synchronizer /go/website . | ||
|
||
RUN npm install --ignore-scripts | ||
|
||
RUN hugo --minify --gc --cleanDestinationDir | ||
|
||
FROM hugomods/hugo:nginx | ||
|
||
# Copy the generated files to keep the image as small as possible. | ||
COPY --from=builder /src/public /site |