Skip to content

thomasmoors/anchor

Repository files navigation

Laravel Anchor

Wrap docker management in a convenient Laravel package, just like Sail but with a different approach. Also make it usable in production. Laravel Sail is nice, but fails on one of the biggest promises of Docker: consistency between environments, a.k.a. build once, run everywhere.

comic

Awesome comic by Julia Evans, please consider supporting her

Goals

  • To enable all features in Laravel with the help of external services
  • To configure this package with just a config file
  • To support multiple environments with different services (e.g. xDebug in development)
  • To create smaller images than Sail by using Alpine based Linux images
  • Let's Encrypt support
  • docker-sync on Mac host
composer require thomasmoors/anchor

Documentation

https://thomasmoors.github.io/anchor/

php artisan vendor:publish --provider="Thomasmoors\Anchor\AnchorServiceProvider" --tag="anchor-migrations"
php artisan migrate

You can publish the config file with:

php artisan vendor:publish --provider="Thomasmoors\Anchor\AnchorServiceProvider" --tag="anchor-config"

Naming

As most things Docker related get a nautical term or at least something related to boats, I thought it to be a good idea to use Anchor. As a bonus just like docker-compose you now can execute anchor up and anchor down which does exactly the same to the containers as it would do to a boat. 🙂

Usage

$anchor = new Thomasmoors\Anchor();
echo $anchor->echoPhrase('Hello, Spatie!');

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.