Code Monkey home page Code Monkey logo

dock's Introduction

Dock

Local development based on Docker for Laravel.

This setup includes:

  • Nginx (latest)
  • PHP 8.1
  • MySQL 8.0
  • Redis Caching
  • Redis Queue
  • Mailhog (local mail development)
  • Xdebug
  • Node, npm, npx and yarn. Use dock npm etc.
  • Laravel Dusk E2E browser testing. Use dock dusk

Installation

Prepares docker compose and your .env file for docker based development

composer require viezel/dock --dev
php artisan dock:install
dock start

Use dock stop to stop the development server.

Create a testing database

If you want to have a MySQL testing database, just run:

dock testdb

Customize Your Docker Setup

If you want to customize the docker setup, then run:

php artisan dock:publish

Commands

Running dock will give the list of commands.

Docker commands: 
 
  * build      building containers
  * install    install the app for the first time
  * up         start containers
  * start      start containers
  * down       stop containers
  * stop       stop containers
  * reset      resetting containers. Careful - you are deleting everything
  * remove     removing containers. Careful - you are deleting everything
  * logs       view logs from PHP and Nginx. Use '--follow' to tail it
  * logs-mysql view logs from MySQL. Use '--follow' to tail it
  * logs-queue view logs from the queue. Use '--follow' to tail it
  * logs-redis view logs from Redis. Use '--follow' to tail it
  * testdb     create a MySQL test database
------
 
Laravel commands: 
 
  * ssh        SSH into laravel
  * ssh-mysql  SSH into mysql
  * dusk       run dusk tests. 'dock dusk' or append: 'dock dusk --group=foo'
  * dusk-fails run dusk failing tests 
  * c          run composer commands. 'dock c dump-autoload'
  * composer   run composer commands. 'dock composer dump-autoload'
  * art        run artisan commands. 'dock art view:clear'
  * artisan    run artisan commands.
  * tinker     run tinker
  * worker     start a new queue worker
  * cc         clear cache
  * rl         route list. 'dock rl --path=api/foo/bar'
  * migrate    migrate the app
  * redis      start redis cli
  * expose     share site via Expose
 
------
 
JS commands: 
 
  * node       run node commands
  * npm        run npm commands
  * npx        run npx commands
  * yarn       run yarn commands

Credits

Credits to Chris Fidao for creating Vessel and Taylor Otwell for Sail.

License

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.