{"id":29295634,"url":"https://github.com/denrox/ui-apt-mirror","last_synced_at":"2025-07-06T14:09:05.220Z","repository":{"id":301884764,"uuid":"1010567508","full_name":"Denrox/ui-apt-mirror","owner":"Denrox","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-29T12:16:20.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-29T12:26:32.935Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Denrox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-29T10:57:21.000Z","updated_at":"2025-06-29T12:16:23.000Z","dependencies_parsed_at":"2025-06-29T12:26:49.415Z","dependency_job_id":"a77fc3c3-5686-4fb7-b6f2-ff1f1706fb71","html_url":"https://github.com/Denrox/ui-apt-mirror","commit_stats":null,"previous_names":["denrox/ui-apt-mirror"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Denrox/ui-apt-mirror","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Denrox%2Fui-apt-mirror","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Denrox%2Fui-apt-mirror/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Denrox%2Fui-apt-mirror/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Denrox%2Fui-apt-mirror/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Denrox","download_url":"https://codeload.github.com/Denrox/ui-apt-mirror/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Denrox%2Fui-apt-mirror/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263914454,"owners_count":23529079,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-06T14:09:00.133Z","updated_at":"2025-07-06T14:09:05.214Z","avatar_url":"https://github.com/Denrox.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UI APT Mirror\n\nA comprehensive APT mirror solution with a modern web interface, built with Docker. This project provides a complete local Ubuntu package repository with an intuitive admin panel and file hosting capabilities.\n\n## 🚀 Features\n\n- **APT Mirror**: Local Ubuntu package repository with automatic synchronization\n- **Web Interface**: web UI for all services\n- **Multi-Host Setup**: Three distinct web services:\n  - `mirror.intra` - DEB packages repository\n  - `admin.mirror.intra` - Admin panel with authentication\n  - `files.mirror.intra` - File hosting service\n- **Multi-Architecture Support**: Builds for both AMD64 and ARM64\n- **Easy Deployment**: Simple scripts for building and deployment\n- **Configurable**: Custom domains, sync frequency, and admin passwords\n\n## 📋 Requirements\n\n- arm64 or amd64 machine\n- Docker and Docker Compose\n- Linux system\n- Complete Mirroring apt repos usually requires a lot of disk space (\u003e 500G) \n\n## 🏗️ Architecture\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│                    UI APT Mirror Container                  │\n├─────────────────────────────────────────────────────────────┤\n│  ┌─────────────┐  ┌─────────────┐  ┌─────────────┐        │\n│  │   nginx     │  │ apt-mirror  │  │ health-check│        │\n│  │   (web)     │  │   (sync)    │  │  (monitor)  │        │\n│  └─────────────┘  └─────────────┘  └─────────────┘        │\n├─────────────────────────────────────────────────────────────┤\n│  mirror.intra  │  admin.mirror.intra  │  files.mirror.intra │\n│  (packages)    │     (admin panel)    │   (file hosting)    │\n└─────────────────────────────────────────────────────────────┘\n```\n\n## 🛠️ Installation\n\n### 1. Build the Images\n\nFirst, build the Docker images for your architecture:\n\n```bash\n./build.sh\n```\n\nThis will create:\n- `dist/ui-apt-mirror-amd64.tar.gz` (for x86_64 systems)\n- `dist/ui-apt-mirror-arm64.tar.gz` (for ARM64 systems)\n\n### 2. Deploy the Container\n\nRun the setup script to deploy the container:\n\n```bash\n./setup.sh\n```\n\nThe script will:\n- Detect your system architecture\n- Ask for your custom domain (default: `mirror.intra`)\n- Configure sync frequency\n- Set admin password\n- Load the appropriate Docker image\n- Start the container\n\n## 🎛️ Configuration\n\n### Configuration Process\n\nThe setup script uses a template-based approach:\n\n1. **Template File**: `docker-compose.src.yml` contains the base configuration with environment variable placeholders\n2. **Generation**: The setup script copies the template to `docker-compose.yml` and replaces placeholders with actual values\n3. **Customization**: You can modify the generated `docker-compose.yml` file directly if needed\n\n### Configuration Variables\n\nThe following variables are configured during startup:\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `MIRROR_DOMAIN` | `mirror.intra` | Main repository domain |\n| `ADMIN_DOMAIN` | `admin.mirror.intra` | Admin panel domain |\n| `FILES_DOMAIN` | `files.mirror.intra` | File hosting domain |\n| `SYNC_FREQUENCY` | `14400` | Sync frequency in seconds (Every 4 hours) |\n\n**Sync Frequency Options:**\n- Every 4 hours (14400 seconds) - Default\n- Every 12 hours (43200 seconds)\n- Every 24 hours (86400 seconds)\n\n### Data Directories\n\nThe following directories are automatically created and mounted:\n\n| Directory | Container Path | Purpose |\n|-----------|----------------|---------|\n| `./data/data/apt-mirror` | `/var/spool/apt-mirror` | APT mirror data |\n| `./data/data/files` | `/var/www/files` | File hosting data |\n| `./data/logs/apt-mirror` | `/var/log` | Application logs |\n| `./data/logs/nginx` | `/var/log/nginx` | Nginx logs |\n| `./data/conf/apt-mirror` | `/etc/apt` | APT mirror configuration |\n| `./data/conf/nginx/sites-available/` | `/etc/nginx/sites-available/` | Nginx configurations |\n| `./data/conf/nginx/.htpasswd` | `/etc/nginx/.htpasswd` | Nginx authentication file |\n\n### APT Mirror Configuration\n\nThe apt-mirror configuration is automatically generated and includes:\n- Ubuntu 24.04 (Noble Numbat) repositories\n- Debian 12 (Bookworm) repositories\n- Main, restricted, universe, and multiverse components\n- Security and updates repositories\n- Automatic cleanup of old packages\n\n### Nginx Configuration\n\nNginx configurations are mounted as volumes from `./data/conf/nginx/` and include:\n- `nginx.conf` - Main nginx configuration\n- `mirror.intra.conf` - Main repository virtual host\n- `admin.mirror.intra.conf` - Admin panel virtual host with authentication\n- `files.mirror.intra.conf` - File hosting virtual host\n\nYou can modify these configurations without rebuilding the container. Changes take effect after restarting the container.\n\n## 🌐 Web Interfaces\n\n### Main Repository (mirror.intra)\n\n- **URL**: `http://mirror.intra`\n- **Purpose**: Browse and download Ubuntu packages\n- **Features**:\n  - Package browsing with directory listing\n  - Download statistics\n  - Usage instructions\n  - Quick links to other services\n\n### Admin Panel (admin.mirror.intra)\n\n- **URL**: `http://admin.mirror.intra`\n- **Authentication**: Basic auth (admin/password)\n- **Features**:\n  - Mirror status monitoring\n  - Sync controls (start/stop)\n  - Statistics and metrics\n  - Log viewing\n  - Configuration management\n\n### File Repository (files.mirror.intra)\n\n- **URL**: `http://files.mirror.intra`\n- **Purpose**: File hosting and sharing\n- **Features**:\n  - Drag-and-drop file upload\n  - File browsing with icons\n  - Download statistics\n  - Disk usage monitoring\n\n## 📊 Usage\n\n### Using the APT Mirror\n\nTo use the local repository on your Ubuntu systems, add the following to `/etc/apt/sources.list`:\n\n```bash\n# Replace mirror.intra with your custom domain\n# For Ubuntu 24.04 (Noble)\nTypes: deb\nURIs: http://mirror.intra/archive.ubuntu.com/ubuntu\nSuites: noble noble-updates noble-backports\nComponents: main restricted universe multiverse\nSigned-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg\n\nTypes: deb\nURIs: http://mirror.intra/archive.ubuntu.com/ubuntu\nSuites: noble-security\nComponents: main restricted universe multiverse\nSigned-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg\n\n# For Debian 12 (Bookworm)\ndeb http://mirror.intra/deb.debian.org/ bookworm main contrib non-free non-free-firmware\ndeb http://mirror.intra/deb.debian.org/ bookworm-updates main contrib non-free non-free-firmware\ndeb http://mirror.intra/security.debian.org/ bookworm-security main contrib non-free non-free-firmware\n```\n\nThen update your package lists:\n\n```bash\nsudo apt update\n```\n\n### Managing the Mirror\n\nAccess the admin panel at `http://admin.mirror.intra` to:\n- Monitor sync status\n- Start/stop synchronization\n- View logs and statistics\n- Manage configuration\n\n### File Hosting\n\nUse the file repository at `http://files.mirror.intra` to:\n- Upload files via web interface\n- Browse uploaded files\n- Download files\n- Monitor disk usage\n\n## 🔧 Management\n\n### Viewing Logs\n\n```bash\n# Container logs\ndocker logs ui-apt-mirror\n\n# Docker Compose logs\ndocker compose -f docker-compose.yml logs\n\n# Specific service logs\ndocker compose -f docker-compose.yml logs ui-apt-mirror\n```\n\n### Stopping the Container\n\n```bash\ndocker compose -f docker-compose.yml down\n```\n\n### Restarting the Container\n\n```bash\ndocker compose -f docker-compose.yml restart\n```\n\n### Updating Configuration\n\nTo update the configuration:\n\n1. **Automatic Method**: Run `./setup.sh` again to regenerate configuration\n2. **Manual Method**: \n   - Stop the container: `docker compose -f docker-compose.yml down`\n   - Edit the generated `docker-compose.yml` file directly\n   - Restart the container: `docker compose -f docker-compose.yml up -d`\n\n**Note**: The `.env` file is used internally by the setup script. For manual changes, edit `docker-compose.yml` directly.\n\n## 📁 Directory Structure\n\n```\nui-apt-mirror/\n├── build.sh                 # Build script for Docker images\n├── setup.sh               # Deployment and configuration script\n├── README.md               # This file\n├── .env                    # Configuration file (generated)\n├── docker-compose.src.yml  # Docker Compose template\n├── docker-compose.yml      # Generated Docker Compose file\n├── dist/                   # Built Docker images\n│   ├── ui-apt-mirror-amd64.tar.gz\n│   └── ui-apt-mirror-arm64.tar.gz\n├── Dockerfile              # Multi-stage Docker build\n├── entrypoint.sh           # Container startup script\n├── scripts/                # Service scripts\n└── web/                    # Web content\n    ├── mirror.intra/\n    ├── admin.mirror.intra/\n    └── files.mirror.intra/\n└── data/                   # Persistent data and configuration\n    ├── data/apt-mirror/    # APT mirror data\n    ├── data/files/         # File hosting data\n    ├── logs/apt-mirror/    # Application logs\n    ├── logs/nginx/         # Nginx logs\n    ├── conf/apt-mirror/    # APT mirror configuration\n    └── conf/nginx/         # Nginx configurations\n```\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## 🙏 Acknowledgments\n\n- [apt-mirror](https://github.com/apt-mirror/apt-mirror) - The APT mirroring tool\n- [nginx](https://nginx.org/) - Web server\n- [Docker](https://docker.com/) - Containerization platform","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenrox%2Fui-apt-mirror","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdenrox%2Fui-apt-mirror","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenrox%2Fui-apt-mirror/lists"}