When you’re ready to deploy your documentation website, say in Docker with Nginx the following Dockerfile and Nginx default.conf should do.
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
FROM python:3.9 as builder
WORKDIR /app
COPY . .
RUN pip install mkdocs mkdocs-material && mkdocs build
FROM nginx as deploy
# Copy the build to the nginx directory.
COPY --from=builder /app/site/ /usr/share/nginx/html/
# Copy the nginx configuration to the nginx config directory.
COPY default.conf /etc/nginx/conf.d/
EXPOSE 8080:8080/tcp
default.conf
1
2
3
4
5
server {
listen 8080;
root /usr/share/nginx/html/;
index index.html;
}
I thought that making videos will be easier that typing blog posts but to my surprise the difficulty is a bit higher. Fixing mistakes takes more time with videos and since I’m not that great of a presenter I struggle with presenting the content. Hopefully I will improve my skills with time and practice.