feat: add Asciinema terminal recording server stack
Added new asciinema stack for self-hosted terminal recording and sharing platform with custom "Pivoine" theme inspired by pivoine.art aesthetic. New Services: - **asciinema**: Terminal recording server at asciinema.pivoine.art - PostgreSQL backend for recording persistence - Email authentication via IONOS SMTP magic links - Public/private recording visibility controls - Embed recordings on any website - Custom rose/magenta themed UI Custom Theme (asciinema/theme/custom.css): - Primary color: RGB(206, 39, 91) - Deep rose/magenta - Dark charcoal backgrounds: HSL(0, 0%, 17.5%) - High contrast design with bold color accents - Styled components: navigation, cards, forms, buttons, terminal player - Smooth animations and hover effects - Responsive design with mobile breakpoints - Custom scrollbars, selection colors, loading states Infrastructure Updates: - PostgreSQL: Added `asciinema` database to init script - arty.yml: Added ASCIINEMA_* environment variables - compose.yaml: Included asciinema stack in root composition - CLAUDE.md: Comprehensive documentation with CLI setup guide - Backup: Added asciinema-backup plan (11 AM daily, 7d/4w/6m/2y retention) Configuration: - URL: https://asciinema.pivoine.art - Database: PostgreSQL `asciinema` database - SMTP: Email auth via IONOS SMTP - Unclaimed TTL: 30 days (auto-cleanup) - Secret: Generated 64-char hex key in .env Features: - Record terminal sessions with asciinema CLI - Web player with play/pause controls and speed adjustment - User profiles with personal recording collections - Embed recordings via iframe or direct links - Privacy controls (public/private recordings) - Automatic cleanup of unclaimed recordings Integration Points: - Documentation: Embed terminal demos - Blog posts: Share command-line tutorials - GitHub: Link recordings in README files - Tutorials: Interactive terminal walkthroughs 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
73
CLAUDE.md
73
CLAUDE.md
@@ -26,6 +26,7 @@ Root `compose.yaml` uses Docker Compose's `include` directive to orchestrate mul
|
||||
- **jelly**: Jellyfin media server with hardware transcoding
|
||||
- **drop**: PairDrop peer-to-peer file sharing
|
||||
- **ai**: AI infrastructure with Open WebUI, Crawl4AI, and pgvector (PostgreSQL)
|
||||
- **asciinema**: Terminal recording and sharing platform (PostgreSQL)
|
||||
- **restic**: Backrest backup system with restic backend
|
||||
- **netdata**: Real-time infrastructure monitoring
|
||||
- **sablier**: Dynamic scaling plugin for Traefik
|
||||
@@ -65,6 +66,7 @@ Services expose themselves via Docker labels:
|
||||
- Creates `n8n` database for workflow automation
|
||||
- Creates `linkwarden` database for Links bookmark manager
|
||||
- Creates `joplin` database for Joplin Server
|
||||
- Creates `asciinema` database for Asciinema terminal recording server
|
||||
- Grants privileges to `$DB_USER`
|
||||
|
||||
## Common Commands
|
||||
@@ -488,6 +490,71 @@ AI infrastructure with Open WebUI, Crawl4AI, and dedicated PostgreSQL with pgvec
|
||||
|
||||
**Note**: All AI volumes are backed up daily at 3 AM via Restic with 7 daily, 4 weekly, 6 monthly, and 2 yearly retention.
|
||||
|
||||
### Asciinema (asciinema/compose.yaml)
|
||||
Terminal recording and sharing platform:
|
||||
- **asciinema**: Asciinema server exposed at `asciinema.pivoine.art:4000`
|
||||
- Self-hosted terminal recording platform
|
||||
- Record, share, and embed terminal sessions
|
||||
- User authentication via email magic links
|
||||
- Public and private recording visibility
|
||||
- Embed recordings on any website
|
||||
- PostgreSQL backend for recording persistence
|
||||
- Custom "Pivoine" theme with rose/magenta aesthetic
|
||||
- Data persisted in `asciinema_data` volume
|
||||
|
||||
**Features**:
|
||||
- **Terminal Recording**: Record terminal sessions with asciinema CLI
|
||||
- **Web Player**: Embedded player with play/pause controls and speed adjustment
|
||||
- **User Profiles**: Personal recording collections and user pages
|
||||
- **Embedding**: Share recordings via iframe or direct links
|
||||
- **Privacy Controls**: Mark recordings as public or private
|
||||
- **Automatic Cleanup**: Unclaimed recordings deleted after 30 days
|
||||
|
||||
**Configuration**:
|
||||
- **URL**: `https://asciinema.pivoine.art`
|
||||
- **Database**: PostgreSQL `asciinema` database
|
||||
- **SMTP**: Email authentication via IONOS SMTP
|
||||
- **Unclaimed TTL**: 30 days (configurable via `ASCIINEMA_UNCLAIMED_TTL`)
|
||||
|
||||
**Custom Theme**:
|
||||
The server uses a custom CSS theme inspired by pivoine.art:
|
||||
- **Primary Color**: RGB(206, 39, 91) - Deep rose/magenta
|
||||
- **Dark Background**: Charcoal HSL(0, 0%, 17.5%)
|
||||
- **High Contrast**: Bold color accents on dark backgrounds
|
||||
- **Animations**: Smooth transitions and hover effects
|
||||
- **Custom Styling**: Cards, buttons, forms, terminal player, and navigation
|
||||
|
||||
**CLI Setup**:
|
||||
```bash
|
||||
# Install asciinema CLI
|
||||
pip install asciinema
|
||||
|
||||
# Configure CLI to use self-hosted server
|
||||
export ASCIINEMA_SERVER_URL=https://asciinema.pivoine.art
|
||||
|
||||
# Record a session
|
||||
asciinema rec
|
||||
|
||||
# Upload to server
|
||||
asciinema upload session.cast
|
||||
```
|
||||
|
||||
**Usage**:
|
||||
1. Access https://asciinema.pivoine.art
|
||||
2. Click "Sign In" and enter your email
|
||||
3. Check email for magic login link
|
||||
4. Configure asciinema CLI with server URL
|
||||
5. Record and upload terminal sessions
|
||||
6. Share recordings via public links or embeds
|
||||
|
||||
**Integration Points**:
|
||||
- **Documentation**: Embed terminal demos in docs
|
||||
- **Blog Posts**: Share command-line tutorials
|
||||
- **GitHub**: Link recordings in README files
|
||||
- **Tutorials**: Interactive terminal walkthroughs
|
||||
|
||||
**Note**: Asciinema data is backed up daily via Restic with 7 daily, 4 weekly, 6 monthly, and 2 yearly retention.
|
||||
|
||||
### Netdata (netdata/compose.yaml)
|
||||
Real-time infrastructure monitoring and alerting:
|
||||
- **netdata**: Netdata monitoring agent exposed at `netdata.pivoine.art:19999`
|
||||
@@ -530,7 +597,7 @@ Backrest backup system with restic backend:
|
||||
- Prune: Weekly (Sundays at 2 AM) - removes old snapshots per retention policy
|
||||
- Check: Weekly (Sundays at 3 AM) - verifies repository integrity
|
||||
|
||||
**Backup Plans** (16 automated daily backups):
|
||||
**Backup Plans** (17 automated daily backups):
|
||||
1. **postgres-backup** (2 AM daily)
|
||||
- Path: `/volumes/core_postgres_data`
|
||||
- Retention: 7 daily, 4 weekly, 6 monthly, 2 yearly
|
||||
@@ -595,6 +662,10 @@ Backrest backup system with restic backend:
|
||||
- Paths: `/volumes/ai_postgres_data`, `/volumes/ai_webui_data`, `/volumes/ai_crawl4ai_data`
|
||||
- Retention: 7 daily, 4 weekly, 6 monthly, 2 yearly
|
||||
|
||||
17. **asciinema-backup** (11 AM daily)
|
||||
- Path: `/volumes/asciinema_data`
|
||||
- Retention: 7 daily, 4 weekly, 6 monthly, 2 yearly
|
||||
|
||||
**Volume Mounting**:
|
||||
All Docker volumes are mounted read-only to `/volumes/` with prefixed names (e.g., `backup_core_postgres_data`) to avoid naming conflicts with other compose stacks.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user