From cbcb099fcfd8eefd75fd1f25afa522c841171096 Mon Sep 17 00:00:00 2001 From: GreenH Date: Wed, 6 Mar 2024 01:27:32 +1100 Subject: [PATCH] docker --- .dockerignore | 8 ++++++++ dockerfile | 20 ++++++++++++++++++++ mkdocs.yml | 3 +-- requirments.txt | 1 + 4 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 .dockerignore create mode 100644 dockerfile create mode 100644 requirments.txt diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..d0e61fc --- /dev/null +++ b/.dockerignore @@ -0,0 +1,8 @@ +# vscode +/.vscode + +# idea +/.idea + +# git +/.git \ No newline at end of file diff --git a/dockerfile b/dockerfile new file mode 100644 index 0000000..bedb070 --- /dev/null +++ b/dockerfile @@ -0,0 +1,20 @@ +# Use a lightweight base image +FROM arm64v8/python:3.8-alpine + +# Set the working directory in the container +WORKDIR /app + +# Copy the local MkDocs files into the container +COPY . /app + +# Install MkDocs and any required plugins +RUN pip install mkdocs mkdocs-material + +# Build the MkDocs site +RUN mkdocs build + +# Expose port 8000 to serve the MkDocs site +EXPOSE 8000 + +# Command to serve the MkDocs site using the built-in HTTP server +CMD ["mkdocs", "serve", "-a", "0.0.0.0:8000"] diff --git a/mkdocs.yml b/mkdocs.yml index 9fd59b4..dc3beec 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,5 +1,5 @@ site_name: greenh47 -site_url: https://greenh47.github.io/mynote/ +site_url: https://note.greenhuang.com repo_url: https://github.com/GreenH47/mynote site_description: greenh47 personal website site_author: greenh47 @@ -77,7 +77,6 @@ plugins: - search: indexing: 'full' separator: '[\s\-,:!=\[\]()"/]+|\.(?!\d)|&[lg]t;|(?!\b)(?=[A-Z][a-z])' - - git-revision-date extra: social: diff --git a/requirments.txt b/requirments.txt new file mode 100644 index 0000000..016bb16 --- /dev/null +++ b/requirments.txt @@ -0,0 +1 @@ +mkdocs