PHPackages                             algethamy/laravel-ack-deploy - 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. [DevOps &amp; Deployment](/categories/devops)
4. /
5. algethamy/laravel-ack-deploy

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

algethamy/laravel-ack-deploy
============================

Laravel package for easy deployment to Alibaba Cloud Container Service for Kubernetes (ACK)

v1.7.0(8mo ago)014MITPHPPHP ^8.1|^8.2|^8.3|^8.4

Since Sep 13Pushed 8mo agoCompare

[ Source](https://github.com/algethamy/ack-deploy)[ Packagist](https://packagist.org/packages/algethamy/laravel-ack-deploy)[ RSS](/packages/algethamy-laravel-ack-deploy/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (5)Versions (15)Used By (0)

Laravel ACK Deploy
==================

[](#laravel-ack-deploy)

[![Laravel ACK Deploy](https://camo.githubusercontent.com/2589ffa1aa2634abefa149e198b746dd8afd95a60535917484ea97b13dd7b7ae/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d41434b2532304465706c6f792d726564)](https://camo.githubusercontent.com/2589ffa1aa2634abefa149e198b746dd8afd95a60535917484ea97b13dd7b7ae/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d41434b2532304465706c6f792d726564)[![PHP Version](https://camo.githubusercontent.com/d6aac44f81cb2e6f4e71f098a1cb4a71992f24f7bfb424f6670db8313c9a855c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e312d626c7565)](https://camo.githubusercontent.com/d6aac44f81cb2e6f4e71f098a1cb4a71992f24f7bfb424f6670db8313c9a855c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e312d626c7565)[![License](https://camo.githubusercontent.com/f8df3091bbe1149f398a5369b2c39e896766f9f6efba3477c63e9b4aa940ef14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e)](https://camo.githubusercontent.com/f8df3091bbe1149f398a5369b2c39e896766f9f6efba3477c63e9b4aa940ef14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e)

A Laravel package that simplifies deployment to **Alibaba Cloud Container Service for Kubernetes (ACK)**. This package automatically generates Docker configurations, Kubernetes manifests, and deployment scripts optimized for ACK clusters.

Features
--------

[](#features)

- 🚀 **One-command setup** - Generate all ACK deployment files instantly
- 🐳 **Optimized Dockerfiles** - Production-ready PHP 8.3 + Apache containers
- ☸️ **Complete K8s Manifests** - Deployments, Services, Ingress, HPA, ConfigMaps
- 💰 **Cost-optimized scaling** - Smart auto-scaling with minimal resource usage
- 🔧 **Artisan commands** - Easy build, deploy, and management
- 🌍 **Multi-region support** - Support for all ACK regions
- ⚡ **Production ready** - Includes health checks, resource limits, and best practices

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

[](#installation)

Install via Composer:

```
composer require algethamy/laravel-ack-deploy
```

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

[](#quick-start)

### 1. Initialize ACK Configuration

[](#1-initialize-ack-configuration)

```
php artisan ack:init
```

This will create:

- `Dockerfile.ack` - Optimized Docker configuration
- `k8s/` directory with Kubernetes manifests
- `deploy-ack.sh` - Deployment script
- `.env.ack` - Environment template

### 2. Build Docker Image

[](#2-build-docker-image)

```
# Build only
php artisan ack:build

# Build and push to registry
php artisan ack:build --push
```

### 3. Deploy to ACK

[](#3-deploy-to-ack)

```
# Deploy with existing image
php artisan ack:deploy

# Build, push, and deploy in one command
php artisan ack:deploy --build --wait
```

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

[](#configuration)

### Environment Variables

[](#environment-variables)

Add these to your `.env` file:

```
# ACK Configuration
APP_NAME=my-laravel-app
DOCKER_REGISTRY=registry.me-central-1.aliyuncs.com
K8S_NAMESPACE=production
DOMAIN=myapp.com

# Resource Configuration (optional)
ACK_CPU_REQUEST=50m
ACK_MEMORY_REQUEST=64Mi
ACK_CPU_LIMIT=200m
ACK_MEMORY_LIMIT=256Mi
ACK_MIN_REPLICAS=1
ACK_MAX_REPLICAS=5
ACK_CPU_THRESHOLD=70
```

### Advanced Configuration

[](#advanced-configuration)

Customize the generated files in the `k8s/` directory:

- `deployment.yaml` - Container deployment configuration
- `service.yaml` - LoadBalancer service
- `ingress.yaml` - Ingress routing rules
- `hpa.yaml` - Horizontal Pod Autoscaler
- `configmap.yaml` - Environment variables

Commands
--------

[](#commands)

### `ack:init`

[](#ackinit)

Initialize ACK deployment configuration:

```
php artisan ack:init --app-name=myapp --registry=registry.me-central-1.aliyuncs.com
```

**Options:**

- `--app-name` - Application name
- `--registry` - Docker registry URL
- `--namespace` - Kubernetes namespace
- `--domain` - Application domain

### `ack:build`

[](#ackbuild)

Build Docker image for ACK deployment:

```
php artisan ack:build --tag=v1.0.0 --push
```

**Options:**

- `--tag` - Docker image tag (default: latest)
- `--registry` - Override registry URL
- `--push` - Push image to registry after build

### `ack:deploy`

[](#ackdeploy)

Deploy application to ACK cluster:

```
php artisan ack:deploy --namespace=production --build --wait
```

**Options:**

- `--namespace` - Kubernetes namespace
- `--build` - Build and push image before deploying
- `--wait` - Wait for deployment to be ready

Prerequisites
-------------

[](#prerequisites)

### Local Environment

[](#local-environment)

- Docker Desktop or Docker Engine
- kubectl configured for your ACK cluster
- PHP 8.1+ with Composer

### ACK Cluster Setup

[](#ack-cluster-setup)

1. **Create ACK Cluster** in Alibaba Cloud Console
2. **Configure kubectl** access:

    ```
    # Download kubeconfig from ACK console
    export KUBECONFIG=./kubeconfig.yaml
    kubectl get nodes
    ```
3. **Set up Container Registry** access:

    ```
    docker login registry.me-central-1.aliyuncs.com
    ```

Generated Files
---------------

[](#generated-files)

### Dockerfile.ack

[](#dockerfileack)

Production-optimized Docker image with:

- PHP 8.3 + Apache
- Composer dependencies
- Laravel optimizations
- Security best practices
- Health check support

### Kubernetes Manifests

[](#kubernetes-manifests)

**deployment.yaml**

- Cost-optimized resource requests (50m CPU, 64Mi RAM)
- Health checks and probes
- Environment configuration
- Rolling update strategy

**service.yaml**

- LoadBalancer for external access
- Port 80/443 configuration

**hpa.yaml**

- Auto-scaling from 1-5 pods
- CPU-based scaling (70% threshold)
- Smart scale-down delays

**ingress.yaml**

- Domain-based routing
- SSL/TLS ready
- Nginx ingress controller

**configmap.yaml**

- Laravel environment variables
- Database configuration
- Cache settings

Cost Optimization
-----------------

[](#cost-optimization)

This package is designed for **cost-efficient ACK deployments**:

### Resource Efficiency

[](#resource-efficiency)

- **Minimal baseline**: 50m CPU, 64Mi RAM per pod
- **Smart scaling**: Only scales up when CPU &gt; 70%
- **Scale-to-minimum**: Returns to 1 pod during low traffic

### Estimated Costs

[](#estimated-costs)

- **Small app (1 pod)**: ~$5-10/month
- **Medium load (2-3 pods)**: ~$15-25/month
- **High load (5 pods)**: ~$30-50/month

*Costs depend on ACK cluster configuration and region*

Multi-Region Support
--------------------

[](#multi-region-support)

Supported ACK regions:

RegionLocationRegistry Endpoint`me-central-1`Saudi Arabia (Riyadh)`registry.me-central-1.aliyuncs.com``me-east-1`UAE (Dubai)`registry.me-east-1.aliyuncs.com``ap-southeast-1`Singapore`registry.ap-southeast-1.aliyuncs.com``us-west-1`US West`registry.us-west-1.aliyuncs.com``eu-west-1`UK (London)`registry.eu-west-1.aliyuncs.com`Troubleshooting
---------------

[](#troubleshooting)

### Common Issues

[](#common-issues)

**Docker build fails:**

```
# Check Docker is running
docker version

# Clear Docker cache
docker system prune -f
```

**kubectl connection fails:**

```
# Check cluster connectivity
kubectl cluster-info

# Verify kubeconfig
kubectl config view
```

**Deployment not ready:**

```
# Check pod logs
kubectl logs deployment/myapp-app -n production

# Check pod status
kubectl describe pods -l app=myapp-app -n production
```

**No external IP assigned:**

```
# Check LoadBalancer service
kubectl get service myapp-service -n production

# Check service events
kubectl describe service myapp-service -n production
```

Best Practices
--------------

[](#best-practices)

### Security

[](#security)

- Use environment variables for sensitive data
- Enable RBAC in your ACK cluster
- Keep Docker images updated
- Use private container registries

### Performance

[](#performance)

- Set appropriate resource limits
- Use health checks
- Enable horizontal pod autoscaling
- Monitor application metrics

### Cost Optimization

[](#cost-optimization-1)

- Use cost-efficient resource requests
- Enable cluster autoscaling
- Monitor resource usage
- Schedule non-production workloads

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

[](#contributing)

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](LICENSE).

Support
-------

[](#support)

- 📖 [Documentation](https://github.com/algethamy/laravel-ack-deploy)
- 🐛 [Issues](https://github.com/algethamy/laravel-ack-deploy/issues)
- 💬 [Discussions](https://github.com/algethamy/laravel-ack-deploy/discussions)

Credits
-------

[](#credits)

- Built with ❤️ for the Laravel community
- Optimized for Alibaba Cloud ACK
- Inspired by Laravel Sail and Laravel Forge

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance62

Regular maintenance activity

Popularity6

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity60

Established project with proven stability

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

Every ~0 days

Total

14

Last Release

240d ago

PHP version history (2 changes)1.0PHP ^8.1|^8.2|^8.3

v1.1.0PHP ^8.1|^8.2|^8.3|^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/545ac5f8546ec191c3b59dba187745f010f346788c48518282844b8036fda9df?d=identicon)[efrontsa](/maintainers/efrontsa)

---

Tags

laraveldockerdeploymentkubernetesAlibaba cloudack

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/algethamy-laravel-ack-deploy/health.svg)

```
[![Health](https://phpackages.com/badges/algethamy-laravel-ack-deploy/health.svg)](https://phpackages.com/packages/algethamy-laravel-ack-deploy)
```

###  Alternatives

[shopware/deployment-helper

Shopware deployment tools

19305.3k5](/packages/shopware-deployment-helper)[thecodeholic/laravel-hostinger-deploy

Laravel package for automated Hostinger deployment with GitHub Actions support

565.3k](/packages/thecodeholic-laravel-hostinger-deploy)[webklex/laravel-git-hook

Laravel Git Hook

191.2k](/packages/webklex-laravel-git-hook)[downtoworld/laravel-devops

Laravel Cloudflare-Tunnels Ready Production Docker-Compose

161.1k](/packages/downtoworld-laravel-devops)

PHPackages © 2026

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