Download the PHP package castor-php/docker without Composer
On this page you can find all versions of the php package castor-php/docker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package docker
Castor Docker Plugin
A Castor plugin that turns a PHP description of your stack into a Docker Compose environment, and gives you the tasks to drive it.
Features
- 🚀 Automatic Docker Compose configuration generation
- 🔧 Pre-configured services for common infrastructure components
- 🎯 Service-specific tasks for common operations
- 🔒 On-demand, locally-trusted HTTPS (with mkcert support)
- 🌐 Caddy-based reverse proxy with automatic routing from Docker labels
- 🔗 Public HTTPS tunnels to your domains through Cloudflare, with
castor docker:tunnel:start - 📦 Multi-stage Docker builds with registry caching
- 👥 Multi-application, multi-language support in a single project
- 🌳 Every git worktree is a stack of its own, with no configuration
Installation
Usage
-
Create a
castor.phpfile in your project root: - Start your project infrastructure:
The global Caddy router serving your domains is started along with it, and stopped again when no project needs it anymore.
- See what it serves:
It lists every URL the project answers on, with the service serving each of them.
Global router
The Caddy router is global: one instance, living outside of any project, serves every Castor Docker project on the machine. Ports 80 and 443 are bound once, projects run side by side, and the router survives their restarts.
docker:up starts it when the project routes a domain, docker:stop stops it
once no routed container is left running anywhere. It lives in
~/.castor/docker/router/, and these tasks are for the times you want to decide
yourself:
Set the router_autostart context variable to false, or
CASTOR_DOCKER_ROUTER_AUTOSTART=0 for a single command, to leave the router
entirely to those tasks.
Each project keeps its own compose network, and the router joins it on
docker:up rather than every project joining a shared one — so two projects can
both have a service named app without colliding in the Docker DNS. See the
router documentation for
the details.
Registering those two services also gave you tasks: castor app:bash,
castor app:install, castor app:symfony, castor postgres:client,
castor docker:logs, and more.
Prefer not to write it by hand? Let the plugin do it:
Documentation
Everything is on https://castor-php.github.io/docker/:
- Getting started — installation, first environment, service configuration
- Services — PHP, Go, Rust, databases, cache, queue, search, router
- Tasks — the commands the plugin gives you
- Going further — multiple applications, custom images, writing your own service
Example
See the example directory for a complete working project with multiple applications and services.
Contributing
The documentation lives in Zensical:
Quality tooling for the plugin itself:
License
This plugin is part of the Castor project, released under the MIT license.