mirror of
https://github.com/tubearchivist/docs.git
synced 2024-11-12 23:20:14 +00:00
deploy with docker nginx
This commit is contained in:
parent
40c2c1ed73
commit
b46be0c07f
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
# ignore test builds
|
||||
mkdocs/site
|
17
Dockerfile
Normal file
17
Dockerfile
Normal file
@ -0,0 +1,17 @@
|
||||
# build the docs and load static files into nginx
|
||||
|
||||
FROM python:3.10.9-slim-bullseye AS builder
|
||||
ENV PATH=/root/.local/bin:$PATH
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
git
|
||||
|
||||
COPY requirements.txt /requirements.txt
|
||||
RUN pip install --user -r requirements.txt
|
||||
|
||||
RUN git clone https://github.com/tubearchivist/docs.git
|
||||
WORKDIR docs/mkdocs
|
||||
RUN mkdocs build
|
||||
|
||||
FROM nginx as srv
|
||||
COPY --from=builder docs/mkdocs/site /usr/share/nginx/html
|
11
README.md
11
README.md
@ -27,3 +27,14 @@ mkdocs serve
|
||||
```
|
||||
|
||||
And the site - with live reload enabled - should be available on [localhost:8000](http://localhost:8000/).
|
||||
|
||||
## Production environment
|
||||
Build the Docker image:
|
||||
```
|
||||
docker build -t bbilly1/tubearchivist-docs .
|
||||
```
|
||||
|
||||
Run the image:
|
||||
```
|
||||
docker run -p 80:80 bbilly1/tubearchivist-docs
|
||||
```
|
||||
|
2
requirements.txt
Normal file
2
requirements.txt
Normal file
@ -0,0 +1,2 @@
|
||||
mkdocs==1.4.2
|
||||
mkdocs-material==9.1.3
|
Loading…
Reference in New Issue
Block a user