# ๐Ÿš€ TSYS Developer Support Stack - Demo
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Docker](https://img.shields.io/badge/Docker-Ready-blue.svg)](https://www.docker.com/) [![FOSS](https://img.shields.io/badge/FOSS-Only-green.svg)](https://www.fsf.org/) [![Demo](https://img.shields.io/badge/Mode-Demo-orange.svg)](#) *A comprehensive, demo-ready developer support services stack that enhances productivity and quality of life for the TSYS engineering team.*
--- ## ๐Ÿ“– Table of Contents - [๐Ÿš€ Quick Start](#-quick-start) - [๐Ÿ“‹ Services Overview](#-services-overview) - [๐Ÿ”ง Technical Configuration](#-technical-configuration) - [๐Ÿ” Demo Credentials](#-demo-credentials) - [๐Ÿ“Š Service Dependencies](#-service-dependencies) - [๐Ÿงช Testing](#-testing) - [๐Ÿ” Troubleshooting](#-troubleshooting) - [๐Ÿ“ Data Management](#-data-management) - [๐Ÿ”„ Updates & Maintenance](#-updates--maintenance) - [๐Ÿ“š Documentation](#-documentation) - [๐Ÿšจ Security Notes](#-security-notes) - [๐Ÿ“ž Support](#-support) --- ## ๐Ÿš€ Quick Start
```bash # ๐ŸŽฏ Demo deployment with dynamic user detection ./demo-stack.sh deploy # ๐Ÿ”ง Comprehensive testing and validation ./demo-test.sh full ```
๐ŸŽ‰ **Access all services via the Homepage dashboard at** **[http://localhost:${HOMEPAGE_PORT}](http://localhost:${HOMEPAGE_PORT})** > โš ๏ธ **Demo Configuration Only** - This stack is designed for demonstration purposes with no data persistence. --- ## ๐Ÿ”ง Dynamic Deployment Architecture ### ๐Ÿ“‹ Environment Variables All configuration is managed through `demo.env` and dynamic detection: | Variable | Description | Default | |-----------|-------------|----------| | **COMPOSE_PROJECT_NAME** | Consistent naming prefix | `tsysdevstack-supportstack-demo` | | **UID** | Current user ID | Auto-detected | | **GID** | Current group ID | Auto-detected | | **DOCKER_GID** | Docker group ID | Auto-detected | | **COMPOSE_NETWORK_NAME** | Docker network name | `tsysdevstack-supportstack-demo-network` | ### ๐ŸŽฏ Deployment Scripts | Script | Purpose | Usage | |---------|---------|--------| | **demo-stack.sh** | Dynamic deployment with user detection | `./demo-stack.sh [deploy|stop|restart]` | | **demo-test.sh** | Comprehensive QA and validation | `./demo-test.sh [full|security|permissions]` | | **demo.env** | All environment variables | Source of configuration | --- ## ๐Ÿ“‹ Services Overview ### ๐Ÿ› ๏ธ Developer Tools | Service | Port | Description | ๐ŸŒ Access | |---------|------|-------------|-----------| | **Homepage** | 4000 | Central dashboard for service discovery | [Open](http://192.168.3.6:4000) | | **Atomic Tracker** | 4012 | Habit tracking and personal dashboard | [Open](http://192.168.3.6:4012) | | **Wakapi** | 4015 | Open-source WakaTime alternative for time tracking | [Open](http://192.168.3.6:4015) | | **MailHog** | 4017 | Web and API based SMTP testing tool | [Open](http://192.168.3.6:4017) | ### ๐Ÿ“š Archival & Content Management | Service | Port | Description | ๐ŸŒ Access | |---------|------|-------------|-----------| | **ArchiveBox** | 4013 | Web archiving solution | [Open](http://192.168.3.6:4013) | | **Tube Archivist** | 4014 | YouTube video archiving | [Open](http://192.168.3.6:4014) | ### ๐Ÿ—๏ธ Infrastructure Services | Service | Port | Description | ๐ŸŒ Access | |---------|------|-------------|-----------| | **Pi-hole** | 4006 | DNS-based ad blocking and monitoring | [Open](http://192.168.3.6:4006) | | **Portainer** | 4007 | Web-based container management | [Open](http://192.168.3.6:4007) | ### ๐Ÿ“Š Monitoring & Observability | Service | Port | Description | ๐ŸŒ Access | |---------|------|-------------|-----------| | **InfluxDB** | 4008 | Time series database for metrics | [Open](http://192.168.3.6:4008) | | **Grafana** | 4009 | Analytics and visualization platform | [Open](http://192.168.3.6:4009) | ### ๐Ÿ“š Documentation & Diagramming | Service | Port | Description | ๐ŸŒ Access | |---------|------|-------------|-----------| | **Draw.io** | 4010 | Web-based diagramming application | [Open](http://192.168.3.6:4010) | | **Kroki** | 4011 | Diagrams as a service | [Open](http://192.168.3.6:4011) | --- ## ๐Ÿ”ง Technical Configuration ### ๐Ÿณ Docker Integration
```yaml # Demo service template (docker-compose.yml.template) services: service-name: image: official/image:tag user: "${UID}:${GID}" container_name: "${COMPOSE_PROJECT_NAME}-service-name" restart: unless-stopped networks: - ${COMPOSE_NETWORK_NAME} volumes: - "${COMPOSE_PROJECT_NAME}_service_data:/path" environment: - PUID=${UID} - PGID=${GID} labels: homepage.group: "Group Name" homepage.name: "Display Name" homepage.icon: "icon-name" homepage.href: "http://localhost:${SERVICE_PORT}" homepage.description: "Brief description" ```
### โš™๏ธ Dynamic Configuration | Setting | Variable | Description | |---------|-----------|-------------| | **Service Naming** | `${COMPOSE_PROJECT_NAME}-{service}` | Dynamic container naming | | **Network** | `${COMPOSE_NETWORK_NAME}` | Dedicated Docker network | | **User Mapping** | `${UID}:${GID}` | Dynamic user detection | | **Docker Group** | `${DOCKER_GID}` | Docker socket access | | **Volume Naming** | `${COMPOSE_PROJECT_NAME}_{service}_data` | Consistent volumes | | **Restart Policy** | `unless-stopped` | Automatic recovery | ### ๐Ÿ” Health Check Endpoints | Service | Health Check Path | Status | |---------|-------------------|--------| | **Pi-hole** (DNS Management) | `HTTP GET /` | โœ… Active | | **Portainer** (Container Management) | `HTTP GET /` | โœ… Active | | **InfluxDB** (Time Series Database) | `HTTP GET /ping` | โœ… Active | | **Grafana** (Visualization Platform) | `HTTP GET /api/health` | โœ… Active | | **Draw.io** (Diagramming Server) | `HTTP GET /` | โœ… Active | | **Kroki** (Diagrams as a Service) | `HTTP GET /health` | โœ… Active | ### ๐Ÿท๏ธ Service Discovery Labels All services include Homepage labels for auto-discovery: ```yaml labels: homepage.group: "Service category" homepage.name: "Display name" homepage.icon: "Appropriate icon" homepage.href: "Full URL" homepage.description: "Brief service description" ``` --- ## ๐Ÿ” Demo Credentials > โš ๏ธ **Demo Configuration Only** - Reset all credentials before production use | Service | Username | Password | ๐Ÿ”— Access | |---------|----------|----------|-----------| | **Grafana** | `admin` | `demo_password` | [Login](http://localhost:4009) | | **Portainer** | `admin` | `demo_password` | [Login](http://localhost:4007) | --- ## ๐Ÿ“Š Service Dependencies ```mermaid graph TD A[Homepage Dashboard] --> B[All Services] C[Container Management] --> D[Container Socket Proxy] E[Visualization Platform] --> F[Time Series Database] G[All Other Services] --> H[No Dependencies] style A fill:#e1f5fe style C fill:#f3e5f5 style E fill:#e8f5e8 style G fill:#fff3e0 ``` | Service | Dependencies | Status | |---------|--------------|--------| | **Container Management** (Portainer) | Container Socket Proxy | ๐Ÿ”— Required | | **Visualization Platform** (Grafana) | Time Series Database (InfluxDB) | ๐Ÿ”— Required | | **All Other Services** | None | โœ… Standalone | --- ## ๐Ÿงช Testing & Validation ### ๐Ÿค– Automated Demo Testing
```bash # ๐ŸŽฏ Full deployment and validation ./demo-stack.sh deploy && ./demo-test.sh full # ๐Ÿ” Security compliance validation ./demo-test.sh security # ๐Ÿ‘ค File ownership validation ./demo-test.sh permissions # ๐ŸŒ Network isolation validation ./demo-test.sh network ```
### โœ… Manual Validation Commands ```bash # ๐Ÿ“Š Check service status with dynamic naming docker compose ps # ๐Ÿ“‹ View service logs docker compose logs {service-name} # ๐ŸŒ Test individual endpoints with variables curl -f http://localhost:${HOMEPAGE_PORT}/ curl -f http://localhost:${INFLUXDB_PORT}/ping curl -f http://localhost:${GRAFANA_PORT}/api/health # ๐Ÿ” Validate user permissions ls -la /var/lib/docker/volumes/${COMPOSE_PROJECT_NAME}_*/ ``` --- ## ๐Ÿ” Troubleshooting ### ๐Ÿšจ Common Issues #### Services not starting ```bash # ๐Ÿ”ง Check Docker daemon docker info # ๐ŸŒ Check network docker network ls | grep tsysdevstack_supportstack # ๐Ÿ”„ Recreate network docker network create tsysdevstack_supportstack ``` #### Port conflicts ```bash # ๐Ÿ” Check port usage netstat -tulpn | grep :400 # ๐Ÿ—‘๏ธ Kill conflicting processes sudo fuser -k {port}/tcp ``` #### Health check failures ```bash # ๐Ÿ” Check individual service health docker compose exec {service} curl -f http://localhost:{internal-port}/health # ๐Ÿ”„ Restart specific service docker compose restart {service} ``` ### ๐Ÿ› ๏ธ Service-Specific Issues | Issue | Service | Solution | |-------|---------|----------| | **DNS issues** | Pi-hole | Ensure Docker DNS settings allow custom DNS servers
Check that port 53 is available on the host | | **Database connection** | Grafana-InfluxDB | Verify both services are on the same network
Check database connectivity: `curl http://localhost:4008/ping` | | **Container access** | Portainer | Ensure container socket is properly mounted
Check Container Socket Proxy service if used | --- ## ๐Ÿ“ Data Management ### ๐ŸŽญ Demo Mode Configuration > ๐Ÿ’ก **No persistent data storage** - All data resets on container restart | Feature | Configuration | |---------|---------------| | **Data Persistence** | โŒ Disabled (demo mode) | | **Storage Type** | Docker volumes (temporary) | | **Data Reset** | โœ… Automatic on restart | | **Credentials** | ๐Ÿ”’ Hardcoded demo only | ### ๐Ÿ—‚๏ธ Volume Management ```bash # ๐Ÿ“‹ List volumes docker volume ls | grep tsysdevstack # ๐Ÿ—‘๏ธ Clean up all data docker compose down -v ``` --- ## ๐Ÿ”„ Updates & Maintenance ### ๐Ÿ“ฆ Image Updates
```bash # ๐Ÿ”„ Pull latest images docker compose pull # ๐Ÿš€ Recreate with new images docker compose up -d --force-recreate ```
### โš™๏ธ Configuration Changes 1. **Edit** `docker-compose.yml` 2. **Apply** changes: `docker compose up -d` 3. **Verify** with `docker compose ps` 4. **Test** functionality --- ## ๐Ÿ“š Documentation | Document | Purpose | Link | |----------|---------|------| | **๐Ÿ“‹ Product Requirements** | Business requirements and specifications | [PRD.md](PRD.md) | | **๐Ÿค– Development Guidelines** | Development principles and standards | [AGENTS.md](AGENTS.md) | | **๐ŸŒ Service Documentation** | Individual service guides | Service web interfaces | --- ## ๐Ÿšจ Security Notes > โš ๏ธ **Demo Configuration Only - Production Use Prohibited** ### ๐Ÿ”’ Demo Security Model - ๐Ÿ”“ **Demo Credentials**: Hardcoded for demonstration only - ๐Ÿšซ **No Hardening**: No encryption or security features - ๐ŸŒ **Network Isolation**: Do not expose to external networks - ๐Ÿ”„ **Ephemeral Data**: All data resets on container restart - ๐Ÿ“ก **Docker Socket Proxy**: Mandatory for all container operations ### ๐Ÿ›ก๏ธ Security Requirements - **Dynamic User Detection**: Prevents root file ownership issues - **Docker Group Access**: Required for socket proxy functionality - **Volume-First Storage**: Docker volumes preferred over bind mounts - **Read-Only Host Access**: Minimal host filesystem interaction - **Network Segregation**: Services isolated in demo network ### โš ๏ธ Production Migration Warning - Reset all credentials before production deployment - Implement persistent data storage - Add encryption and security hardening - Configure proper backup and recovery - Set up monitoring and alerting --- ## ๐Ÿ“ž Support ### ๐Ÿ†˜ Getting Help 1. **๐Ÿ“– Check** troubleshooting section above 2. **๐Ÿ“‹ Review** service logs: `docker compose logs` 3. **๐Ÿ“š Consult** individual service documentation 4. **๐Ÿ” Check** health status: `docker compose ps` ### ๐Ÿ› Issue Reporting When reporting issues, please include: - ๐Ÿ“ Full error messages - ๐Ÿ’ป System information - ๐Ÿ”„ Reproduction steps - โš™๏ธ Configuration snippets - ๐ŸŽญ Demo vs production context ---
**๐ŸŽ‰ Happy Developing!** *Last updated: 2025-11-13*