pkeidel/laradockctl

Allows to manage docker container for the development over cli - with help of the amazing laradock project

0.9.1 2023-02-18 18:59 UTC

This package is auto-updated.

Last update: 2024-10-18 22:35:17 UTC


README

MIT License Latest Version on Packagist Total Downloads

This package does the following things:

  • download laradock
  • detect which services are needed and configure them

At the moment it supports:

  • Laravel

For laravel it also does:

  • configure your database connection
  • configure your redis connection

How it works:

ProjectReader instances inspect your project and return what services are needed. Configs are adjusted to start these services via php artisan laradock:up.

Install

composer require pkeidel/laradockctl --dev

Usage

  • laradock:install
  • laradock:configure
  • laradock:up

Commands

There are the following artisan commands:

  • laradock:install Installs laradock from github. If git is found it uses git else it downloads it as zip file
  • laradock:configure Enables the specified services and write the needed configuration to ./.env and laradock/.env
  • laradock:up Starts all your containers
    • laradock:up --only="php-fpm nginx"
  • laradock:exec Executes 'bash' in 'php-fpm' container
    • laradock:exec nginx Executes 'bash' in 'nginx' container
    • laradock:exec nginx --cmd=sh Executes 'sh' in 'nginx' container
  • laradock:logs tail -f log output for all your containers
  • laradock:update Updates laradock. Either via git or via zip download

There are also these commands but you may not need them for normal usage:

  • laradock:setenv Sets the value of a specified key in laradock/.env