Add in cloudflare ddns and restructure repo

This commit is contained in:
James Thompson
2026-05-19 08:30:25 +00:00
parent c546fab5e1
commit 6fb3fc65e4
35 changed files with 132 additions and 131 deletions

View File

@@ -1,5 +0,0 @@
# check_env_sync
> Python script documentation
::: scripts.check_env_sync

View File

@@ -1,5 +0,0 @@
# generate_docs
> Python script documentation
::: scripts.generate_docs

View File

@@ -1,5 +1,8 @@
# SJHL Documentation
!!! warning "Early development"
This documentation is in early development and not all features are working yet. Use with caution.
Welcome to Seirian & James' homelab documentation! This is a docs site that is built to easily show all the configs we use. MOst of the content is auto-generated from the actual config files, so it should always be up to date. This should be completely publically viewable as all private information is kept in `.env` files that are not committed to Git. It should provide good information on how to recover and rebuild the homelab if needed, and also just be a nice reference for how everything is configured.
## Data Classification
@@ -7,7 +10,7 @@ Welcome to Seirian & James' homelab documentation! This is a docs site that is b
| Type | Example | Git Repo? | Backup? | Location |
|------|---------|-----------|---------|----------|
| **Source Configs** | `docker-compose.yml`, `.env.example`, `Makefile` | Yes | No | `/srv/homelab-infra` |
| **Service Secrets** | `.env` (DB passwords, API keys) | No | Yes | `/srv/homelab-infra/<service>/.env` |
| **Service Secrets** | `.env` (DB passwords, API keys) | No | Yes | `/srv/homelab-infra/services/<service>/.env` |
| **Runtime Configs** | `acme.json`, service configs | No | Yes | `/mnt/storage/docker-data/<service>` |
| **Persistent Data** | DB data, uploads, media | No | Yes | `/mnt/storage/docker-data/<service>` |
@@ -15,6 +18,7 @@ Welcome to Seirian & James' homelab documentation! This is a docs site that is b
| Service | Image | Status |
|---------|-------|--------|
| [cloudflare-ddns](services/cloudflare-ddns.md) | `favonia/cloudflare-ddns:1` | active |
| [devbox](services/devbox.md) | `devbox-devcontainer` | active |
| [docs-site](services/docs-site.md) | `nginx:alpine` | active |
| [gitea](services/gitea.md) | `gitea/gitea:1.24.3` | active |
@@ -29,21 +33,21 @@ Welcome to Seirian & James' homelab documentation! This is a docs site that is b
git clone git@gitea.sjhl.nz:james/homelab-infra.git
cd homelab-infra
# Set up environment
cp .env.example .env
# Edit .env with real values
# Create all missing .env files from templates
make init-env
# Set up service secrets
for svc in traefik gitea nextcloud qbittorrent jellyfin devbox obsidian; do
[ -f "$svc/.env.example" ] && cp "$svc/.env.example" "$svc/.env"
# Edit each .env with real secrets
done
# Edit .env and services/*/.env with real secrets
# Create required Docker networks
docker network create web
# Start everything
# Start and verify everything
make up
make status
# Optional: start/stop one service
# make up-<service>
# make down-<service>
```
## Commands
@@ -114,9 +118,13 @@ homelab-infra/
├── backup.sh # Restic backup script
├── .pre-commit-config.yaml # Pre-commit hooks
├── docs/ # MkDocs documentation
├── mkdocs.yml # MkDocs config
├── scripts/ # Utility scripts
└── [service subdirs]/ # All services have their own subdir
├── mkdocs.yml # MkDocs config
├── scripts/ # Utility scripts
└── services/ # Service definitions
└── <service>/ # One folder per service
├── docker-compose.yml
├── .env.example
└── README.md
```
## Data Locations

View File

@@ -1,66 +0,0 @@
# Recovery Reference
This document was generated from `docker inspect` dumps taken after the accidental deletion of `/home/james`. It preserves the last known-good configuration state for rebuilding services.
## Container Summary
### traefik (Reverse Proxy)
- **Image:** `traefik:v3.6`
- **Config path (old):** `/home/james/apps/traefik/`
- **Volumes:** certs, dynamic config, docker.sock (ro)
- **Networks:** `web` (external)
- **Ports:** 80, 443, 8082->8080
- **Let's Encrypt:** HTTP challenge, email `letsencrypt.debug772@passmail.net`
### gitea
- **Image:** `gitea/gitea:1.24.3`
- **Data path (old):** `/mnt/storage/apps/gitea`
- **DB:** SQLite3
- **SSH:** port 222
- **URL:** `https://gitea.sjhl.nz/`
### nextcloud (AIO)
- **Image:** `ghcr.io/nextcloud-releases/all-in-one:latest`
- **Data path (old):** `/mnt/storage/apps/nextcloud`
- **Components:** mastercontainer, apache, nextcloud, database (PostgreSQL 17), redis, collabora, imaginary, whiteboard, notify-push
- **URL:** `https://nextcloud.sjhl.nz`
- **AIO mgmt:** port 8081
- **Apache port:** 11000
### qbittorrent + VPN
- **VPN:** ProtonVPN WireGuard, New Zealand, port forwarding
- **Data path (old):** `/home/james/apps/qbittorrent/`
- **Downloads:** `/mnt/storage/torrents`
- **Components:** gluetun, qbittorrent, jackett
- **Ports:** 8080 (qBittorrent), 9117 (Jackett)
### jellyfin
- **Image:** `jellyfin/jellyfin:10.10.7`
- **Config path (old):** `/home/james/apps/jellyfin-config`
- **Media:** `/mnt/storage`
- **Port:** 8096
- **Network:** default bridge (NOT on `web` network)
- **Note:** Was not behind Traefik in old setup
### devbox
- **Image:** `devbox-devcontainer` (local build)
- **Data path (old):** `/mnt/storage/apps/devbox`
- **Port:** 46573->2222 (SSH)
- **Memory limit:** 10GB, swap 20GB
### obsidian-livesync
- **Image:** `couchdb:latest`
- **Status:** Exited (127) at time of backup
- **Note:** No inspect data captured, container was stopped
## Recovery Path Mapping
| Old Path | New Path |
|----------|----------|
| `/home/james/apps/traefik/` | `/mnt/storage/docker-data/traefik/` |
| `/home/james/apps/qbittorrent/` | `/mnt/storage/docker-data/qbittorrent/` |
| `/home/james/apps/jellyfin-config` | `/mnt/storage/docker-data/jellyfin/config` |
| `/mnt/storage/apps/gitea` | `/mnt/storage/docker-data/gitea` |
| `/mnt/storage/apps/nextcloud` | `/mnt/storage/docker-data/nextcloud` |
| `/mnt/storage/apps/devbox` | `/mnt/storage/docker-data/devbox` |
| `/mnt/storage/torrents` | `/mnt/storage/torrents` (unchanged) |

View File

@@ -0,0 +1,15 @@
# cloudflare-ddns
> Below are the configuration files for this service. For details on how to deploy or customize, refer to the README above or the official documentation for the service.
## Docker Compose Configuration
```yaml
--8<-- "services/cloudflare-ddns/docker-compose.yml"
```
## Environment Variables (`.env.example`)
```bash
--8<-- "services/cloudflare-ddns/.env.example"
```

View File

@@ -5,11 +5,11 @@
## Docker Compose Configuration
```yaml
--8<-- "devbox/docker-compose.yml"
--8<-- "services/devbox/docker-compose.yml"
```
## Environment Variables (`.env.example`)
```bash
--8<-- "devbox/.env.example"
--8<-- "services/devbox/.env.example"
```

View File

@@ -1,10 +1,10 @@
# docs-site
--8<-- "docs-site/README.md"
--8<-- "services/docs-site/README.md"
> Below are the configuration files for this service. For details on how to deploy or customize, refer to the README above or the official documentation for the service.
## Docker Compose Configuration
```yaml
--8<-- "docs-site/docker-compose.yml"
--8<-- "services/docs-site/docker-compose.yml"
```

View File

@@ -5,11 +5,11 @@
## Docker Compose Configuration
```yaml
--8<-- "gitea/docker-compose.yml"
--8<-- "services/gitea/docker-compose.yml"
```
## Environment Variables (`.env.example`)
```bash
--8<-- "gitea/.env.example"
--8<-- "services/gitea/.env.example"
```

View File

@@ -5,11 +5,11 @@
## Docker Compose Configuration
```yaml
--8<-- "nextcloud/docker-compose.yml"
--8<-- "services/nextcloud/docker-compose.yml"
```
## Environment Variables (`.env.example`)
```bash
--8<-- "nextcloud/.env.example"
--8<-- "services/nextcloud/.env.example"
```

View File

@@ -1,16 +1,16 @@
# obsidian-livesync
--8<-- "obsidian-livesync/README.md"
--8<-- "services/obsidian-livesync/README.md"
> Below are the configuration files for this service. For details on how to deploy or customize, refer to the README above or the official documentation for the service.
## Docker Compose Configuration
```yaml
--8<-- "obsidian-livesync/docker-compose.yml"
--8<-- "services/obsidian-livesync/docker-compose.yml"
```
## Environment Variables (`.env.example`)
```bash
--8<-- "obsidian-livesync/.env.example"
--8<-- "services/obsidian-livesync/.env.example"
```

View File

@@ -1,16 +1,16 @@
# traefik
--8<-- "traefik/README.md"
--8<-- "services/traefik/README.md"
> Below are the configuration files for this service. For details on how to deploy or customize, refer to the README above or the official documentation for the service.
## Docker Compose Configuration
```yaml
--8<-- "traefik/docker-compose.yml"
--8<-- "services/traefik/docker-compose.yml"
```
## Environment Variables (`.env.example`)
```bash
--8<-- "traefik/.env.example"
--8<-- "services/traefik/.env.example"
```

View File

@@ -5,5 +5,5 @@
## Docker Compose Configuration
```yaml
--8<-- "whoami/docker-compose.yml"
--8<-- "services/whoami/docker-compose.yml"
```