Skip to content

Commit 4c08c17

Browse files
committed
Initial commit: Espilon documentation
- Complete MkDocs documentation structure - Docker multi-stage build (Python build + Nginx serve) - Docker Compose configuration for VPS deployment - GitHub Actions CI/CD workflow - Material theme with dark/light mode - Multi-language search support
0 parents  commit 4c08c17

32 files changed

Lines changed: 9145 additions & 0 deletions

.dockerignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
venv/
2+
.venv/
3+
__pycache__/
4+
*.pyc
5+
.git/
6+
.github/
7+
site/
8+
.DS_Store
9+
*.log
10+
.env

.github/workflows/docs.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Build and Deploy Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
workflow_dispatch:
11+
12+
jobs:
13+
build:
14+
name: Build Documentation
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Python
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: '3.x'
24+
25+
- name: Cache dependencies
26+
uses: actions/cache@v3
27+
with:
28+
path: ~/.cache/pip
29+
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
30+
restore-keys: |
31+
${{ runner.os }}-pip-
32+
33+
- name: Install dependencies
34+
run: pip install -r requirements.txt
35+
36+
- name: Build documentation
37+
run: mkdocs build --strict
38+
39+
- name: Upload build artifacts
40+
uses: actions/upload-artifact@v3
41+
with:
42+
name: docs-site
43+
path: site/
44+
45+
deploy:
46+
name: Deploy to VPS
47+
runs-on: ubuntu-latest
48+
needs: build
49+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
50+
steps:
51+
- name: Checkout repository
52+
uses: actions/checkout@v4
53+
54+
- name: Deploy via SSH
55+
uses: appleboy/ssh-action@v1.0.3
56+
with:
57+
host: ${{ secrets.VPS_HOST }}
58+
username: ${{ secrets.VPS_USER }}
59+
key: ${{ secrets.VPS_SSH_KEY }}
60+
script: |
61+
cd ${{ secrets.DOCS_PATH || '/opt/espilon-docs' }}
62+
git pull origin main
63+
docker-compose -f docker-compose.docs.yml build
64+
docker-compose -f docker-compose.docs.yml up -d
65+
docker image prune -f

.gitignore

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Python
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
*.so
6+
.Python
7+
env/
8+
venv/
9+
.venv/
10+
ENV/
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
pip-wheel-metadata/
24+
share/python-wheels/
25+
*.egg-info/
26+
.installed.cfg
27+
*.egg
28+
MANIFEST
29+
30+
# MkDocs
31+
site/
32+
.cache/
33+
34+
# IDEs
35+
.vscode/
36+
.idea/
37+
*.swp
38+
*.swo
39+
*~
40+
.DS_Store
41+
42+
# OS
43+
Thumbs.db
44+
45+
# Claude
46+
.claude/

Dockerfile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Multi-stage build for MkDocs documentation
2+
3+
# Stage 1: Build documentation
4+
FROM python:3.11-slim AS builder
5+
6+
WORKDIR /docs
7+
8+
# Copy requirements and install dependencies
9+
COPY requirements.txt .
10+
RUN pip install --no-cache-dir -r requirements.txt
11+
12+
# Copy documentation source
13+
COPY . .
14+
15+
# Build static documentation
16+
RUN mkdocs build
17+
18+
# Stage 2: Serve with Nginx
19+
FROM nginx:alpine
20+
21+
# Copy built documentation from builder stage
22+
COPY --from=builder /docs/site /usr/share/nginx/html
23+
24+
# Copy custom nginx configuration if needed
25+
# COPY nginx.conf /etc/nginx/conf.d/default.conf
26+
27+
# Expose port 80
28+
EXPOSE 80
29+
30+
# Health check
31+
HEALTHCHECK --interval=30s --timeout=3s \
32+
CMD wget --quiet --tries=1 --spider http://localhost/ || exit 1

README.md

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
# Espilon Documentation
2+
3+
Official documentation for the Espilon ESP32 embedded agent framework.
4+
5+
**Live Documentation**: https://docs.espilon.net
6+
7+
**Main Project**: https://github.com/Espilon-Net
8+
9+
## About
10+
11+
Complete documentation for Espilon, built with [MkDocs](https://www.mkdocs.org/) and the [Material theme](https://squidfunk.github.io/mkdocs-material/).
12+
13+
## Documentation Contents
14+
15+
- **Getting Started**: Installation, quick start, and overview
16+
- **Hardware**: Supported boards and setup guides
17+
- **Configuration**: Menuconfig and network settings
18+
- **Tools**: Flasher and C2 server
19+
- **Modules**: Command reference and module system
20+
- **Security**: Best practices and encryption
21+
22+
## Quick Start
23+
24+
### Local Development
25+
26+
```bash
27+
# Clone
28+
git clone https://github.com/Espilon-Net/espilon-docs.git
29+
cd espilon-docs
30+
31+
# Setup
32+
python3 -m venv venv
33+
source venv/bin/activate
34+
pip install -r requirements.txt
35+
36+
# Run
37+
mkdocs serve
38+
```
39+
40+
Documentation available at http://localhost:8000
41+
42+
### Docker Build
43+
44+
```bash
45+
# Build
46+
docker build -t espilon-docs .
47+
48+
# Run
49+
docker run -p 8080:80 espilon-docs
50+
```
51+
52+
Access at http://localhost:8080
53+
54+
## Deployment
55+
56+
### Self-Hosted with Docker Compose
57+
58+
```bash
59+
docker-compose -f docker-compose.docs.yml up -d
60+
```
61+
62+
The service will be available on port 80 and can be proxied via Nginx.
63+
64+
### Configuration Example (Nginx)
65+
66+
```nginx
67+
server {
68+
listen 443 ssl;
69+
server_name docs.espilon.net;
70+
71+
ssl_certificate /etc/letsencrypt/live/espilon.net/fullchain.pem;
72+
ssl_certificate_key /etc/letsencrypt/live/espilon.net/privkey.pem;
73+
74+
location / {
75+
proxy_pass http://espilon-docs:80;
76+
proxy_set_header Host $host;
77+
proxy_set_header X-Real-IP $remote_addr;
78+
}
79+
}
80+
```
81+
82+
## Repository Structure
83+
84+
```
85+
espilon-docs/
86+
├── docs/ # Markdown files
87+
├── mkdocs.yml # MkDocs config
88+
├── requirements.txt # Python dependencies
89+
├── Dockerfile # Multi-stage build
90+
├── docker-compose.docs.yml # Docker Compose config
91+
└── .github/workflows/ # CI/CD
92+
```
93+
94+
## Contributing
95+
96+
1. Fork the repository
97+
2. Create your feature branch
98+
3. Make changes and test locally with `mkdocs serve`
99+
4. Commit your changes
100+
5. Push and create a Pull Request
101+
102+
## License
103+
104+
Documentation for the Espilon project.
105+
106+
---
107+
108+
**Built with MkDocs Material**

docker-compose.docs.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
version: '3.8'
2+
3+
services:
4+
docs:
5+
build: .
6+
container_name: espilon-docs
7+
restart: always
8+
expose:
9+
- "80"
10+
networks:
11+
- default
12+
labels:
13+
- "docs.espilon.net"
14+
15+
networks:
16+
default:
17+
external: true
18+
name: espilon_default

0 commit comments

Comments
 (0)