diff --git a/Dockerfile b/Dockerfile index 37fed47..269431b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ FROM python:3.11-slim # Set the working directory in the container WORKDIR /app -# Copy the requirements file if you have one +# Copy the requirements file COPY requirements.txt . # Install MkDocs and any other dependencies @@ -16,8 +16,14 @@ COPY . . # Build the MkDocs project RUN mkdocs build -# Expose the port that MkDocs will run on -EXPOSE 3000 +# Use Nginx as the web server +FROM nginx:latest -# Command to run the MkDocs server on port 3000 -CMD ["mkdocs", "serve", "--dev-addr=0.0.0.0:3000"] +# Copy the built MkDocs site to the Nginx HTML directory +COPY --from=0 /app/site /usr/share/nginx/html + +# Expose the default Nginx port +EXPOSE 80 + +# Start Nginx +CMD ["nginx", "-g", "daemon off;"]