Compare commits
4 Commits
336e197176
...
fb6651f1dc
| Author | SHA1 | Date | |
|---|---|---|---|
| fb6651f1dc | |||
| 58a6be8da0 | |||
| 17c3077cf0 | |||
| 75fabb3523 |
26
CLAUDE.md
26
CLAUDE.md
@@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
|||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
This is a personal infrastructure Ansible playbook that automates deployment and management of 24 self-hosted Docker services across two domains (`thesatelliteoflove.com` and `nerder.land`). The setup uses Tailscale VPN for secure networking and Caddy for reverse proxy with automated HTTPS.
|
This is a personal infrastructure Ansible playbook that automates deployment and management of 27 self-hosted Docker services across two domains (`thesatelliteoflove.com` and `nerder.land`). The setup uses Tailscale VPN for secure networking and Caddy for reverse proxy with automated HTTPS.
|
||||||
|
|
||||||
**Important**: Always review `DEPLOYMENT_LEARNINGS.md` when working on this repository for lessons learned and troubleshooting guidance.
|
**Important**: Always review `DEPLOYMENT_LEARNINGS.md` when working on this repository for lessons learned and troubleshooting guidance.
|
||||||
|
|
||||||
@@ -28,18 +28,18 @@ ansible-playbook dns.yml -i hosts.yml
|
|||||||
### Service Management
|
### Service Management
|
||||||
```bash
|
```bash
|
||||||
# Deploy specific services using tags (now properly isolated)
|
# Deploy specific services using tags (now properly isolated)
|
||||||
ansible-playbook site.yml -i hosts.yml --tags caddy --vault-password-file vault_pass --extra-vars "@secrets.enc"
|
ansible-playbook site.yml -i hosts.yml --tags caddy --vault-password-file vault_pass
|
||||||
ansible-playbook site.yml -i hosts.yml --tags authentik --vault-password-file vault_pass --extra-vars "@secrets.enc"
|
ansible-playbook site.yml -i hosts.yml --tags authentik --vault-password-file vault_pass
|
||||||
ansible-playbook site.yml -i hosts.yml --tags mmdl --vault-password-file vault_pass --extra-vars "@secrets.enc"
|
ansible-playbook site.yml -i hosts.yml --tags mmdl --vault-password-file vault_pass
|
||||||
ansible-playbook site.yml -i hosts.yml --tags docker --vault-password-file vault_pass --extra-vars "@secrets.enc" # all docker services
|
ansible-playbook site.yml -i hosts.yml --tags docker --vault-password-file vault_pass # all docker services
|
||||||
|
|
||||||
# Deploy services by category (new organized structure)
|
# Deploy services by category (new organized structure)
|
||||||
ansible-playbook site.yml -i hosts.yml --tags infrastructure --vault-password-file vault_pass --extra-vars "@secrets.enc"
|
ansible-playbook site.yml -i hosts.yml --tags infrastructure --vault-password-file vault_pass
|
||||||
ansible-playbook site.yml -i hosts.yml --tags media,productivity --vault-password-file vault_pass --extra-vars "@secrets.enc"
|
ansible-playbook site.yml -i hosts.yml --tags media,productivity --vault-password-file vault_pass
|
||||||
ansible-playbook site.yml -i hosts.yml --tags development,monitoring --vault-password-file vault_pass --extra-vars "@secrets.enc"
|
ansible-playbook site.yml -i hosts.yml --tags development,monitoring --vault-password-file vault_pass
|
||||||
|
|
||||||
# Deploy only infrastructure components
|
# Deploy only infrastructure components
|
||||||
ansible-playbook site.yml -i hosts.yml --tags common,cron --vault-password-file vault_pass --extra-vars "@secrets.enc"
|
ansible-playbook site.yml -i hosts.yml --tags common,cron --vault-password-file vault_pass
|
||||||
```
|
```
|
||||||
|
|
||||||
## Architecture
|
## Architecture
|
||||||
@@ -60,15 +60,15 @@ The docker role is now organized into logical service groups under `roles/docker
|
|||||||
- **infrastructure/**: Core platform components
|
- **infrastructure/**: Core platform components
|
||||||
- Caddy (reverse proxy), Authentik (SSO), Dockge (container management)
|
- Caddy (reverse proxy), Authentik (SSO), Dockge (container management)
|
||||||
- **development/**: Development and collaboration tools
|
- **development/**: Development and collaboration tools
|
||||||
- Gitea, Code Server
|
- Gitea, Code Server, ByteStash
|
||||||
- **media/**: Content creation and consumption
|
- **media/**: Content creation and consumption
|
||||||
- Audiobookshelf, Calibre, Ghost blog, Pinchflat, Pinry, Karakeep (formerly Hoarder), Manyfold
|
- Audiobookshelf, Calibre, Ghost blog, Pinchflat, Pinry, Karakeep (formerly Hoarder), Manyfold
|
||||||
- **productivity/**: Personal organization and document management
|
- **productivity/**: Personal organization and document management
|
||||||
- Paperless-NGX, MMDL, Baikal (CalDAV/CardDAV), Syncthing, Heyform, Dawarich, Pingvin
|
- Paperless-NGX, MMDL, Baikal (CalDAV/CardDAV), Syncthing, Heyform, Dawarich, Palmr, Obsidian LiveSync
|
||||||
- **communication/**: Social media and external communication
|
- **communication/**: Social media and external communication
|
||||||
- GoToSocial (Fediverse), Postiz (social media management)
|
- GoToSocial (Fediverse), Postiz (social media management)
|
||||||
- **monitoring/**: System monitoring and alerts
|
- **monitoring/**: System monitoring and alerts
|
||||||
- Changedetection, Glance dashboard, AppriseAPI
|
- Changedetection, Glance dashboard, AppriseAPI, Gotify
|
||||||
|
|
||||||
### Variable Management
|
### Variable Management
|
||||||
**Critical**: This infrastructure uses a centralized variable hierarchy in `group_vars/all/`:
|
**Critical**: This infrastructure uses a centralized variable hierarchy in `group_vars/all/`:
|
||||||
@@ -131,7 +131,7 @@ Common domains requiring hairpinning fixes:
|
|||||||
- **Dawarich**: Based on production compose file at https://github.com/Freika/dawarich/blob/master/docker/docker-compose.production.yml
|
- **Dawarich**: Based on production compose file at https://github.com/Freika/dawarich/blob/master/docker/docker-compose.production.yml
|
||||||
|
|
||||||
## Service Memories
|
## Service Memories
|
||||||
- pingvin is the service that responds on files.thesatelliteoflove.com
|
- palmr is the service that responds on files.thesatelliteoflove.com
|
||||||
- karakeep (formerly called hoarder) is deployed with both 'hoarder' and 'karakeep' tags for backward compatibility
|
- karakeep (formerly called hoarder) is deployed with both 'hoarder' and 'karakeep' tags for backward compatibility
|
||||||
- whenever i ask you what containers need updates, run dockcheck and return a list of containers needing updates
|
- whenever i ask you what containers need updates, run dockcheck and return a list of containers needing updates
|
||||||
- when i ask for the status container updates i want you to run dockcheck on the docker host https://github.com/mag37/dockcheck?ref=selfh.st
|
- when i ask for the status container updates i want you to run dockcheck on the docker host https://github.com/mag37/dockcheck?ref=selfh.st
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ The playbook manages two main environments:
|
|||||||
|
|
||||||
## Services Deployed
|
## Services Deployed
|
||||||
|
|
||||||
The Docker role deploys and manages 24 self-hosted services organized into logical categories:
|
The Docker role deploys and manages 27 self-hosted services organized into logical categories:
|
||||||
|
|
||||||
### Infrastructure
|
### Infrastructure
|
||||||
- **Caddy** (Reverse proxy with automatic HTTPS)
|
- **Caddy** (Reverse proxy with automatic HTTPS)
|
||||||
@@ -20,6 +20,7 @@ The Docker role deploys and manages 24 self-hosted services organized into logic
|
|||||||
### Development
|
### Development
|
||||||
- **Gitea** (Git repository hosting)
|
- **Gitea** (Git repository hosting)
|
||||||
- **Code Server** (VS Code in browser)
|
- **Code Server** (VS Code in browser)
|
||||||
|
- **ByteStash** (Code snippet management)
|
||||||
|
|
||||||
### Media
|
### Media
|
||||||
- **Audiobookshelf** (Audiobook server)
|
- **Audiobookshelf** (Audiobook server)
|
||||||
@@ -37,7 +38,8 @@ The Docker role deploys and manages 24 self-hosted services organized into logic
|
|||||||
- **Syncthing** (File synchronization)
|
- **Syncthing** (File synchronization)
|
||||||
- **HeyForm** (Form builder)
|
- **HeyForm** (Form builder)
|
||||||
- **Dawarich** (Location tracking)
|
- **Dawarich** (Location tracking)
|
||||||
- **Pingvin Share** (File sharing)
|
- **Palmr** (File sharing)
|
||||||
|
- **Obsidian LiveSync** (Note synchronization)
|
||||||
|
|
||||||
### Communication
|
### Communication
|
||||||
- **GoToSocial** (Fediverse/Mastodon)
|
- **GoToSocial** (Fediverse/Mastodon)
|
||||||
@@ -47,6 +49,7 @@ The Docker role deploys and manages 24 self-hosted services organized into logic
|
|||||||
- **Changedetection** (Website change monitoring)
|
- **Changedetection** (Website change monitoring)
|
||||||
- **Glance** (Dashboard)
|
- **Glance** (Dashboard)
|
||||||
- **AppriseAPI** (Notification service)
|
- **AppriseAPI** (Notification service)
|
||||||
|
- **Gotify** (Push notifications)
|
||||||
|
|
||||||
## Structure
|
## Structure
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ subdomains:
|
|||||||
tasks: "tasks.{{ primary_domain }}" # MMDL
|
tasks: "tasks.{{ primary_domain }}" # MMDL
|
||||||
syncthing: "syncthing.{{ primary_domain }}"
|
syncthing: "syncthing.{{ primary_domain }}"
|
||||||
loclog: "loclog.{{ primary_domain }}" # Dawarich
|
loclog: "loclog.{{ primary_domain }}" # Dawarich
|
||||||
files: "files.{{ primary_domain }}" # Pingvin file sharing
|
files: "files.{{ primary_domain }}" # Palmr file sharing
|
||||||
social: "social.{{ primary_domain }}" # GoToSocial
|
social: "social.{{ primary_domain }}" # GoToSocial
|
||||||
post: "post.{{ primary_domain }}" # Postiz
|
post: "post.{{ primary_domain }}" # Postiz
|
||||||
home: "home.{{ primary_domain }}" # Glance
|
home: "home.{{ primary_domain }}" # Glance
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ Deploys and manages a comprehensive self-hosted infrastructure with 24 container
|
|||||||
### Development (`development/`)
|
### Development (`development/`)
|
||||||
- **Gitea** - Self-hosted Git with CI/CD runners
|
- **Gitea** - Self-hosted Git with CI/CD runners
|
||||||
- **Code Server** - VS Code in the browser
|
- **Code Server** - VS Code in the browser
|
||||||
|
- **ByteStash** - Code snippet management and organization
|
||||||
|
|
||||||
### Media (`media/`)
|
### Media (`media/`)
|
||||||
- **Audiobookshelf** - Audiobook and podcast server
|
- **Audiobookshelf** - Audiobook and podcast server
|
||||||
@@ -45,7 +46,8 @@ Deploys and manages a comprehensive self-hosted infrastructure with 24 container
|
|||||||
- **Syncthing** - Decentralized file sync
|
- **Syncthing** - Decentralized file sync
|
||||||
- **Heyform** - Form builder and surveys
|
- **Heyform** - Form builder and surveys
|
||||||
- **Dawarich** - Location tracking
|
- **Dawarich** - Location tracking
|
||||||
- **Pingvin Share** - File sharing service
|
- **Palmr** - File sharing service
|
||||||
|
- **Obsidian LiveSync** - CouchDB backend for note synchronization
|
||||||
|
|
||||||
### Communication (`communication/`)
|
### Communication (`communication/`)
|
||||||
- **GoToSocial** - Lightweight ActivityPub server
|
- **GoToSocial** - Lightweight ActivityPub server
|
||||||
@@ -55,6 +57,7 @@ Deploys and manages a comprehensive self-hosted infrastructure with 24 container
|
|||||||
- **Glance** - Customizable dashboard with monitoring
|
- **Glance** - Customizable dashboard with monitoring
|
||||||
- **Change Detection** - Website monitoring
|
- **Change Detection** - Website monitoring
|
||||||
- **Apprise API** - Unified notifications
|
- **Apprise API** - Unified notifications
|
||||||
|
- **Gotify** - Self-hosted push notification service
|
||||||
|
|
||||||
## Deployment Patterns
|
## Deployment Patterns
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ snippets.thesatelliteoflove.com {
|
|||||||
}
|
}
|
||||||
|
|
||||||
files.thesatelliteoflove.com {
|
files.thesatelliteoflove.com {
|
||||||
reverse_proxy pingvin-pingvin-share-1:3000
|
reverse_proxy palmr-palmr-1:5487
|
||||||
}
|
}
|
||||||
|
|
||||||
git.thesatelliteoflove.com {
|
git.thesatelliteoflove.com {
|
||||||
|
|||||||
@@ -25,9 +25,9 @@
|
|||||||
import_tasks: dawarich.yml
|
import_tasks: dawarich.yml
|
||||||
tags: dawarich
|
tags: dawarich
|
||||||
|
|
||||||
- name: Install pingvin
|
- name: Install palmr
|
||||||
import_tasks: pingvin.yml
|
import_tasks: palmr.yml
|
||||||
tags: pingvin
|
tags: palmr
|
||||||
|
|
||||||
- name: Install obsidian-livesync
|
- name: Install obsidian-livesync
|
||||||
import_tasks: obsidian-livesync.yml
|
import_tasks: obsidian-livesync.yml
|
||||||
|
|||||||
19
roles/docker/tasks/productivity/palmr.yml
Normal file
19
roles/docker/tasks/productivity/palmr.yml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
- name: make palmr directories
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "{{ item }}"
|
||||||
|
state: directory
|
||||||
|
loop:
|
||||||
|
- /opt/stacks/palmr
|
||||||
|
|
||||||
|
- name: Template out the compose file
|
||||||
|
ansible.builtin.template:
|
||||||
|
src: palmr-compose.yml.j2
|
||||||
|
dest: /opt/stacks/palmr/compose.yml
|
||||||
|
owner: root
|
||||||
|
mode: 644
|
||||||
|
|
||||||
|
- name: deploy palmr stack
|
||||||
|
community.docker.docker_compose_v2:
|
||||||
|
project_src: /opt/stacks/palmr
|
||||||
|
files:
|
||||||
|
- compose.yml
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
- name: make pingvin directories
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "{{ item}}"
|
|
||||||
state: directory
|
|
||||||
loop:
|
|
||||||
- /opt/stacks/pingvin
|
|
||||||
|
|
||||||
- name: Template out the compose file
|
|
||||||
ansible.builtin.template:
|
|
||||||
src: pingvin-compose.yml.j2
|
|
||||||
dest: /opt/stacks/pingvin/compose.yml
|
|
||||||
owner: root
|
|
||||||
mode: 644
|
|
||||||
|
|
||||||
- name: deploy pingvin stack
|
|
||||||
community.docker.docker_compose_v2:
|
|
||||||
project_src: /opt/stacks/pingvin
|
|
||||||
files:
|
|
||||||
- compose.yml
|
|
||||||
30
roles/docker/templates/palmr-compose.yml.j2
Normal file
30
roles/docker/templates/palmr-compose.yml.j2
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
services:
|
||||||
|
palmr:
|
||||||
|
image: kyantech/palmr:latest
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
DISABLE_FILESYSTEM_ENCRYPTION: "false"
|
||||||
|
ENCRYPTION_KEY: "{{ vault_palmr.encryption_key }}"
|
||||||
|
PALMR_UID: "1000"
|
||||||
|
PALMR_GID: "1000"
|
||||||
|
SECURE_SITE: "true"
|
||||||
|
DEFAULT_LANGUAGE: "en-US"
|
||||||
|
TRUST_PROXY: "true"
|
||||||
|
extra_hosts:
|
||||||
|
- "{{ subdomains.auth }}:{{ docker.hairpin_ip }}"
|
||||||
|
labels:
|
||||||
|
glance.name: Palmr
|
||||||
|
glance.icon: si:files
|
||||||
|
glance.url: "https://{{ subdomains.files }}/"
|
||||||
|
glance.description: File sharing and storage
|
||||||
|
glance.id: palmr
|
||||||
|
mag37.dockcheck.update: true
|
||||||
|
volumes:
|
||||||
|
- palmr_data:/app/server
|
||||||
|
volumes:
|
||||||
|
palmr_data:
|
||||||
|
driver: local
|
||||||
|
networks:
|
||||||
|
default:
|
||||||
|
external: true
|
||||||
|
name: "{{ docker.network_name }}"
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
services:
|
|
||||||
pingvin-share:
|
|
||||||
image: stonith404/pingvin-share:latest
|
|
||||||
restart: unless-stopped
|
|
||||||
environment:
|
|
||||||
- TRUST_PROXY=true
|
|
||||||
extra_hosts:
|
|
||||||
- '{{ subdomains.auth }}:{{ docker.hairpin_ip }}'
|
|
||||||
labels:
|
|
||||||
glance.name: Pingvin
|
|
||||||
glance.icon: si:files
|
|
||||||
glance.url: https://{{ subdomains.files }}
|
|
||||||
glance.description: File sharing service
|
|
||||||
glance.id: pingvin
|
|
||||||
volumes:
|
|
||||||
- data:/opt/app/backend/data
|
|
||||||
- images:/opt/app/frontend/public/img
|
|
||||||
volumes:
|
|
||||||
images:
|
|
||||||
data:
|
|
||||||
networks:
|
|
||||||
default:
|
|
||||||
external: true
|
|
||||||
name: {{ docker.network_name }}
|
|
||||||
6
todo.md
6
todo.md
@@ -9,11 +9,11 @@
|
|||||||
roles/docker/tasks/
|
roles/docker/tasks/
|
||||||
├── main.yml (orchestrator)
|
├── main.yml (orchestrator)
|
||||||
├── infrastructure/ (caddy, authentik, dockge)
|
├── infrastructure/ (caddy, authentik, dockge)
|
||||||
├── development/ (gitea, codeserver)
|
├── development/ (gitea, codeserver, bytestash)
|
||||||
├── media/ (audiobookshelf, calibre, ghost, pinchflat, pinry, hoarder, manyfold)
|
├── media/ (audiobookshelf, calibre, ghost, pinchflat, pinry, hoarder, manyfold)
|
||||||
├── productivity/ (paperless, baikal, syncthing, mmdl, heyform, dawarich, pingvin)
|
├── productivity/ (paperless, baikal, syncthing, mmdl, heyform, dawarich, palmr, obsidian-livesync)
|
||||||
├── communication/ (gotosocial, postiz)
|
├── communication/ (gotosocial, postiz)
|
||||||
└── monitoring/ (glance, changedetection, appriseapi)
|
└── monitoring/ (glance, changedetection, appriseapi, gotify)
|
||||||
```
|
```
|
||||||
- **COMPLETED**: All services organized into logical categories with category-level tags
|
- **COMPLETED**: All services organized into logical categories with category-level tags
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user