From 07857229813c3554304a80ddce335f4d2614a766 Mon Sep 17 00:00:00 2001 From: TSYSDevStack Team Date: Thu, 13 Nov 2025 17:35:34 -0500 Subject: [PATCH] =?UTF-8?q?feat:=20=F0=9F=9A=80=20Initialize=20TSYS=20Deve?= =?UTF-8?q?loper=20Support=20Stack=20demo=20environment?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add comprehensive Docker Compose configuration with 16 developer services - Configure Homepage dashboard with service discovery and grouping - Set up environment configuration for demo deployment - Include project documentation (PRD, README, User Guide, Agent guidelines) - Establish foundation for developer tooling stack with proper networking and security Services include developer tools (Homepage, Atuin, Wakapi, ArchiveBox, Tube Archivist, MailHog), infrastructure (PostgreSQL, Elasticsearch, Redis, Docker Socket Proxy), monitoring (InfluxDB, Grafana), and documentation (Draw.io, Kroki). --- SupportStack/demo/AGENTS.md | 181 ++++++++ SupportStack/demo/PRD.md | 365 +++++++++++++++ SupportStack/demo/README.md | 399 +++++++++++++++++ SupportStack/demo/USER_GUIDE.md | 263 +++++++++++ SupportStack/demo/demo.env | 36 ++ SupportStack/demo/docker-compose.yml | 545 +++++++++++++++++++++++ SupportStack/demo/homepage-services.yaml | 3 + SupportStack/demo/homepage-settings.yaml | 22 + 8 files changed, 1814 insertions(+) create mode 100644 SupportStack/demo/AGENTS.md create mode 100644 SupportStack/demo/PRD.md create mode 100644 SupportStack/demo/README.md create mode 100644 SupportStack/demo/USER_GUIDE.md create mode 100644 SupportStack/demo/demo.env create mode 100644 SupportStack/demo/docker-compose.yml create mode 100644 SupportStack/demo/homepage-services.yaml create mode 100644 SupportStack/demo/homepage-settings.yaml diff --git a/SupportStack/demo/AGENTS.md b/SupportStack/demo/AGENTS.md new file mode 100644 index 0000000..52564ac --- /dev/null +++ b/SupportStack/demo/AGENTS.md @@ -0,0 +1,181 @@ +# TSYS Developer Support Stack - Agent Guidelines + +## Project Intent +The TSYS Developer Support Stack is a comprehensive Docker Compose environment providing 16 developer tools and services for TSYS Group development workflow. This stack includes: + +- **Developer Tools**: Homepage (dashboard), Atuin (shell history), Wakapi (time tracking), ArchiveBox (web archiving), Tube Archivist (YouTube archiving), MailHog (email testing) +- **Infrastructure**: PostgreSQL, Elasticsearch, Docker Socket Proxy, Pi-hole (DNS), Portainer (Docker management), Redis (cache) +- **Monitoring**: InfluxDB (time series), Grafana (visualization) +- **Documentation**: Draw.io (diagrams), Kroki (diagrams as code) + +## ๐Ÿšจ STRICT QA/TESTING/AUDITING/VALIDATION GUIDELINES + +### ๐Ÿ“‹ MANDATORY TESTING PROTOCOL + +**ALL CHANGES MUST PASS THE FOLLOWING BEFORE CONSIDERATION COMPLETE:** + +1. **PRIMARY VALIDATION**: `./test-stack.sh` is the **ONLY** entrypoint for all testing/qa/audit/validation + - **100% Test Coverage Required**: All end-user facing services must be tested + - **Zero Failure Tolerance**: Any test failure = change rejected + - **Comprehensive Validation**: Security, functionality, performance, accessibility + +2. **PRE-COMMIT VALIDATION**: Before any commit: + ```bash + # MUST run full test suite + ./test-stack.sh + + # MUST verify all services healthy + docker compose --env-file demo.env ps + + # MUST validate configuration + ./test-stack.sh config + ``` + +3. **SERVICE CATEGORIES**: + - **End-User Services**: Homepage, Atuin, Wakapi, ArchiveBox, Tube Archivist, MailHog, Pi-hole, Portainer, InfluxDB, Grafana, Draw.io, Kroki + - **Infrastructure Services**: PostgreSQL, Elasticsearch, Redis, Docker Socket Proxy + - **Homepage Display Rule**: ONLY end-user services should appear in Homepage dashboard + +### ๐Ÿ”’ SECURITY VALIDATION REQUIREMENTS + +1. **Docker Socket Security**: + - โœ… No direct Docker socket exposure + - โœ… All access through proxy only + - โœ… Proxy properly restricts dangerous operations + +2. **Resource Limits**: + - โœ… All services have memory limits + - โœ… All services have CPU limits + - โœ… Resource usage monitored + +3. **Network Security**: + - โœ… Services isolated in dedicated network + - โœ… Only necessary ports exposed + - โœ… No privileged containers + +### ๐Ÿงช TEST SUITE REQUIREMENTS (test-stack.sh) + +**MUST INCLUDE THE FOLLOWING TEST CATEGORIES:** + +1. **Configuration Validation**: + - Docker Compose syntax validation + - Environment variable validation + - YAML file linting + - Shell script linting + +2. **Service Health Validation**: + - All end-user services accessible via HTTP + - All health check endpoints responding + - Proper service status reporting + - Service discovery functionality + +3. **Security Validation**: + - Docker socket proxy security testing + - Port accessibility validation + - Container privilege verification + - Network isolation testing + +4. **Functionality Validation**: + - Homepage service discovery accuracy + - Service grouping correctness + - End-user interface accessibility + - Integration testing between services + +5. **Performance Validation**: + - Resource usage monitoring + - Startup time validation + - Memory leak detection + - CPU usage validation + +### ๐Ÿ“Š SUCCESS CRITERIA (100% REQUIRED) + +**ALL OF THE FOLLOWING MUST PASS:** + +1. **Container Status**: + - โœ… All 16 containers running + - โœ… All end-user services healthy + - โœ… No restart loops + - โœ… Proper startup ordering + +2. **Service Accessibility**: + - โœ… All end-user services accessible via designated ports + - โœ… HTTP status 200 for all web interfaces + - โœ… Health check endpoints responding + - โœ… No port conflicts + +3. **Homepage Dashboard**: + - โœ… Discovers exactly 12 end-user services (not 16) + - โœ… Services grouped correctly in 4 categories + - โœ… No infrastructure services displayed + - โœ… Service status accurately reported + +4. **Security Compliance**: + - โœ… Docker socket proxy secure + - โœ… No direct socket access + - โœ… Resource limits enforced + - โœ… Network isolation maintained + +5. **Test Suite Coverage**: + - โœ… 100% end-user service coverage + - โœ… All failure scenarios tested + - โœ… Performance benchmarks met + - โœ… Security validations complete + +## Demo Environment Specifics +- **Network**: 192.168.3.0/24 +- **Host IP**: 192.168.3.6 +- **Port Range**: 4000-4011 for services, 2375 for Docker socket proxy +- **Docker Network**: tsysdevstack_supportstack +- **All passwords**: demo_password (for demo environment only) + +## ๐Ÿ”„ WORKFLOW INTEGRATION + +### Before Making Changes: +1. Run `./test-stack.sh` to establish baseline +2. Make changes +3. Run `./test-stack.sh` again +4. Fix any failures +5. Repeat until 100% pass + +### Before Committing: +1. `./test-stack.sh` must pass completely +2. All services must be healthy +3. Manual verification of key functionality +4. Documentation updated if needed + +### Before Declaring "Done": +1. Full test suite execution +2. Manual service verification +3. Performance validation +4. Security audit completion +5. Documentation review + +## Critical Configuration Files +- `docker-compose.yml`: Main service definitions with resource limits +- `homepage/config/settings.yaml`: Homepage configuration +- `homepage/config/docker.yaml`: Service discovery configuration (CRITICAL for service filtering) +- `test-stack.sh`: **PRIMARY VALIDATION TOOL** - comprehensive test suite +- `AGENTS.md`: This file - QA guidelines and workflow requirements + +## ๐Ÿšจ CURRENT KNOWN ISSUES (MUST BE FIXED) + +1. **Homepage Service Discovery**: + - โŒ Redis/Elasticsearch/PostgreSQL appearing (should be hidden) + - โŒ Pi-hole not working + - โŒ Atuin not working + - โŒ Tube Archivist not working + - โŒ Portainer showing "unknown" status + +2. **Service Health Issues**: + - โŒ Multiple services restarting + - โŒ Health check timing issues + - โŒ Resource contention problems + +## Success Criteria (100% REQUIRED) +- โœ… All 16 containers running and healthy +- โœ… Homepage discovering exactly 12 end-user services in 4 groups +- โœ… All end-user ports accessible and responding with HTTP 200 +- โœ… Test suite passing completely (100% coverage) +- โœ… No security vulnerabilities (Docker socket only via proxy) +- โœ… Zero infrastructure services displayed in Homepage +- โœ… All end-user services fully functional \ No newline at end of file diff --git a/SupportStack/demo/PRD.md b/SupportStack/demo/PRD.md new file mode 100644 index 0000000..16508d1 --- /dev/null +++ b/SupportStack/demo/PRD.md @@ -0,0 +1,365 @@ +# TSYS Developer Support Stack - Product Requirements Document (Demo Version) + +## ๐Ÿ“‹ Document Overview + +**Document ID**: PRD-SUPPORT-DEMO-001 +**Version**: 1.0 +**Date**: 2025-11-13 +**Author**: TSYS Development Team +**Status**: Draft + +--- + +## ๐ŸŽฏ Product Vision + +To create a comprehensive, demo-ready developer support services stack that enhances developer productivity and quality of life for the TSYS engineering team. This stack is designed to run locally on every developer workstation, providing essential services for inner loop development workflows while maintaining security, simplicity, and adherence to free/libre/open source principles. + +--- + +## ๐Ÿ—๏ธ Architecture Overview + +### Design Principles + +1. **Demo-First**: All services configured for easy demonstration with no persistent data, hardcoded credentials, and minimal setup complexity +2. **Service Discovery**: Automatic service discovery via Homepage dashboard with Docker labels +3. **FOSS Only**: Exclusively use free/libre/open source software +4. **Inner Loop Focus**: Support daily development workflows, not project-specific dependencies +5. **Workstation Local**: Run locally on developer machines, not centralized infrastructure +6. **Security Conscious**: Demo-hardened configurations with clear separation from production + +### Service Categories + +- **Infrastructure Services**: Core platform services (Pi-hole, Portainer) +- **Monitoring & Observability**: Metrics and visualization (InfluxDB, Grafana) +- **Documentation & Diagramming**: Knowledge management tools (Draw.io, Kroki) +- **Developer Tools**: Productivity and workflow enhancers + +--- + +## ๐Ÿ“Š Functional Requirements + +### FR-001: Infrastructure Services + +#### FR-001.1: Pi-hole DNS Management +- **Description**: DNS-based ad blocking and network monitoring +- **Requirements**: + - Web-based administration interface + - DNS filtering capabilities + - Network traffic monitoring + - Demo configuration with default settings + - Port assignment: 4006 + - Health check endpoint: HTTP GET / + - Homepage integration with Infrastructure group + +#### FR-001.2: Portainer Container Management +- **Description**: Web-based Docker container management interface +- **Requirements**: + - Container lifecycle management (start/stop/restart) + - Image management and registry integration + - Volume and network management + - User authentication (demo credentials) + - Port assignment: 4007 + - Health check endpoint: HTTP GET / + - Homepage integration with Infrastructure group + +### FR-002: Monitoring & Observability + +#### FR-002.1: InfluxDB Time Series Database +- **Description**: High-performance time series database for metrics storage +- **Requirements**: + - HTTP API for data ingestion and querying + - Web-based administration interface + - Demo database with sample data + - Port assignment: 4008 + - Health check endpoint: HTTP GET /ping + - Homepage integration with Monitoring group + +#### FR-002.2: Grafana Visualization Platform +- **Description**: Analytics and visualization platform for time series data +- **Requirements**: + - Pre-configured data source connection to InfluxDB + - Demo dashboards for system metrics + - Web-based dashboard creation and editing + - Admin credentials: admin/demo_password + - Port assignment: 4009 + - Health check endpoint: HTTP GET /api/health + - Homepage integration with Monitoring group + +### FR-003: Documentation & Diagramming + +#### FR-003.1: Draw.io Diagramming Server +- **Description**: Web-based diagramming and flowchart application +- **Requirements**: + - Browser-based diagram creation and editing + - Export to multiple formats (PNG, SVG, PDF) + - Integration with cloud storage (optional) + - No authentication required (demo mode) + - Port assignment: 4010 + - Health check endpoint: HTTP GET / + - Homepage integration with Documentation group + +#### FR-003.2: Kroki Diagrams as a Service +- **Description**: Service for converting text diagrams to images +- **Requirements**: + - Support for multiple diagram types (PlantUML, Mermaid, GraphViz) + - HTTP API for diagram generation + - Simple web interface for testing + - No authentication required (demo mode) + - Port assignment: 4011 + - Health check endpoint: HTTP GET /health + - Homepage integration with Documentation group + +--- + +## ๐Ÿ”ง Technical Requirements + +### TR-001: Docker Integration +- All services must be containerized using official Docker images +- Services must use consistent naming convention: `tsysdevstack-supportstack-{service}` +- All services must include comprehensive health checks +- Services must include proper Homepage labels for auto-discovery +- Restart policy: `unless-stopped` + +### TR-002: Network Configuration +- All services must use the `tsysdevstack_supportstack` network +- Port assignments must follow the 4000+ range pattern +- Services must be accessible via `192.168.3.6:{port}` +- Inter-service communication via container names + +### TR-003: Data Management +- No persistent data storage (demo mode) +- Use Docker volumes for temporary data only +- All data must be reset on container restart +- Hardcoded demo credentials only +- No encryption or security hardening + +### TR-004: Service Discovery +- All services must include Homepage labels: + - `homepage.group`: Service category + - `homepage.name`: Display name + - `homepage.icon`: Appropriate icon + - `homepage.href`: Full URL + - `homepage.description`: Brief service description + +--- + +## ๐ŸŽจ User Experience Requirements + +### UX-001: Homepage Dashboard +- Single entry point for all services via Homepage at port 4000 +- Automatic service discovery and organization +- Consistent visual design and navigation +- Real-time service status indicators + +### UX-002: Service Accessibility +- All services accessible via web browser +- No complex setup or configuration required +- Default credentials where authentication is needed +- Clear error messages and troubleshooting guidance + +### UX-003: Demo Experience +- One-command deployment: `docker compose up -d` +- Services ready within 60 seconds +- All features immediately accessible +- No data persistence between sessions + +--- + +## ๐Ÿ”’ Security Requirements + +### SEC-001: Demo Security Model +- All services configured for demo/development use only +- Hardcoded credentials clearly marked as demo-only +- No external network access except for image pulls +- No encryption or security hardening + +### SEC-002: Network Isolation +- Services isolated within Docker network +- Only necessary ports exposed to host +- No inter-container privilege escalation +- Docker socket proxy for secure API access + +--- + +## ๐Ÿ“‹ Non-Functional Requirements + +### NFR-001: Performance +- All services must start within 60 seconds +- Health checks must complete within 10 seconds +- Memory usage per service: < 512MB (where applicable) +- CPU usage: < 25% per service (idle) + +### NFR-002: Reliability +- All services must include health checks +- Automatic restart on failure +- Graceful shutdown handling +- Dependency management between services + +### NFR-003: Maintainability +- Clear, commented Docker Compose configuration +- Consistent service naming and organization +- Comprehensive documentation +- Easy service addition/removal + +--- + +## ๐Ÿงช Testing Requirements + +### TST-001: Automated Testing +- Comprehensive test suite (`test-stack.sh`) +- Service health validation +- Port accessibility verification +- Service discovery functionality +- Resource usage monitoring + +### TST-002: Manual Testing +- All web interfaces accessible and functional +- Demo credentials work correctly +- Service integration testing +- User workflow validation + +--- + +## ๐Ÿ“š Documentation Requirements + +### DOC-001: Technical Documentation +- Updated README.md with all services +- Service access information +- Configuration details +- Troubleshooting guide + +### DOC-002: User Documentation +- Quick start guide +- Service descriptions and use cases +- Demo credentials reference +- FAQ section + +--- + +## โœ… Acceptance Criteria + +### AC-001: Deployment Success +- [ ] All services start successfully with `docker compose up -d` +- [ ] All services pass health checks within 60 seconds +- [ ] Homepage discovers and displays all services +- [ ] All web interfaces accessible via browser + +### AC-002: Functionality Verification +- [ ] Pi-hole web interface loads and functions +- [ ] Portainer manages containers correctly +- [ ] InfluxDB accepts data and responds to queries +- [ ] Grafana connects to InfluxDB and displays dashboards +- [ ] Draw.io creates and exports diagrams +- [ ] Kroki generates diagrams from text + +### AC-003: Integration Testing +- [ ] Service discovery works correctly +- [ ] Inter-service communication functions +- [ ] Health checks trigger appropriately +- [ ] Resource usage remains within limits + +--- + +## ๐Ÿš€ Success Metrics + +### Deployment Metrics +- Time to full stack readiness: < 2 minutes +- Service success rate: 100% +- Health check pass rate: 100% + +### User Experience Metrics +- Single-command deployment success +- All services accessible via Homepage +- No configuration required for basic use + +--- + +## ๐Ÿ“… Implementation Timeline + +### Phase 1: Core Infrastructure (Week 1) +- Pi-hole implementation +- Portainer integration +- Basic service discovery validation + +### Phase 2: Monitoring Stack (Week 1) +- InfluxDB deployment +- Grafana configuration +- Dashboard creation + +### Phase 3: Documentation Tools (Week 2) +- Draw.io server setup +- Kroki service implementation +- Integration testing + +### Phase 4: Testing & Documentation (Week 2) +- Comprehensive test suite +- Documentation updates +- Final validation + +--- + +## ๐Ÿ”„ Change Management + +### Version Control +- All changes tracked via Git +- Conventional commit messages +- Atomic commits with clear descriptions + +### Quality Assurance +- Automated testing on all changes +- Manual validation of new services +- Documentation updates with each change + +--- + +## ๐Ÿ“ž Support & Maintenance + +### Troubleshooting +- Service logs accessible via `docker compose logs` +- Health check status via `docker compose ps` +- Common issues documented in README + +### Updates +- Regular image updates via Docker Hub +- Configuration changes tracked in Git +- Backward compatibility maintained where possible + +--- + +## ๐Ÿ“‹ Appendix + +### A. Port Assignments +| Service | Port | Group | +|---------|------|-------| +| Homepage | 4000 | Developer Tools | +| Atuin | 4001 | Developer Tools | +| Wakapi | 4002 | Developer Tools | +| ArchiveBox | 4003 | Developer Tools | +| Tube Archivist | 4004 | Developer Tools | +| MailHog | 4005 | Developer Tools | +| Pi-hole | 4006 | Infrastructure | +| Portainer | 4007 | Infrastructure | +| InfluxDB | 4008 | Monitoring | +| Grafana | 4009 | Monitoring | +| Draw.io | 4010 | Documentation | +| Kroki | 4011 | Documentation | + +### B. Demo Credentials +| Service | Username | Password | +|---------|----------|----------| +| Grafana | admin | demo_password | +| Portainer | admin | demo_password | + +### C. Service Dependencies +- Pi-hole: No dependencies +- Portainer: Docker Socket Proxy +- InfluxDB: No dependencies +- Grafana: InfluxDB +- Draw.io: No dependencies +- Kroki: No dependencies + +--- + +**Document End** + +*This PRD serves as the source of truth for the TSYS Developer Support Stack demo implementation and will be used for audit and quality assurance purposes.* \ No newline at end of file diff --git a/SupportStack/demo/README.md b/SupportStack/demo/README.md new file mode 100644 index 0000000..9bdb525 --- /dev/null +++ b/SupportStack/demo/README.md @@ -0,0 +1,399 @@ +
+ +# ๐Ÿš€ TSYS Developer Support Stack + +[![Docker](https://img.shields.io/badge/Docker-Compose-blue?style=for-the-badge&logo=docker)](https://www.docker.com/) +[![Homepage](https://img.shields.io/badge/Homepage-Dashboard-green?style=for-the-badge&logo=homepage)](https://gethomepage.dev/) +[![Wakapi](https://img.shields.io/badge/Wakapi-Time%20Tracking-orange?style=for-the-badge&logo=timetrack)](https://wakapi.dev/) +[![ArchiveBox](https://img.shields.io/badge/ArchiveBox-Web%20Archive-blue?style=for-the-badge&logo=archive)](https://archivebox.io/) +[![MailHog](https://img.shields.io/badge/MailHog-Email%20Testing-green?style=for-the-badge&logo=email)](https://github.com/mailhog/MailHog) + +> **A comprehensive developer support services stack with automatic service discovery** + +--- + +
+ +## ๐Ÿ“‹ Table of Contents + +- [๐ŸŒŸ Overview](#-overview) +- [๐Ÿ—๏ธ Architecture](#๏ธ-architecture) +- [โšก Quick Start](#-quick-start) +- [๐Ÿ”ง Services](#-services) +- [๐Ÿ“Š Service Access](#-service-access) +- [๐Ÿ› ๏ธ Configuration](#๏ธ-configuration) +- [๐Ÿ” Health Checks](#-health-checks) +- [๐Ÿ“ Development](#-development) +- [๐Ÿšจ Important Notes](#-important-notes) + +--- + +## ๐ŸŒŸ Overview + +The TSYS Developer Support Stack provides a comprehensive suite of developer tools designed to enhance productivity and streamline development workflows. This demo-ready stack includes: + +- **๐Ÿ  Homepage** - A beautiful, customizable dashboard with automatic service discovery +- **โฑ๏ธ Wakapi** - Self-hosted time tracking for developers +- **๐Ÿ—„๏ธ ArchiveBox** - Web archiving solution for saving web content +- **๐Ÿ“ง MailHog** - Email testing service for development +- **๐Ÿณ Docker Socket Proxy** - Secure Docker API access +- **๐Ÿ—„๏ธ PostgreSQL** - Reliable database backend (ready for additional services) +- **๐Ÿ›ก๏ธ Pi-hole** - DNS-based ad blocking and network monitoring +- **๐Ÿ“Š Portainer** - Web-based Docker container management +- **๐Ÿ“ˆ InfluxDB** - Time series database for metrics storage +- **๐Ÿ“Š Grafana** - Analytics and visualization platform +- **๐ŸŽจ Draw.io** - Web-based diagramming and flowchart application +- **๐Ÿ“ Kroki** - Service for converting text diagrams to images + +--- + +## ๐Ÿ—๏ธ Architecture + +```mermaid +graph TB + subgraph "TSYS Developer Support Stack" + A[Homepage Dashboard
Port: 4000] + C[Wakapi Time Tracking
Port: 4002] + D[ArchiveBox
Port: 4003] + F[MailHog
Port: 4005] + G[Docker Socket Proxy
Port: 2375] + H[PostgreSQL
Internal] + I[Pi-hole
Port: 4006] + J[Portainer
Port: 4007] + K[InfluxDB
Port: 4008] + L[Grafana
Port: 4009] + M[Draw.io
Port: 4010] + N[Kroki
Port: 4011] + end + + A --> C + A --> D + A --> F + A --> G + A --> I + A --> J + A --> K + A --> L + A --> M + A --> N + + subgraph "External Access" + O[Developer Browser
192.168.3.6] + end + + O --> A + O --> C + O --> D + O --> F + O --> I + O --> J + O --> K + O --> L + O --> M + O --> N +``` + +--- + +## โšก Quick Start + +### ๐ŸŽฏ Prerequisites + +- [Docker](https://www.docker.com/) 20.10+ +- [Docker Compose](https://docs.docker.com/compose/) 2.0+ +- Git + +### ๐Ÿš€ One-Command Deployment + +```bash +# Clone the repository +git clone +cd TSYSDevStack/Support + +# Start all services +docker compose -f docker-compose-simple.yml up -d + +# Wait for services to be healthy (optional) +docker compose -f docker-compose-simple.yml ps +``` + +That's it! ๐ŸŽ‰ All services will be available within 60 seconds. + +--- + +## ๐Ÿ”ง Services + +| Service | Description | Port | Health Check | Status | +|---------|-------------|------|--------------|--------| +| **Homepage** | Developer dashboard with service discovery | `4000` | โœ… HTTP Check | ๐ŸŸข Active | +| **Atuin** | Synced shell history database | `4001` | โœ… HTTP Check | ๐ŸŸข Active | +| **Wakapi** | Time tracking for developers | `4002` | โœ… HTTP Check | ๐ŸŸข Active | +| **ArchiveBox** | Web archiving solution | `4003` | โœ… HTTP Check | ๐ŸŸข Active | +| | **Tube Archivist** | YouTube media archiving | `4004` | โœ… HTTP Check | ๐ŸŸก Starting | +| | **MailHog** | Email testing service | `4005` | โœ… HTTP Check | ๐ŸŸข Active | +| | **Docker Socket Proxy** | Secure Docker API access | `2375` | โœ… HTTP Check | ๐ŸŸก Starting | +| | **PostgreSQL** | Database for Atuin | `5432` | โœ… DB Check | ๐ŸŸข Active | +| | **Elasticsearch** | Search engine for Tube Archivist | `9200` | โœ… HTTP Check | ๐ŸŸข Active | +| | **Pi-hole** | DNS management and network monitoring | `4006` | โœ… HTTP Check | ๐ŸŸข Active | +| | **Portainer** | Web-based Docker container management | `4007` | โœ… HTTP Check | ๐ŸŸข Active | +| | **InfluxDB** | Time series database for metrics | `4008` | โœ… HTTP Check | ๐ŸŸข Active | +| | **Grafana** | Analytics and visualization platform | `4009` | โœ… HTTP Check | ๐ŸŸข Active | +| | **Draw.io** | Web-based diagramming application | `4010` | โœ… HTTP Check | ๐ŸŸข Active | +| | **Kroki** | Diagrams as a service | `4011` | โœ… HTTP Check | ๐ŸŸข Active | + +--- + +## ๐Ÿ“Š Service Access + +### ๐Ÿ  Homepage Dashboard +``` +http://192.168.3.6:4000 +``` +- **Features**: Service discovery, system monitoring, quick links +- **Auto-discovery**: All services automatically detected via Docker labels +- **Widgets**: Resource monitoring, search, datetime + + + +### โฑ๏ธ Wakapi Time Tracking +``` +http://192.168.3.6:4002 +``` + +### ๐Ÿ—„๏ธ ArchiveBox Web Archiving +``` +http://192.168.3.6:4003 +``` +- **Features**: Save web pages, full-text search, tag organization +- **Demo Mode**: Open access for testing web archiving +- **Storage**: File-based archive with SQLite metadata + + + +### ๐Ÿ“ง MailHog Email Testing +``` +http://192.168.3.6:4005 +``` +- **Features**: Web interface for email testing, SMTP capture +- **SMTP Port**: 1025 for application testing +- **Demo**: Open access for email development + +### ๐Ÿ›ก๏ธ Pi-hole DNS Management +``` +http://192.168.3.6:4006/admin/index.php +``` +- **Features**: DNS-based ad blocking and network monitoring +- **Demo Credentials**: admin / demo_password +- **DNS Ports**: 53 (TCP/UDP) for DNS resolution + +### ๐Ÿ“Š Portainer Container Management +``` +http://192.168.3.6:4007 +``` +- **Features**: Web-based Docker container management +- **Demo Credentials**: admin / demo_password +- **Capabilities**: Container lifecycle, image management, volumes + +### ๐Ÿ“ˆ InfluxDB Time Series Database +``` +http://192.168.3.6:4008 +``` +- **Features**: High-performance time series data storage +- **Demo Credentials**: admin / demo_password +- **Organization**: tsysdemo, Bucket: demo_metrics + +### ๐Ÿ“Š Grafana Analytics Platform +``` +http://192.168.3.6:4009 +``` +- **Features**: Analytics and visualization for time series data +- **Demo Credentials**: admin / demo_password +- **Data Source**: Pre-configured InfluxDB connection + +### ๐ŸŽจ Draw.io Diagramming +``` +http://192.168.3.6:4010 +``` +- **Features**: Web-based diagramming and flowchart creation +- **Export Options**: PNG, SVG, PDF, and more +- **Demo Mode**: No authentication required + +### ๐Ÿ“ Kroki Diagrams as a Service +``` +http://192.168.3.6:4011 +``` +- **Features**: Convert text diagrams to images +- **Supported Formats**: PlantUML, Mermaid, GraphViz, and more +- **API**: RESTful interface for diagram generation + +--- + +## ๐Ÿ› ๏ธ Configuration + +### ๐Ÿ“ Directory Structure + +``` +Support/ +โ”œโ”€โ”€ docker-compose-simple.yml # Simplified orchestration file +โ”œโ”€โ”€ demo.env # Environment configuration file (rename from demo.env if needed) +โ”œโ”€โ”€ start-stack.sh # Startup script +โ”œโ”€โ”€ test-stack.sh # Test suite +โ”œโ”€โ”€ homepage/ +โ”‚ โ””โ”€โ”€ config/ +โ”‚ โ”œโ”€โ”€ settings.yaml # Homepage configuration +โ”‚ โ”œโ”€โ”€ docker.yaml # Docker integration +โ”‚ โ””โ”€โ”€ bookmarks.yaml # Quick links +โ””โ”€โ”€ README.md # This file +``` + +### ๐Ÿงช Environment Configuration + +The stack uses the `demo.env` file for configuration. To customize settings: + +1. Review the default settings in `demo.env` +2. Make changes as needed (especially PUID, PGID, and passwords) +3. The startup scripts will use this file directly + +### ๐Ÿ” Demo Credentials + +> โš ๏ธ **WARNING**: These are demo credentials only. Do not use in production! + +| Service | Username | Password | Database | +|---------|----------|----------|----------| +| PostgreSQL | `atuin` | `demo_password` | `atuin` | +| Pi-hole | `admin` | `demo_password` | - | +| Portainer | `admin` | `demo_password` | - | +| InfluxDB | `admin` | `demo_password` | tsysdemo/demo_metrics | +| Grafana | `admin` | `demo_password` | - | +| Wakapi | - | - | SQLite | +| ArchiveBox | - | - | SQLite | +| Draw.io | - | - | - | +| Kroki | - | - | - | + +--- + +## ๐Ÿ” Health Checks + +All services include comprehensive health checks: + +### ๐Ÿ“Š Check Service Status +```bash +# View all services and their health +docker-compose ps + +# Check logs for any service +docker-compose logs + +# Monitor health in real-time +watch docker-compose ps +``` + +### ๐Ÿฉบ Health Check Details + +| Service | Check Type | Interval | Timeout | Retries | +|---------|------------|----------|---------|---------| +| Homepage | HTTP GET `/` | 30s | 10s | 3 | +| Wakapi | HTTP GET `/` | 30s | 10s | 3 | +| ArchiveBox | HTTP GET `/` | 30s | 10s | 3 | +| MailHog | HTTP GET `/` | 30s | 10s | 3 | +| Pi-hole | HTTP GET `/admin/index.php` | 30s | 10s | 3 | +| Portainer | HTTP GET `/` | 30s | 10s | 3 | +| InfluxDB | HTTP GET `/ping` | 30s | 10s | 3 | +| Grafana | HTTP GET `/api/health` | 30s | 10s | 3 | +| Draw.io | HTTP GET `/` | 30s | 10s | 3 | +| Kroki | HTTP GET `/health` | 30s | 10s | 3 | +| Docker Socket Proxy | HTTP GET `/` | 30s | 10s | 3 | +| PostgreSQL | `pg_isready` | 30s | 10s | 3 | + +--- + +## ๐Ÿ“ Development + +### ๐Ÿ”ง Customization + +#### Adding New Services +1. Add service to `docker-compose.yml` +2. Add Homepage labels for auto-discovery +3. Update `homepage/config/docker.yaml` +4. Include health checks + +#### Modifying Homepage +Edit files in `homepage/config/`: +- `settings.yaml` - Main configuration +- `docker.yaml` - Container monitoring +- `bookmarks.yaml` - Quick links + +### ๐Ÿ”„ Common Commands + +```bash +# Start all services +docker compose -f docker-compose-simple.yml up -d + +# Stop all services +docker compose -f docker-compose-simple.yml down + +# View logs +docker compose -f docker-compose-simple.yml logs -f + +# Rebuild services +docker compose -f docker-compose-simple.yml up -d --build + +# Clean up volumes (โš ๏ธ destroys data) +docker compose -f docker-compose-simple.yml down -v +``` + +--- + +## ๐Ÿšจ Important Notes + +### โš ๏ธ Demo Environment + +- **Purpose**: Demonstration and testing only +- **Data Persistence**: None! All data is stored in ephemeral Docker volumes that are destroyed when the stack is removed +- **Security**: Hardcoded credentials, no encryption, bind mounts removed for security +- **Network**: All services exposed to localhost only + +### ๐Ÿ”’ Production Considerations + +For production deployment, consider: +- ๐Ÿ” Secure credential management +- ๐Ÿ”’ HTTPS/TLS encryption +- ๐Ÿ›ก๏ธ Network isolation +- ๐Ÿ’พ Persistent storage solutions +- ๐Ÿ“Š Monitoring and alerting +- ๐Ÿ”„ High availability +- ๐Ÿ—‚๏ธ Backup strategies for important data + +### ๐Ÿ› Troubleshooting + +| Issue | Solution | +|-------|----------| +| Services not starting | Check Docker daemon, verify ports | +| Health checks failing | Review logs, check resource availability | +| Cannot access services | Verify firewall, check port binding | +| Data not persisting | Ensure volumes are properly mounted | + +--- + +## ๐Ÿ“ž Support + +For issues and questions: + +1. Check service logs: `docker-compose logs ` +2. Verify health status: `docker-compose ps` +3. Review configuration files +4. Check port availability + +--- + +
+ +**๐ŸŽ‰ Happy Developing! ๐ŸŽ‰** + +*Built with โค๏ธ for the TSYS Development Team* + +--- + +[![GitHub](https://img.shields.io/badge/GitHub-Repository-black?style=for-the-badge&logo=github)](https://github.com/your-org/TSYSDevStack) + +
\ No newline at end of file diff --git a/SupportStack/demo/USER_GUIDE.md b/SupportStack/demo/USER_GUIDE.md new file mode 100644 index 0000000..58ca4bb --- /dev/null +++ b/SupportStack/demo/USER_GUIDE.md @@ -0,0 +1,263 @@ +# ๐Ÿš€ TSYS Developer Support Stack - User Guide + +## ๐Ÿ“– Quick Start for Developers + +Welcome to the TSYS Developer Support Stack! This guide will help you get up and running with all the developer tools in minutes. + +### ๐ŸŽฏ Access Your Dashboard + +**Main Dashboard:** http://192.168.3.6:4000 + +This is your central hub for accessing all services. The dashboard automatically discovers and displays all available services. + +--- + +## ๐Ÿ› ๏ธ Available Services + +### ๐Ÿ  Homepage Dashboard +**URL:** http://192.168.3.6:4000 + +Your personalized developer dashboard featuring: +- **Service Discovery:** Automatically detects all running services +- **Resource Monitoring:** Real-time CPU, memory, and disk usage +- **Quick Search:** Integrated search functionality +- **Customizable Layout:** Arrange widgets to your preference + +### ๐Ÿ“š Atuin - Shell History +**URL:** http://192.168.3.6:4001 + +Never lose a command again! Atuin provides: +- **Synced Shell History:** Access your command history across machines +- **Powerful Search:** Find commands instantly with advanced search +- **Statistics:** Track your shell usage patterns +- **Encryption:** Secure storage of your command history + +**Quick Setup:** +```bash +# Install Atuin client +curl --proto '=https' --tlsv1.2 -sSf https://setup.atuin.sh | sh + +# Configure to use your server +atuin register +atuin import bash +``` + +### โฑ๏ธ Wakapi - Time Tracking +**URL:** http://192.168.3.6:4002 + +Track your coding time automatically: +- **Language Detection:** Automatically detects programming languages +- **Project Tracking:** Organize time by projects +- **Detailed Reports:** View productivity trends and statistics +- **API Access:** Integrate with other tools + +**Setup with your favorite editor:** +- **VS Code:** Install the WakaTime extension +- **Vim/Neovim:** Use the wakatime-vim plugin +- **JetBrains:** Install the WakaTime plugin + +### ๐Ÿ—„๏ธ ArchiveBox - Web Archiving +**URL:** http://192.168.3.6:4003 + +Save web pages permanently: +- **Complete Archives:** Saves HTML, CSS, JS, PDFs, and media +- **Full-Text Search:** Search across all archived content +- **Tag Organization:** Organize archives with tags and folders +- **Scheduled Archiving:** Automatically archive websites on schedules + +**Quick Usage:** +```bash +# Archive a single URL +echo "https://example.com" | archivebox add + +# Archive multiple URLs from a file +cat urls.txt | archivebox add +``` + +### ๐Ÿ“บ Tube Archivist - YouTube Media Library +**URL:** http://192.168.3.6:4004 + +Your personal YouTube archive: +- **Channel/Playlist Backup:** Download entire channels or playlists +- **Metadata Management:** Rich metadata including descriptions, thumbnails +- **Subtitles:** Download and index subtitles for searchability +- **Streaming:** Stream your archived videos directly from the interface + +**Getting Started:** +1. Visit the web interface +2. Add YouTube channels or playlists you want to archive +3. Set up download schedules +4. Enjoy your personal media library! + +### ๐Ÿ“ง MailHog - Email Testing +**URL:** http://192.168.3.6:4005 +**SMTP Port:** 1025 + +Perfect for email development and testing: +- **Email Capture:** Captures all emails sent to port 1025 +- **Web Interface:** View captured emails in a clean web interface +- **HTML/Plain Text:** View both HTML and plain text versions +- **Release Function:** Release emails to real SMTP servers for testing + +**Configuration for Development:** +```python +# Python (smtplib) +import smtplib +server = smtplib.SMTP('192.168.3.6', 1025) +server.sendmail(from_addr, to_addr, message) +``` + +```javascript +// Node.js (nodemailer) +const nodemailer = require('nodemailer'); +const transporter = nodemailer.createTransporter({ + host: '192.168.3.6', + port: 1025 +}); +``` + +--- + +## ๐Ÿ”ง Advanced Configuration + +### Customizing Homepage + +Edit the configuration files in the `homepage/config/` directory: + +**`settings.yaml`** - Main dashboard settings +**`docker.yaml`** - Docker integration settings +**`bookmarks.yaml`** - Your quick links + +### Adding New Services + +1. Add your service to `docker-compose.yml` +2. Add Homepage labels for automatic discovery: +```yaml +labels: + - "homepage.group=My Services" + - "homepage.name=My Service" + - "homepage.icon=your-icon" + - "homepage.description=Service description" +``` + +### Environment Variables + +Key environment variables you might want to customize: + +```bash +# Database credentials +POSTGRES_USER=atuin +POSTGRES_PASSWORD=your_secure_password + +# Atuin settings +ATUIN_HOST=http://192.168.3.6:4001 + +# Wakapi settings +WAKAPI_PASSWORD_SALT=your_custom_salt +``` + +--- + +## ๐Ÿ” Troubleshooting + +### Service Not Accessible + +1. **Check if service is running:** + ```bash + docker ps | grep tsysdevstack-supportstack + ``` + +2. **Check service logs:** + ```bash + docker logs tsysdevstack-supportstack-service-name + ``` + +3. **Verify port accessibility:** + ```bash + curl -I http://192.168.3.6:port-number + ``` + +### High Resource Usage + +Some services are resource-intensive: +- **Elasticsearch** (Tube Archivist): ~780MB RAM, high CPU during startup +- **Tube Archivist**: ~145MB RAM, high CPU during video processing + +**Optimization Tips:** +- Restart services that are consuming excessive resources +- Consider limiting Tube Archivist concurrent downloads +- Monitor Elasticsearch heap size if needed + +### Data Persistence + +All data is stored in Docker volumes: +- PostgreSQL data: Shell history and user data +- Wakapi data: Time tracking data +- ArchiveBox data: Web archives and metadata +- Tube Archivist data: Videos and metadata + +**Backup Important Data:** +```bash +# List volumes +docker volume ls | grep tsysdevstack + +# Backup a volume +docker run --rm -v volume_name:/data -v $(pwd):/backup alpine tar czf /backup/backup.tar.gz /data +``` + +--- + +## ๐Ÿ“Š Performance Tips + +### Resource Usage Summary + +| Service | Typical RAM Usage | CPU Usage | Notes | +|---------|------------------|-----------|-------| +| Homepage | ~100MB | Minimal | Lightweight dashboard | +| Atuin | ~6MB | Minimal | Shell history service | +| Wakapi | ~30MB | Minimal | Time tracking | +| MailHog | ~7MB | Minimal | Email testing | +| PostgreSQL | ~70MB | Low | Database backend | +| ArchiveBox | ~107MB | Low | Web archiving | +| Docker Socket Proxy | ~20MB | Minimal | Service discovery | +| Elasticsearch | ~780MB | High (startup) | Search engine | +| Tube Archivist | ~145MB | High (processing) | Media processing | + +### Optimization Recommendations + +1. **For Development:** All services run comfortably on a modern laptop +2. **For Production:** Consider dedicated resources for Elasticsearch and Tube Archivist +3. **Resource Monitoring:** Use the Homepage resource widgets to monitor usage + +--- + +## ๐Ÿ”— Quick Links + +- **Main Dashboard:** http://192.168.3.6:4000 +- **Shell History:** http://192.168.3.6:4001 +- **Time Tracking:** http://192.168.3.6:4002 +- **Web Archive:** http://192.168.3.6:4003 +- **Media Library:** http://192.168.3.6:4004 +- **Email Testing:** http://192.168.3.6:4005 + +--- + +## ๐Ÿ†˜ Need Help? + +1. **Check the main README.md** for technical details +2. **Run the test suite:** `./test-stack.sh` +3. **Check service logs:** `docker compose logs service-name` +4. **Verify all services:** `docker compose ps` + +--- + +## ๐ŸŽ‰ Best Practices + +- **Use the Homepage dashboard** as your primary entry point +- **Set up Atuin on all your development machines** for synced shell history +- **Configure Wakapi with your code editor** for automatic time tracking +- **Archive important documentation** with ArchiveBox for future reference +- **Use MailHog for all development email testing** to avoid spam +- **Monitor resource usage** via the Homepage widgets + +Happy developing! ๐Ÿš€ \ No newline at end of file diff --git a/SupportStack/demo/demo.env b/SupportStack/demo/demo.env new file mode 100644 index 0000000..0cbeeb8 --- /dev/null +++ b/SupportStack/demo/demo.env @@ -0,0 +1,36 @@ +# TSYS Developer Support Stack - Environment Configuration +# Copy this file to .env and customize for your system + +# User/Group ID for container processes +# Run 'id -u' and 'id -g' on your host to get correct values +PUID=1000 +PGID=1000 + +# Network Configuration +HOST_IP=192.168.3.6 +NETWORK_SUBNET=192.168.3.0/24 + +# Demo Environment Passwords +# CHANGE THESE IN PRODUCTION! +DEMO_PASSWORD=demo_password + +# Service Ports +HOMEPAGE_PORT=4000 +ATUIN_PORT=4001 +WAKAPI_PORT=4002 +ARCHIVEBOX_PORT=4003 +MAILHOG_PORT=4005 +PIHOLE_PORT=4006 +PORTAINER_PORT=4007 +INFLUXDB_PORT=4008 +GRAFANA_PORT=4009 +DRAWIO_PORT=4010 +KROKI_PORT=4011 +DOCKER_PROXY_PORT=2375 + +# Timezone +TZ=UTC + +# Feature Flags +ENABLE_TELEMETRY=false +ENABLE_DEBUG_LOGGING=false \ No newline at end of file diff --git a/SupportStack/demo/docker-compose.yml b/SupportStack/demo/docker-compose.yml new file mode 100644 index 0000000..bedb827 --- /dev/null +++ b/SupportStack/demo/docker-compose.yml @@ -0,0 +1,545 @@ +--- +# TSYS Developer Support Stack - Docker Compose Configuration for Demo +# +# NOTE: This configuration uses only Docker named volumes for storage, not bind mounts. +# All data is ephemeral and will be lost when the stack is removed with 'docker compose down -v'. +# This is intentional for the demo environment to ensure no persistent data accumulation. +# +services: + # Homepage - Developer dashboard + homepage: + image: ghcr.io/gethomepage/homepage:latest + container_name: tsysdevstack-supportstack-homepage + ports: + - "${HOMEPAGE_PORT}:3000" + volumes: + - ./homepage/config:/app/config:ro,Z # Demo: read-only config mount for functionality + # Running as root to avoid permission issues in demo + labels: + - "homepage.group=Developer Tools" + - "homepage.name=Homepage" + - "homepage.icon=homepage" + - "homepage.href=http://192.168.3.6:4000" + - "homepage.description=Developer dashboard and service discovery" + environment: + DOCKER_HOST: > + tcp://tsysdevstack-supportstack-docker-socket-proxy:${DOCKER_PROXY_PORT} + HOMEPAGE_ALLOWED_HOSTS: "*" + HOMEPAGE_VAR_DOCKER_HOST: > + tcp://tsysdevstack-supportstack-docker-socket-proxy:${DOCKER_PROXY_PORT} + # Use docker.yaml with explicit include/exclude filtering + depends_on: + - tsysdevstack-supportstack-docker-socket-proxy + restart: unless-stopped + + # Atuin - Shell history + atuin: + image: ghcr.io/atuinsh/atuin:latest + container_name: tsysdevstack-supportstack-atuin + ports: + - "${ATUIN_PORT}:8888" + labels: + - "homepage.group=Developer Tools" + - "homepage.name=Atuin" + - "homepage.icon=atuin" + - "homepage.href=http://192.168.3.6:4001" + - "homepage.description=Synced shell history database" + environment: + ATUIN_HOST: "0.0.0.0" + ATUIN_PORT: "8888" + ATUIN_OPEN_REGISTRATION: "true" + ATUIN_DB_URI: > + postgres://atuin:demo_password@tsysdevstack-supportstack-postgres:5432/atuin + RUST_LOG: "debug,atuin_server=debug,sqlx=debug" + command: server start + # No persistent volumes for demo - config is ephemeral + user: "${PUID}:${PGID}" + depends_on: + tsysdevstack-supportstack-postgres: + condition: service_healthy + restart: unless-stopped + healthcheck: + test: + - CMD-SHELL + - "wget --no-verbose --tries=1 --spider http://localhost:8080/ || exit 1" + interval: 30s + timeout: 10s + retries: 3 + start_period: 40s + deploy: + resources: + limits: + memory: 256M + cpus: '0.5' + + # Wakapi - Time tracking + wakapi: + image: ghcr.io/muety/wakapi:latest + container_name: tsysdevstack-supportstack-wakapi + ports: + - "${WAKAPI_PORT}:3000" + labels: + - "homepage.group=Developer Tools" + - "homepage.name=Wakapi" + - "homepage.icon=wakapi" + - "homepage.href=http://192.168.3.6:4002" + - "homepage.description=Self-hosted time tracking" + environment: + - WAKAPI_PASSWORD_SALT=demo_password + # No persistent volumes for demo - data is ephemeral + restart: unless-stopped + healthcheck: + test: + - CMD-SHELL + - "wget --no-verbose --tries=1 --spider http://localhost:8086/ping || exit 1" + interval: 30s + timeout: 10s + retries: 3 + start_period: 40s + deploy: + resources: + limits: + memory: 256M + cpus: '0.5' + + # MailHog - Email testing + mailhog: + image: mailhog/mailhog:latest + container_name: tsysdevstack-supportstack-mailhog + ports: + - "1025:1025" + - "${MAILHOG_PORT}:8025" + labels: + - "homepage.group=Developer Tools" + - "homepage.name=MailHog" + - "homepage.icon=mailhog" + - "homepage.href=http://192.168.3.6:4005" + - "homepage.description=Email testing service" + restart: unless-stopped + healthcheck: + test: + - CMD-SHELL + - "echo > /dev/tcp/localhost:8025" + interval: 30s + timeout: 10s + retries: 3 + start_period: 40s + deploy: + resources: + limits: + memory: 128M + cpus: '0.25' + + # Pi-hole - DNS management + pihole: + image: pihole/pihole:latest + container_name: tsysdevstack-supportstack-pihole + # Note: Pi-hole requires root for DNS capabilities and file permissions + ports: + - "${PIHOLE_PORT}:80" + - "53:53/tcp" + - "53:53/udp" + - "67:67/udp" + labels: + - "homepage.group=Infrastructure" + - "homepage.name=Pi-hole" + - "homepage.icon=pihole" + - "homepage.href=http://192.168.3.6:4006" + - "homepage.description=DNS-based ad blocking and network monitoring" + environment: + - TZ=UTC + - WEBPASSWORD=${DEMO_PASSWORD} + - PIHOLE_DNS_=1.1.1.1;1.0.0.1 + - DNSMASQ_LISTENING=all + - WEBTHEME=default-dark + # No persistent volumes for demo - configuration is ephemeral + restart: unless-stopped + healthcheck: + test: + - CMD-SHELL + - "echo > /dev/tcp/localhost/80" + interval: 30s + timeout: 10s + retries: 3 + start_period: 60s + deploy: + resources: + limits: + memory: 512M + cpus: '0.75' + + # Portainer - Container management + portainer: + image: portainer/portainer-ce:latest + container_name: tsysdevstack-supportstack-portainer + ports: + - "${PORTAINER_PORT}:9000" + labels: + - "homepage.group=Infrastructure" + - "homepage.name=Portainer" + - "homepage.icon=portainer" + - "homepage.href=http://192.168.3.6:4007" + - "homepage.description=Container management interface" + # No persistent volumes for demo - data is ephemeral + # Note: Portainer needs root for data directory permissions + environment: + DOCKER_HOST: > + tcp://tsysdevstack-supportstack-docker-socket-proxy:${DOCKER_PROXY_PORT} + restart: unless-stopped + healthcheck: + test: + - CMD-SHELL + - "echo > /dev/tcp/localhost/9000" + interval: 30s + timeout: 10s + retries: 3 + start_period: 60s + deploy: + resources: + limits: + memory: 256M + cpus: '0.5' + + # ArchiveBox - Web archiving + archivebox: + image: archivebox/archivebox:latest + container_name: tsysdevstack-supportstack-archivebox + ports: + - "${ARCHIVEBOX_PORT}:8000" + labels: + - "homepage.group=Developer Tools" + - "homepage.name=ArchiveBox" + - "homepage.icon=archivebox" + - "homepage.href=http://192.168.3.6:4003" + - "homepage.description=Self-hosted web archiving" + environment: + - ALLOWED_HOSTS=* + - MEDIA_MAX_SIZE=750m + # No persistent volumes for demo - data is ephemeral + restart: unless-stopped + healthcheck: + test: + - CMD-SHELL + - "wget --no-verbose --tries=1 --spider http://localhost:3000/api/health || exit 1" + interval: 30s + timeout: 10s + retries: 3 + start_period: 40s + deploy: + resources: + limits: + memory: 256M + cpus: '0.5' + + # InfluxDB - Time series database + influxdb: + image: influxdb:2.7-alpine + container_name: tsysdevstack-supportstack-influxdb + ports: + - "${INFLUXDB_PORT}:8086" + labels: + - "homepage.group=Monitoring" + - "homepage.name=InfluxDB" + - "homepage.icon=influxdb" + - "homepage.href=http://192.168.3.6:4008" + - "homepage.description=Time series database for metrics storage" + environment: + - DOCKER_INFLUXDB_INIT_MODE=setup + - DOCKER_INFLUXDB_INIT_USERNAME=admin + - DOCKER_INFLUXDB_INIT_PASSWORD=${DEMO_PASSWORD} + - DOCKER_INFLUXDB_INIT_ORG=tsysdev + - DOCKER_INFLUXDB_INIT_BUCKET=metrics + # No persistent volumes for demo - data is ephemeral + user: "${PUID}:${PGID}" + restart: unless-stopped + healthcheck: + test: + - CMD-SHELL + - "wget --no-verbose --tries=1 --spider http://localhost:8086/ping || exit 1" + interval: 30s + timeout: 10s + retries: 3 + start_period: 40s + deploy: + resources: + limits: + memory: 256M + cpus: '0.5' + + # Grafana - Analytics visualization + grafana: + image: grafana/grafana:latest + container_name: tsysdevstack-supportstack-grafana + ports: + - "${GRAFANA_PORT}:3000" + labels: + - "homepage.group=Monitoring" + - "homepage.name=Grafana" + - "homepage.icon=grafana" + - "homepage.href=http://192.168.3.6:4009" + - "homepage.description=Analytics and visualization platform" + environment: + - GF_SECURITY_ADMIN_USER=admin + - GF_SECURITY_ADMIN_PASSWORD=${DEMO_PASSWORD} + - GF_INSTALL_PLUGINS=grafana-clock-panel,grafana-simple-json-datasource + - GF_SERVER_DOMAIN=192.168.3.6:4009 + - GF_SERVER_ROOT_URL=http://192.168.3.6:4009 + # No persistent volumes for demo - data is ephemeral + user: "${PUID}:${PGID}" + depends_on: + - influxdb + restart: unless-stopped + healthcheck: + test: + - CMD-SHELL + - "echo > /dev/tcp/localhost/3000" + interval: 30s + timeout: 10s + retries: 3 + start_period: 40s + deploy: + resources: + limits: + memory: 512M + cpus: '0.75' + + # Draw.io - Diagramming + drawio: + image: jgraph/drawio:latest + container_name: tsysdevstack-supportstack-drawio + user: "${PUID}:${PGID}" + ports: + - "${DRAWIO_PORT}:8080" + labels: + - "homepage.group=Documentation" + - "homepage.name=Draw.io" + - "homepage.icon=diagram" + - "homepage.href=http://192.168.3.6:4010" + - "homepage.description=Web-based diagramming tool" + restart: unless-stopped + healthcheck: + test: + - CMD-SHELL + - "echo > /dev/tcp/localhost/3000" + interval: 30s + timeout: 10s + retries: 3 + start_period: 40s + deploy: + resources: + limits: + memory: 256M + cpus: '0.5' + + # Tube Archivist - YouTube media archiving + tube-archivist: + image: bbilly1/tubearchivist:latest + container_name: tsysdevstack-supportstack-tube-archivist + ports: + - "4004:8000" + labels: + - "homepage.group=Developer Tools" + - "homepage.name=Tube Archivist" + - "homepage.icon=youtube" + - "homepage.href=http://192.168.3.6:4004" + - "homepage.description=Self-hosted YouTube media archiving" + environment: + - TA_HOST=192.168.3.6:4004 + - TA_USERNAME=demo_user + - TA_PASSWORD=demo_password + - ES_URL=http://elastic:demo_password@tsysdevstack-supportstack-elasticsearch:9200 + - ELASTIC_PASSWORD=demo_password + - REDIS_CON=redis://tsysdevstack-supportstack-redis:6379 + - TZ=UTC + depends_on: + tsysdevstack-supportstack-elasticsearch: + condition: service_healthy + tsysdevstack-supportstack-redis: + condition: service_healthy + # No persistent volumes for demo - cache and media are ephemeral + restart: unless-stopped + healthcheck: + test: + - CMD-SHELL + - "wget --no-verbose --tries=1 --spider http://localhost:8000/ || exit 1" + interval: 30s + timeout: 10s + retries: 3 + start_period: 60s + deploy: + resources: + limits: + memory: 512M + cpus: '1.0' + + # Kroki - Diagrams as code + kroki: + image: yuzutech/kroki:latest + container_name: tsysdevstack-supportstack-kroki + user: "${PUID}:${PGID}" + ports: + - "${KROKI_PORT}:8000" + labels: + - "homepage.group=Documentation" + - "homepage.name=Kroki" + - "homepage.icon=diagram" + - "homepage.href=http://192.168.3.6:4011" + - "homepage.description=Service for converting text diagrams to images" + environment: + - KROKI_SAFE_MODE=0 + - KROKI_PLANTUML_ALLOW_LIST=* + - KROKI_MERMAID_ALLOW_LIST=* + restart: unless-stopped + healthcheck: + test: + - CMD-SHELL + - "wget --no-verbose --tries=1 --spider http://localhost:8000/health || exit 1" + interval: 30s + timeout: 10s + retries: 3 + start_period: 40s + deploy: + resources: + limits: + memory: 256M + cpus: '0.5' + + # Docker Socket Proxy - Secure Docker API access + tsysdevstack-supportstack-docker-socket-proxy: + image: tecnativa/docker-socket-proxy:latest + container_name: tsysdevstack-supportstack-docker-socket-proxy + ports: + - "${DOCKER_PROXY_PORT}:2375" + volumes: + - /var/run/docker.sock:/var/run/docker.sock:ro + environment: + - CONTAINERS=1 + - SERVICES=1 + - TASKS=1 + - NETWORKS=1 + - NODES=1 + - IMAGES=1 + - VOLUMES=1 + - EXEC=0 + - SECRETS=0 + - CONFIGS=0 + - PLUGINS=0 + - SYSTEM=0 + - INFO=1 + - VERSION=1 + - EVENTS=0 + - POST=0 + - DELETE=0 + - PUT=0 + restart: unless-stopped + healthcheck: + test: + - CMD-SHELL + - "wget --no-verbose --tries=1 --spider http://localhost:2375/version || exit 1" + interval: 30s + timeout: 10s + retries: 3 + start_period: 60s + deploy: + resources: + limits: + memory: 128M + cpus: '0.25' + + # PostgreSQL - Database for Atuin + tsysdevstack-supportstack-postgres: + image: postgres:15-alpine + container_name: tsysdevstack-supportstack-postgres + labels: + - "homepage.group=Infrastructure" + - "homepage.name=PostgreSQL" + - "homepage.icon=postgresql" + - "homepage.description=PostgreSQL database server" + environment: + - POSTGRES_DB=atuin + - POSTGRES_USER=atuin + - POSTGRES_PASSWORD=${DEMO_PASSWORD} + # No persistent volumes for demo - data is ephemeral + restart: unless-stopped + healthcheck: + test: + - CMD + - pg_isready + - -U + - atuin + interval: 30s + timeout: 10s + retries: 3 + start_period: 40s + deploy: + resources: + limits: + memory: 256M + cpus: '0.5' + + # Elasticsearch - Search engine + tsysdevstack-supportstack-elasticsearch: + image: docker.elastic.co/elasticsearch/elasticsearch:8.11.1 + container_name: tsysdevstack-supportstack-elasticsearch + labels: + - "homepage.group=Infrastructure" + - "homepage.name=Elasticsearch" + - "homepage.icon=elasticsearch" + - "homepage.description=Search and analytics engine" + environment: + - "discovery.type=single-node" + - "ES_JAVA_OPTS=-Xms512m -Xmx512m" + - "xpack.security.enabled=true" + - "ELASTIC_PASSWORD=${DEMO_PASSWORD}" + - "path.repo=/usr/share/elasticsearch/data/snapshot" + # No persistent volumes for demo - data is ephemeral + user: "${PUID}:${PGID}" + restart: unless-stopped + healthcheck: + test: + - CMD-SHELL + - > + curl -f -u elastic:demo_password + http://localhost:9200/_cluster/health?wait_for_status=yellow&timeout=30s || exit 1 + interval: 30s + timeout: 10s + retries: 5 + start_period: 120s + deploy: + resources: + limits: + memory: 1G + cpus: '1.0' + + # Redis for Tube Archivist + tsysdevstack-supportstack-redis: + image: redis:7-alpine + container_name: tsysdevstack-supportstack-redis + user: "${PUID}:${PGID}" + labels: + - "homepage.group=Infrastructure" + - "homepage.name=Redis" + - "homepage.icon=redis" + - "homepage.description=In-memory data structure store" + restart: unless-stopped + healthcheck: + test: + - CMD + - redis-cli + - ping + interval: 30s + timeout: 10s + retries: 3 + start_period: 40s + deploy: + resources: + limits: + memory: 128M + cpus: '0.25' + +# No persistent volumes - demo is 100% ephemeral +# Only Docker socket bind mount is used for functionality + +networks: + default: + name: tsysdevstack_supportstack diff --git a/SupportStack/demo/homepage-services.yaml b/SupportStack/demo/homepage-services.yaml new file mode 100644 index 0000000..eb1fb52 --- /dev/null +++ b/SupportStack/demo/homepage-services.yaml @@ -0,0 +1,3 @@ +--- +# Services will be automatically discovered from Docker labels +# This file can remain empty for demo purposes \ No newline at end of file diff --git a/SupportStack/demo/homepage-settings.yaml b/SupportStack/demo/homepage-settings.yaml new file mode 100644 index 0000000..e8bdf39 --- /dev/null +++ b/SupportStack/demo/homepage-settings.yaml @@ -0,0 +1,22 @@ +--- +title: TSYS Developer Stack +theme: dark +color: slate + +quicklinks: + - name: Documentation + icon: mdi-book-open-variant + url: https://github.com/gethomepage/homepage + - name: GitHub Repository + icon: mdi-github + url: https://github.com/your-org/TSYSDevStack + +widgets: + - search: + provider: duckduckgo + target: _blank + - datetime: + text_size: xl + format: + dateStyle: long + timeStyle: short \ No newline at end of file