From 6abcf37203895b56407682814f46116917bb63bc Mon Sep 17 00:00:00 2001 From: Anders Lehmann Pier Date: Sun, 22 Jun 2025 13:36:27 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9A=20Add=20documentation=20and=20Dock?= =?UTF-8?q?er=20configuration=20files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .dockerignore | 113 ++++++++++++++++++++++++++++++++++++ .gitignore | 35 +++++++++++ README.md | 158 +++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 304 insertions(+), 2 deletions(-) create mode 100644 .dockerignore create mode 100644 .gitignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..2cfc9f1 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,113 @@ +# Dependencies +node_modules +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage +.grunt + +# Bower dependency directory +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env +.env.local +.env.development.local +.env.test.local +.env.production.local + +# parcel-bundler cache +.cache +.parcel-cache + +# Next.js build output +.next +out + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +public + +# Storybook build outputs +.out +.storybook-out + +# Temporary folders +tmp/ +temp/ + +# Logs +logs +*.log + +# Editor directories and files +.vscode/ +.idea/ +*.swp +*.swo +*~ + +# OS generated files +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db + +# Git +.git +.gitignore +README.md \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5bbb991 --- /dev/null +++ b/.gitignore @@ -0,0 +1,35 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# local env files +.env*.local + +# vercel +.vercel + +# typescript +*.tsbuildinfo +next-env.d.ts \ No newline at end of file diff --git a/README.md b/README.md index a0ba82b..af8208f 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,156 @@ -# dokploy-dashboard-pro -Modern Docker container management dashboard for Dokploy - with real-time monitoring and container controls +# ๐Ÿš€ Dokploy Dashboard Pro + +Modern Docker container management dashboard that supplements your existing Dokploy setup with real-time monitoring and container controls. + +![Dokploy Dashboard](https://img.shields.io/badge/Dokploy-Dashboard-purple?style=for-the-badge&logo=docker) +![Docker](https://img.shields.io/badge/Docker-Ready-blue?style=for-the-badge&logo=docker) +![Next.js](https://img.shields.io/badge/Next.js-14-black?style=for-the-badge&logo=next.js) + +## โœจ Features + +- ๐ŸŽฎ **Real Container Controls** - Start, stop, restart containers with safety checks +- ๐Ÿ“Š **Live Monitoring** - Real-time CPU, memory, and network metrics +- ๐ŸŒ **Traefik Integration** - Automatic domain detection from routing rules +- ๐Ÿ” **Smart Detection** - Identifies Dokploy-managed vs user containers +- ๐ŸŽจ **Modern UI** - Beautiful glassmorphism design with smooth animations +- ๐Ÿ”’ **Safety First** - Prevents stopping critical infrastructure (Dokploy/Traefik) +- ๐Ÿ“ฑ **Responsive** - Works perfectly on desktop and mobile + +## ๐Ÿ—๏ธ Architecture + +This dashboard **supplements** your existing Dokploy setup: +- Reads containers via Docker API +- Identifies services through Traefik labels +- Provides additional monitoring and control +- Does NOT replace Dokploy - works alongside it! + +## ๐Ÿš€ Quick Deploy with Dokploy + +### Option 1: Deploy via Dokploy UI (Recommended) + +1. **Create New Project** in your Dokploy dashboard +2. **Add Service** โ†’ **Docker Compose** +3. **Repository**: `https://github.com/AndersPier/dokploy-dashboard-pro.git` +4. **Update domains** in docker-compose.yml: + ```yaml + labels: + - "traefik.http.routers.dashboard.rule=Host(`dashboard.yourdomain.com`)" + ``` +5. **Deploy!** + +### Option 2: Manual Docker Compose + +```bash +# Clone the repository +git clone https://github.com/AndersPier/dokploy-dashboard-pro.git +cd dokploy-dashboard-pro + +# Update your domain in docker-compose.yml +# Then deploy +docker-compose up -d +``` + +## ๐Ÿ”ง Configuration + +### Update Domain +Edit `docker-compose.yml` and change: +```yaml +labels: + - "traefik.http.routers.dashboard.rule=Host(`dashboard.yourdomain.com`)" +``` + +Replace `dashboard.yourdomain.com` with your actual domain. + +### Environment Variables + +| Variable | Default | Description | +|----------|---------|-------------| +| `NODE_ENV` | `production` | Runtime environment | +| `PORT` | `3000` | Application port | + +## ๐ŸŽฏ Container Detection + +The dashboard automatically detects and categorizes containers: + +- **๐ŸŸฃ Platform** (Dokploy) - Core platform services +- **๐ŸŸ  Proxy** (Traefik) - Reverse proxy and load balancer +- **๐ŸŸข Database** (PostgreSQL, Redis, etc.) - Data services +- **โšช Application** - Your deployed apps + +## ๐Ÿ›ก๏ธ Safety Features + +- **Critical Service Protection**: Prevents stopping Dokploy/Traefik +- **Confirmation Dialogs**: Confirms destructive actions +- **Loading States**: Visual feedback during operations +- **Error Handling**: Clear error messages and recovery + +## ๐Ÿ“Š Monitoring + +- **Real-time Stats**: CPU, memory usage per container +- **Health Status**: Visual indicators for container health +- **Uptime Tracking**: Shows how long containers have been running +- **Domain Mapping**: Lists all exposed domains via Traefik + +## ๐Ÿ”— Integration + +### Traefik Labels +Automatically reads domains from Traefik labels: +```yaml +labels: + - "traefik.http.routers.myapp.rule=Host(`app.example.com`)" +``` + +### Dokploy Labels +Recognizes Dokploy metadata: +```yaml +labels: + - "dokploy.name=My Application" + - "dokploy.environment=production" + - "dokploy.project=main-site" +``` + +## ๐Ÿš€ Next Features + +- ๐Ÿ“‹ **Live Log Streaming** - Real-time container logs +- ๐Ÿ“ˆ **Resource Monitoring** - Historical metrics and charts +- ๐Ÿ”” **Alerts & Notifications** - Custom alert rules +- ๐Ÿ“ฆ **Deployment Pipeline** - Visual deployment tracking + +## ๐Ÿงช Development + +```bash +# Install dependencies +npm install + +# Start development server +npm run dev + +# Build for production +npm run build +``` + +## ๐Ÿ“‹ Requirements + +- Docker with API access +- Existing Dokploy setup +- Node.js 18+ (for development) + +## ๐Ÿค Contributing + +1. Fork the repository +2. Create a feature branch +3. Make your changes +4. Submit a pull request + +## ๐Ÿ“„ License + +MIT License - feel free to use this in your projects! + +## ๐Ÿ†˜ Support + +- **Issues**: [GitHub Issues](https://github.com/AndersPier/dokploy-dashboard-pro/issues) +- **Discussions**: [GitHub Discussions](https://github.com/AndersPier/dokploy-dashboard-pro/discussions) + +--- + +**Made with โค๏ธ for the Dokploy community** \ No newline at end of file