Add initial Docker configuration and documentation setup

This commit is contained in:
Илья Глазунов 2025-12-05 13:21:33 +03:00
parent 1f25033d2d
commit 94e699549d
4 changed files with 69 additions and 0 deletions

16
.dockerignore Normal file
View File

@ -0,0 +1,16 @@
__pycache__
*.pyc
*.pyo
*.pyd
.Python
*.so
*.egg
*.egg-info
dist
build
.git
.gitignore
.dockerignore
Dockerfile
docker-compose.yml
README.md

7
Dockerfile Normal file
View File

@ -0,0 +1,7 @@
FROM python:3.13-slim
WORKDIR /app
RUN pip install --no-cache-dir https://git.pyserve.org/Shifty/pyserveX/releases/download/v0.9.10/pyserve-0.9.10-py3-none-any.whl
COPY . /app/docs/
COPY config.docs.yaml /app/config.docs.yaml
EXPOSE 80
CMD ["pyserve", "-c", "/app/config.docs.yaml"]

31
config.docs.yaml Normal file
View File

@ -0,0 +1,31 @@
# PyServe configuration for serving documentation
# Usage: pyserve -c config.docs.yaml
http:
static_dir: .
server:
host: 0.0.0.0
port: 80
backlog: 1000
default_root: false
ssl:
enabled: false
logging:
level: INFO
console_output: true
extensions:
- type: routing
config:
regex_locations:
"~*\\.(css)$":
root: "./docs"
cache_control: "public, max-age=3600"
"__default__":
root: "./docs"
index_file: "index.html"
cache_control: "no-cache"

15
docker-compose.yml Normal file
View File

@ -0,0 +1,15 @@
version: '3.8'
services:
pyserve-docs:
build:
context: .
dockerfile: Dockerfile
container_name: pyserve-docs
networks:
- pyserve_pyserve-network
restart: unless-stopped
networks:
pyserve_pyserve-network:
external: true