Update Dockerfile
This commit is contained in:
parent
3d1709886d
commit
1ade33c8d9
1 changed files with 11 additions and 5 deletions
16
Dockerfile
16
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;"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue