feat: initial mdBook setup with CI/CD
- mdBook structure - Multi-image Docker build - Deploy to books.softwarehuset.com
This commit is contained in:
parent
98d32b5f16
commit
f8d7067ea0
11 changed files with 231 additions and 0 deletions
20
Dockerfile
Normal file
20
Dockerfile
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# Build stage
|
||||
FROM rust:1.75-alpine AS builder
|
||||
|
||||
RUN apk add --no-cache musl-dev
|
||||
RUN cargo install mdbook --version 0.4.40
|
||||
|
||||
WORKDIR /book
|
||||
COPY book.toml .
|
||||
COPY src/ src/
|
||||
|
||||
RUN mdbook build
|
||||
|
||||
# Runtime stage
|
||||
FROM nginx:alpine
|
||||
|
||||
COPY --from=builder /book/book /usr/share/nginx/html
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue