reyemtech / sail
Docker files for running a basic Laravel application.
Installs: 469
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 516
Open Issues: 0
pkg:composer/reyemtech/sail
Requires
- php: ^8.0
- illuminate/console: ^9.52.16|^10.0|^11.0|^12.0
- illuminate/contracts: ^9.52.16|^10.0|^11.0|^12.0
- illuminate/support: ^9.52.16|^10.0|^11.0|^12.0
- mirazmac/dotenvwriter: ^0.6.0
- symfony/console: ^6.0|^7.0
- symfony/yaml: ^6.0|^7.0
Requires (Dev)
- orchestra/testbench: ^7.0|^8.0|^9.0|^10.0
- phpstan/phpstan: ^2.0
Conflicts
- laravel/sail: *
- 1.x-dev
- 1.52.10
- 1.52.9
- 1.52.8
- 1.52.7
- 1.52.6
- 1.52.5
- 1.52.4
- 1.52.3
- 1.52.2
- 1.52.1
- 1.52.0
- 1.45.12
- 1.45.11
- 1.45.10
- 1.45.9
- 1.45.8
- 1.45.7
- 1.45.6
- 1.45.5
- 1.45.4
- v1.45.3
- 1.45.2
- 1.45.1
- 1.45.0
- 1.44.5
- 1.44.4
- 1.44.3
- 1.44.2
- 1.44.1
- 1.44.0
- 1.43.14
- 1.43.13
- 1.43.12
- 1.43.11
- 1.43.10
- 1.43.9
- 1.43.8
- 1.43.7
- 1.43.6
- 1.43.5
- v1.43.4
- v1.43.3
- v1.43.2
- v1.43.1
- v1.43.0
This package is auto-updated.
Last update: 2025-12-30 21:18:44 UTC
README
Introduction
This fork of Laravel Sail adds:
- Helm chart generation (with scheduler vendor PVC support)
- Non-interactive
sail:buildflags (--use-previous,--bump, etc.) - Laravel Boost guideline for IDE/AI context
- Multi-stage Docker builds (bake) shared across PHP versions (8.x/8.5)
Quick start
composer require reyemtech/sail --dev
php artisan sail:install --php=8.4 # or 8.5
php artisan sail:publish
Multi-project support
This fork includes a sail-wrapper that automatically finds and runs the nearest project's Sail script. This allows you to use sail from any directory when working with multiple Sail projects on the same machine.
Automatic installation: The wrapper is automatically installed to ~/.local/bin/sail (or ~/bin if available) when you install or update the package via Composer.
Usage: Simply run sail from any directory, and it will automatically find and execute the nearest project's vendor/bin/sail:
cd /path/to/project-a sail up -d # Uses project-a's Sail cd /path/to/project-b sail artisan migrate # Uses project-b's Sail
Manual installation: If automatic installation fails, you can manually install:
cp vendor/reyemtech/sail/bin/sail-wrapper ~/.local/bin/sail chmod +x ~/.local/bin/sail
Note: Make sure ~/.local/bin (or ~/bin) is in your PATH. Add to your ~/.bashrc or ~/.zshrc:
export PATH="$HOME/.local/bin:$PATH"
Build with bake + Helm
php artisan sail:build \ --environments=production \ --architectures=linux/amd64,linux/arm64 \ --repository=ghcr.io \ --organization=acme \ --domains=app.example.com \ --build-version=1.2.3 \ --push \ --use-previous \ --bump=patch
Key flags:
--use-previous: reuse the last saved config without prompts--bump=patch|minor|major|no: bump version non-interactively--repository=none: local-only build (disables push)--remove-vendor-node-modules: Remove vendor/ and node_modules/ from final image (default: true)--keep-vendor-node-modules: Keep vendor/ and node_modules/ in final image
Validation:
- Environments must be in
local, production - Architectures must be in the allowed list from the package
- Repository must be one of the known registries,
none, or a full registry URL (e.g.,888657980245.dkr.ecr.us-east-1.amazonaws.com)
Registry Support
The build command supports multiple container registries with automatic authentication:
Standard Registries:
- GitHub Container Registry (
ghcr.io) - Docker Hub (
docker.io) - GitLab Container Registry (
registry.gitlab.com) - Quay.io (
quay.io) - Custom registries (any valid registry URL)
AWS ECR:
php artisan sail:build --repository=888657980245.dkr.ecr.us-east-1.amazonaws.com --push # Or use shorthand: php artisan sail:build --repository=ecr --push # Requires: AWS CLI configured (aws configure) # Environment variables: AWS_REGION, AWS_ACCOUNT_ID (optional)
Azure ACR:
php artisan sail:build --repository=myregistry.azurecr.io --push # Or use shorthand: php artisan sail:build --repository=azurecr --push # Requires: Azure CLI installed and logged in (az login) # Environment variable: AZURE_ACR_NAME (optional)
The build command will automatically check if you're logged in and prompt for authentication if needed.
Helm Commands
Regenerate Helm Chart
Regenerate the Helm chart without building Docker images:
# Regenerate with current version php artisan sail:helm # Regenerate with specific version php artisan sail:helm --chart-version=1.2.3 # Bump version and regenerate php artisan sail:helm --bump=patch # Skip version update in Chart.yaml php artisan sail:helm --no-version-update
This command:
- Updates Helm templates from stubs
- Merges new configuration variables from
values.stubinto existingvalues.yaml - Updates
Chart.yamlversion (unless--no-version-updateis used) - Validates the chart using
helm lint
Useful when you need to update templates or add new configuration options without rebuilding Docker images.
Helm Chart Notes
- Stubs live in
stubs/helm - Scheduler vendor PVC: enabled by default (
scheduler.vendorPvc.*), default size 5Gi, storage classsata - Resources & security defaults:
resourcesrequests/limits set invalues.stubsecurityContextdefaults to non-root, fsGroup 1000
- Probes: web gets readiness/liveness on
/up - Autoscaling: HPA enabled by default for web tier, configurable per tier
- Pod Disruption Budgets: Configurable PDBs for high availability
- ServiceAccounts: Optional ServiceAccount creation with annotations
- External Secrets: Automatic API version detection (v1 or v1beta1)
Docker runtime
- PHP 8.x bake files reside in
runtimes/8.x - PHP 8.5 reuses the 8.x bake structure (
runtimes/8.5/docker-bake.hcltargets 8.x, PHP_VERSION=8.5) - Multi-stage targets: base, app, production (cli/fpm)
CI/CD Integration
Generate CI/CD configuration files for automated Docker builds:
# Interactive selection php artisan sail:ci # Direct selection php artisan sail:ci --provider=github-actions php artisan sail:ci --provider=gitlab-ci php artisan sail:ci --provider=azure-devops php artisan sail:ci --provider=circleci php artisan sail:ci --provider=aws-codebuild php artisan sail:ci --provider=travis # Overwrite existing configuration php artisan sail:ci --provider=github-actions --overwrite
Supported CI Platforms
- GitHub Actions -
.github/workflows/build.yml - GitLab CI/CD -
.gitlab-ci.yml - Azure DevOps Pipelines -
azure-pipelines/build.yml - CircleCI -
.circleci/config.yml - AWS CodeBuild -
buildspec.yml - Travis CI -
.travis.yml
All CI configurations:
- Build on push to
main/masterbranches - Build on version tags (
v*) - Support multi-architecture builds (amd64, arm64)
- Include registry authentication (ECR, ACR, standard)
- Generate both Docker images and Helm charts
- Extract version from git tags or generate date-based versions
CI Setup Requirements
GitHub Actions:
- Secrets:
REGISTRY_USERNAME,REGISTRY_PASSWORD(orGHCR_IO_USERNAME,GHCR_IO_PASSWORD) - For ECR:
AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY,AWS_REGION - For ACR:
AZURE_CREDENTIALS
GitLab CI:
- CI/CD Variables:
REGISTRY_USERNAME,REGISTRY_PASSWORD(orCI_REGISTRY_USER,CI_REGISTRY_PASSWORD) - For ECR:
AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY,AWS_REGION - For ACR:
AZURE_CLIENT_ID,AZURE_CLIENT_SECRET,AZURE_TENANT_ID
Azure DevOps:
- Variables:
REGISTRY_USERNAME,REGISTRY_PASSWORD - Service connections for ACR and AWS
CircleCI:
- Environment Variables:
REGISTRY_USERNAME,REGISTRY_PASSWORD - For ECR:
AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY,AWS_REGION
AWS CodeBuild:
- Environment Variables:
REGISTRY_USERNAME,REGISTRY_PASSWORD - IAM role for ECR authentication (no credentials needed)
Travis CI:
- Environment Variables:
REGISTRY_USERNAME,REGISTRY_PASSWORD
Rollback (Helm)
helm rollback <release> <revision> helm history <release>
Contributing / Security
- Issues: https://github.com/reyemtech/sail/issues
- Security: https://github.com/laravel/sail/security/policy
- License: MIT