PHPackages                             itcompass/basepack - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. itcompass/basepack

ActiveLibrary[Database &amp; ORM](/categories/database)

itcompass/basepack
==================

DevOps toolkit for Laravel projects with Docker, Make commands, and development environment setup

v1.0.0(7mo ago)28MITPHPPHP ^8.1|^8.2|^8.3CI passing

Since Oct 5Pushed 7mo agoCompare

[ Source](https://github.com/itcompass-agency/basepack)[ Packagist](https://packagist.org/packages/itcompass/basepack)[ Docs](https://github.com/ibigforko/basepack)[ RSS](/packages/itcompass-basepack/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (6)Versions (5)Used By (0)

BasePack
========

[](#basepack)

**DevOps Toolkit for Laravel Projects**

[![Latest Version](https://camo.githubusercontent.com/98f52ecef9c25a2e1aa6f0e3385ea19408ecc31fdd595052c9dc1e1a12fe97ce/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6974636f6d706173732f626173657061636b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/itcompass/basepack)[![Total Downloads](https://camo.githubusercontent.com/a64848bbf468d41a7de0b4df0b16c7693946b07509dd2b248a1b7b209c447ffc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6974636f6d706173732f626173657061636b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/itcompass/basepack)[![License](https://camo.githubusercontent.com/40bf25241543a61adefc8d29e04c092b499aa990a21ecb2fa741919f3fc2f79e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6974636f6d706173732f626173657061636b2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![PHP Version](https://camo.githubusercontent.com/3e7e1dacc584cc2688ba9d2f8601028ecc1ae062644e8e2cfcad93835e7a1edc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6974636f6d706173732f626173657061636b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/itcompass/basepack)

*A complete Docker-based development and production environment for Laravel with SSL support, smart automation, and comprehensive DevOps tools.*

[Installation](#installation) • [Features](#features) • [Quick Start](#quick-start) • [Documentation](#documentation) • [Contributing](#contributing)

---

Overview
--------

[](#overview)

BasePack is a comprehensive DevOps toolkit that streamlines Docker-based Laravel development and deployment. It provides pre-configured Docker containers, SSL certificate management, intelligent diagnostics, and powerful automation commands - everything you need to go from development to production seamlessly.

**Built by developers, for developers** - BasePack eliminates the complexity of Docker configuration while maintaining flexibility for customization.

### Why BasePack?

[](#why-basepack)

- **Zero Configuration** - Install and run in minutes with smart defaults
- **Production Ready** - Separate dev/prod configurations with security hardening
- **SSL Made Easy** - Automatic certificate detection and validation
- **Smart Diagnostics** - Auto-fix common issues with built-in diagnostic tools
- **Real-time Monitoring** - Live dashboard for container stats and health checks
- **Full Stack Included** - PHP, Nginx, MySQL, Redis, with Xdebug for development
- **Battle Tested** - Comprehensive test coverage across PHP 8.1-8.3 and Laravel 10-12

---

Features
--------

[](#features)

### 🚀 Quick Setup &amp; Automation

[](#-quick-setup--automation)

- **One-Command Installation** - `php artisan basepack:install` sets up everything
- **Smart SSL Detection** - Automatically finds and validates certificates from 6+ locations
- **Project Name Inference** - Intelligently detects project name from various sources
- **Makefile Integration** - 295 lines of pre-configured Make commands for common tasks

### 🐳 Docker Environment

[](#-docker-environment)

- **Multi-Version PHP Support** - PHP 8.1, 8.2, 8.3 with FPM
- **Modern Stack** - Nginx, MySQL 8.0, Redis 7.4
- **Xdebug Integration** - Pre-configured for PhpStorm and VSCode
- **Separate Configurations** - Optimized dev and production environments
- **Security Hardened** - Redis authentication, protected mode, disabled dangerous commands (CVE-2025-49844 mitigation)

### 🛠 Artisan Commands

[](#-artisan-commands)

CommandDescription`basepack:install`Install and configure the complete toolkit`basepack:build`Build Docker containers with dev/prod options`basepack:dashboard`Real-time container monitoring with auto-refresh`basepack:status`Quick container status overview`basepack:diagnose`Comprehensive diagnostics with `--fix` auto-repair`basepack:ssl-check`Validate SSL certificates and check expiration`basepack:test`Run package tests with coverage options`basepack:exec`Execute commands in specific containers`basepack:publish`Publish specific assets (docker, make, compose, config)### 📊 Monitoring &amp; Diagnostics

[](#-monitoring--diagnostics)

- **Real-time Dashboard** - CPU, memory, port mappings, health checks
- **Smart Diagnostics** - Detects missing files, invalid configs, SSL issues
- **Auto-Fix Capability** - One-command resolution of common problems
- **Detailed Reporting** - Clear, actionable feedback with next steps

### 🔒 Security Features

[](#-security-features)

- **Redis Security Hardening** - Password auth, protected mode, network isolation
- **CVE-2025-49844 Mitigation** - Disabled dangerous Lua scripting commands
- **SSL/TLS Support** - Self-signed or production certificates
- **No Public Exposure** - Redis and MySQL accessible only via internal Docker network
- **Environment Validation** - Checks for weak passwords and security misconfigurations

---

Requirements
------------

[](#requirements)

- PHP 8.1, 8.2, or 8.3
- Laravel 10.x, 11.x, or 12.x
- Docker &amp; Docker Compose
- Make (optional, but recommended)

---

Installation
------------

[](#installation)

### 1. Install via Composer

[](#1-install-via-composer)

```
composer require itcompass/basepack --dev
```

### 2. Run Installation Wizard

[](#2-run-installation-wizard)

```
php artisan basepack:install
```

The installer will:

- Detect or prompt for SSL certificates
- Create `.env.docker` with secure defaults
- Publish Docker configuration files
- Generate Makefile for automation
- Create docker-compose files for dev/prod
- Update `.gitignore` with sensible defaults

### 3. Configure Environment

[](#3-configure-environment)

**Option A: New Project**

```
cp .env.docker .env
```

**Option B: Existing Project**

```
# Merge Docker settings from .env.docker into your existing .env
```

**Important**: Change default passwords!

```
# .env or .env.docker
DB_PASSWORD=your_strong_database_password
REDIS_PASSWORD=your_strong_redis_password  # Required for security
```

Generate strong passwords:

```
# 32-character password
openssl rand -base64 32
```

### 4. Build and Start

[](#4-build-and-start)

```
make build
make start
make composer-install
make migrate
```

### 5. Access Your Application

[](#5-access-your-application)

```
https://localhost (or your configured domain)

```

---

Quick Start
-----------

[](#quick-start)

### Development Workflow

[](#development-workflow)

```
# Build containers
make build

# Start all services
make start

# View logs
make logs

# SSH into Laravel container
make ssh

# Run migrations
make migrate

# Install Composer dependencies
make composer-install

# Run tests
make test

# Stop all services
make stop
```

### Production Deployment

[](#production-deployment)

```
# Install for production
php artisan basepack:install --prod

# Build production containers
make build-prod

# Start production services
make start-prod
```

### Monitoring &amp; Debugging

[](#monitoring--debugging)

```
# Real-time dashboard
php artisan basepack:dashboard

# Check container status
php artisan basepack:status

# Run diagnostics
php artisan basepack:diagnose

# Auto-fix issues
php artisan basepack:diagnose --fix

# Check SSL certificates
php artisan basepack:ssl-check
```

---

Configuration
-------------

[](#configuration)

### Project Structure

[](#project-structure)

After installation, BasePack creates:

```
your-project/
├── .docker/                    # Docker configuration
│   ├── Dockerfile             # Main Laravel container
│   ├── nginx/                 # Nginx web server
│   ├── redis/                 # Redis configuration with security hardening
│   ├── dev/                   # Development configs (nginx, php, xdebug)
│   ├── prod/                  # Production configs
│   └── general/               # Shared configs (SSL, supervisor, cron)
├── .env.docker                # Docker-specific environment
├── Makefile                   # Automation commands
├── docker-compose.yml         # Development environment
└── docker-compose-prod.yml    # Production environment

```

### Environment Variables

[](#environment-variables)

Key variables in `.env.docker`:

```
# Database
DB_HOST=mysql
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=laravel
DB_PASSWORD=secret              # CHANGE THIS!
DB_OUTER_PORT=3306

# Redis (Security Hardened)
REDIS_HOST=redis
REDIS_PASSWORD=CHANGE_ME_TO_STRONG_PASSWORD  # REQUIRED - CHANGE THIS!
REDIS_PORT=6379
# REDIS_OUTER_PORT removed for security - not exposed publicly

# Web Ports
WEB_PORT_HTTP=80
WEB_PORT_SSL=443

# Xdebug (dev only)
XDEBUG_CONFIG=main

# Project Name
COMPOSE_PROJECT_NAME=your_project
```

### SSL Certificates

[](#ssl-certificates)

BasePack looks for SSL certificates in these locations (in order):

1. `./ssl/`
2. `./.ssl/`
3. `./certificates/`
4. `./.docker/ssl/`
5. `/etc/ssl/certs/`
6. `~/.ssl/`

Or specify custom path:

```
php artisan basepack:install --ssl-path=/path/to/certificates
```

**Certificate Requirements:**

- Files must be named `cert.pem` and `key.pem`
- For development: self-signed certificates work fine
- For production: use valid certificates (Let's Encrypt recommended)

**Generate self-signed certificate:**

```
openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
  -keyout key.pem -out cert.pem \
  -subj "/C=US/ST=State/L=City/O=Organization/CN=localhost"
```

---

Makefile Commands
-----------------

[](#makefile-commands)

BasePack includes a comprehensive Makefile with 30+ commands:

### Container Management

[](#container-management)

```
make build          # Build all containers
make build-prod     # Build production containers
make start          # Start all services
make stop           # Stop all services
make restart        # Restart all services
make destroy        # Stop and remove containers
```

### Development

[](#development)

```
make ssh            # SSH into Laravel container
make ssh-root       # SSH as root
make logs           # View all logs
make logs-app       # View Laravel logs only
```

### Composer &amp; NPM

[](#composer--npm)

```
make composer-install    # Install PHP dependencies
make composer-update     # Update PHP dependencies
make npm-install        # Install Node dependencies
make npm-dev           # Run npm dev build
make npm-prod          # Run npm production build
```

### Database

[](#database)

```
make migrate           # Run migrations
make migrate-fresh     # Fresh migration
make migrate-rollback  # Rollback migrations
make seed             # Run database seeds
```

### Cache &amp; Queue

[](#cache--queue)

```
make cache-clear      # Clear all caches
make queue-work       # Start queue worker
make queue-restart    # Restart queue workers
```

### Testing

[](#testing)

```
make test            # Run all tests
make test-unit       # Run unit tests only
make test-coverage   # Run with coverage report
```

---

Advanced Usage
--------------

[](#advanced-usage)

### Custom Container Commands

[](#custom-container-commands)

```
# Execute command in Laravel container
php artisan basepack:exec --container=laravel "php artisan cache:clear"

# Execute as root
php artisan basepack:exec --container=mysql --root "mysql -u root -p"
```

### Selective Publishing

[](#selective-publishing)

```
# Publish only docker files
php artisan basepack:publish --docker

# Publish only Makefile
php artisan basepack:publish --make

# Publish docker-compose files
php artisan basepack:publish --compose

# Force overwrite existing files
php artisan basepack:publish --docker --force
```

### Environment-Specific Installation

[](#environment-specific-installation)

```
# Development only
php artisan basepack:install --dev

# Production only
php artisan basepack:install --prod

# Both environments
php artisan basepack:install
# (selects "both" when prompted)
```

### Xdebug Configuration

[](#xdebug-configuration)

BasePack includes pre-configured Xdebug for development:

**PhpStorm:**

1. Enable Xdebug in `.env.docker`: `XDEBUG_CONFIG=main`
2. Configure PhpStorm: Settings → PHP → Servers
3. Add server with name `localhost` and port `80`
4. Enable "Start listening for PHP Debug Connections"

**VSCode:**

1. Use `.docker/dev/xdebug-main.ini` configuration
2. Install PHP Debug extension
3. Configure launch.json with provided settings

**macOS Users:**

- Use `XDEBUG_CONFIG=osx` for Docker Desktop on macOS
- Uses `xdebug-osx.ini` with Docker host gateway

---

Testing
-------

[](#testing-1)

BasePack includes comprehensive tests across three tiers:

### Running Tests

[](#running-tests)

```
# All tests
vendor/bin/phpunit

# Specific suite
vendor/bin/phpunit --testsuite=Unit
vendor/bin/phpunit --testsuite=Integration
vendor/bin/phpunit --testsuite=Feature

# With coverage
vendor/bin/phpunit --coverage-html coverage-report

# Via Makefile
make test
make test-unit
make test-coverage

# Via Artisan
php artisan basepack:test --suite=unit --coverage
```

### Test Coverage

[](#test-coverage)

BasePack is tested against:

- **PHP Versions:** 8.1, 8.2, 8.3
- **Laravel Versions:** 10.x, 11.x, 12.x
- **Dependency Variants:** prefer-lowest, prefer-stable
- **Total Matrix Combinations:** 14 test scenarios

See [TESTING.md](TESTING.md) for detailed testing documentation.

---

Security
--------

[](#security)

### Security Hardening

[](#security-hardening)

BasePack implements comprehensive security measures:

**Redis Security (CVE-2025-49844 Mitigation):**

- Password authentication required
- Protected mode enabled
- Network isolation (no public exposure)
- Dangerous commands disabled (FLUSHDB, FLUSHALL, CONFIG, etc.)
- Updated to Redis 7.4-alpine with latest patches

**Before Production Deployment:**

- Change all default passwords
- Use strong passwords (32+ characters)
- Verify Redis is not publicly exposed
- Use valid SSL certificates
- Review `.gitignore` excludes sensitive files
- Run `php artisan basepack:diagnose --fix`

### Reporting Vulnerabilities

[](#reporting-vulnerabilities)

See [SECURITY.md](SECURITY.md) for our security policy and how to report vulnerabilities.

**Contact:**

---

Troubleshooting
---------------

[](#troubleshooting)

### Common Issues

[](#common-issues)

**Containers won't start:**

```
php artisan basepack:diagnose --fix
make destroy
make build --no-cache
make start
```

**SSL certificate errors:**

```
php artisan basepack:ssl-check
# Verify certificate files exist and are not expired
```

**Permission issues:**

```
# Fix Laravel storage permissions
make ssh
chmod -R 775 storage bootstrap/cache
chown -R www-data:www-data storage bootstrap/cache
```

**Redis connection refused:**

```
# Verify REDIS_PASSWORD is set in .env
# Check Redis container is running: make status
# View Redis logs: docker logs -redis
```

**Xdebug not working:**

```
# Verify XDEBUG_CONFIG in .env.docker
# Rebuild containers: make build
# Check Xdebug is loaded: make ssh, then php -m | grep xdebug
```

### Getting Help

[](#getting-help)

1. Run diagnostics: `php artisan basepack:diagnose`
2. Check logs: `make logs`
3. Review configuration: `php artisan basepack:status`
4. Consult [TESTING.md](TESTING.md) and [SECURITY.md](SECURITY.md)
5. [Open an issue](https://github.com/ibigforko/basepack/issues)

---

Contributing
------------

[](#contributing)

We welcome contributions! Please follow these guidelines:

### Development Setup

[](#development-setup)

```
# Clone repository
git clone https://github.com/ibigforko/basepack.git
cd basepack

# Install dependencies
composer install

# Run tests
vendor/bin/phpunit

# Run tests with coverage
vendor/bin/phpunit --coverage-html coverage-report
```

### Contribution Workflow

[](#contribution-workflow)

1. Fork the repository
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
3. Write tests for your changes
4. Ensure all tests pass (`vendor/bin/phpunit`)
5. Commit your changes (`git commit -m 'Add amazing feature'`)
6. Push to your branch (`git push origin feature/amazing-feature`)
7. Open a Pull Request

### Code Standards

[](#code-standards)

- Follow PSR-12 coding standards
- Write comprehensive tests (unit, integration, feature)
- Document new features in README.md
- Update CHANGELOG.md with your changes
- Ensure CI/CD pipeline passes

### Testing Requirements

[](#testing-requirements)

All contributions must include tests and pass the full test matrix:

- PHP 8.1, 8.2, 8.3
- Laravel 10.x, 11.x, 12.x
- Both prefer-lowest and prefer-stable dependencies

---

Changelog
---------

[](#changelog)

Please see [CHANGELOG.md](CHANGELOG.md) for recent changes.

---

Credits
-------

[](#credits)

### Created By

[](#created-by)

**ITCompass** - Digital Solutions Agency

- Website: [itcompass.io](https://itcompass.io)
- Email:

### Lead Developer

[](#lead-developer)

**Artem Shevchenko** ([@ibigforko](https://github.com/ibigforko))

### Contributors

[](#contributors)

See [all contributors](https://github.com/ibigforko/basepack/graphs/contributors) who have helped make BasePack better.

---

License
-------

[](#license)

BasePack is open-source software licensed under the [MIT License](LICENSE.md).

Copyright (c) 2025 ITCompass

---

Support
-------

[](#support)

### Commercial Support

[](#commercial-support)

Need help with implementation, custom features, or dedicated support?

Contact us: ****

### Community Support

[](#community-support)

- [GitHub Issues](https://github.com/ibigforko/basepack/issues) - Bug reports and feature requests
- [GitHub Discussions](https://github.com/ibigforko/basepack/discussions) - Questions and community help

---

Acknowledgments
---------------

[](#acknowledgments)

BasePack is built with and inspired by these amazing projects:

- [Laravel](https://laravel.com) - The PHP Framework for Web Artisans
- [Docker](https://docker.com) - Containerization platform
- [Redis](https://redis.io) - In-memory data structure store
- [Nginx](https://nginx.org) - High-performance web server
- [MySQL](https://mysql.com) - Popular open-source database

---

**Made with ❤️ by [ITCompass](https://itcompass.io)**

⭐ Star us on [GitHub](https://github.com/ibigforko/basepack) if you find BasePack useful!

[Installation](#installation) • [Features](#features) • [Documentation](#documentation) • [Contributing](#contributing) • [License](#license)

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance65

Regular maintenance activity

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

214d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9e486475fa0d5a6560410f55ab2b098970dd91289670be3cea6aa17b7d06dd6a?d=identicon)[ibigforko](/maintainers/ibigforko)

---

Top Contributors

[![ibigforko](https://avatars.githubusercontent.com/u/11552807?v=4)](https://github.com/ibigforko "ibigforko (31 commits)")

---

Tags

automationdeploymentdevelopment-environmentdevopsdockerdocker-composelaravellaravel-packagemakefilemysqlnginxphpphp8redisssltoolkitphplaravelautomationmysqlredisenvironmentdevelopmentdevopsssldockernginxmaketoolkit

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/itcompass-basepack/health.svg)

```
[![Health](https://phpackages.com/badges/itcompass-basepack/health.svg)](https://phpackages.com/packages/itcompass-basepack)
```

###  Alternatives

[spiritix/lada-cache

A Redis based, automated and scalable database caching layer for Laravel

591444.8k2](/packages/spiritix-lada-cache)[matthew-p/docker-server

Universal docker server, Nginx, PHP-FPM, MySql, Redis

112.8k](/packages/matthew-p-docker-server)[chr15k/laravel-mysql-encrypt

Laravel database encryption using native MySQL functions

119.9k](/packages/chr15k-laravel-mysql-encrypt)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
