DOCS-1: Init document work
This commit is contained in:
15
Dockerfile.static
Normal file
15
Dockerfile.static
Normal file
@@ -0,0 +1,15 @@
|
||||
# Stage 1: build static HTML from Markdown
|
||||
FROM golang:1.22-alpine AS builder
|
||||
WORKDIR /build
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
COPY . .
|
||||
RUN go run ./cmd/build
|
||||
|
||||
# Stage 2: serve with nginx
|
||||
FROM nginx:alpine
|
||||
COPY --from=builder /build/dist /usr/share/nginx/html
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
EXPOSE 80
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
|
||||
Reference in New Issue
Block a user