Giter Site home page Giter Site logo

laradock_env's Introduction

Updates 2020: Laradock Multi

is a more powerful wrapper which contains the functionality of Laradock ENV

Laradock ENV 2.0

Laradock ENV is a wrapper with command tools for build AND management of Laradock

Use example

./up.sh - Run Laradock

ALIAS: cmd/up.sh - from project path for each command

  • Regular laradock start
  • Install if needed
  • Start http://localhost
  • Connect to workspace

./stop.sh - Stop Laradock

./restart.sh - Restart Laradock

./ps.sh - List of Laradock containers

./logs.sh - Logs of Laradock containers

./install.sh

  • Install/Upgrade/Rebuild Laradock
  • Configure Laradock with developer env (include xdebug) for current project
  • Start Laradock
  • Build backend with php composer and artisan DB (migration and seed)

./fix.sh - Fix most of problems with any containers

  • stop, rm, pull, rebuild without cache
  • very slow Benchmark: .laradock/rebuild_containers.sh, run two times
    • windows+ssd:
      • time laradock/.laradock/rebuild_containers.sh: 28 sec (second: 15 sec)
      • time laradock/.laradock/rebuild_containers.sh --fix: 9m 2sec

./conn.sh $service - Connect to Laradock service terminal by name ./conn.sh workspace - Connect to workspace terminal with laradock user ./conn.sh workspace root - Connect to workspace terminal with root user

./conn/*.sh - Templates with terminal for Laradock containers ./conn/workspace.sh - connect to workspace terminal with laradock user

./app/*.sh - Laradock command for application ./app/install-composer.sh - Build PHP App ./app/purge-postgres.sh - Purge Postgres DB ./app/purge-beanstalkd.sh - Purge BeanstalkD with consistent storage

.laradock/*.sh - Laradock Env internal utils .laradock/uninstall.sh - Laradock uninstall with container purge

Structure

Important: You can change "Laradock ENV" path with .env config

.
├── laravel                # Project name, your project root
│   ├── .git                    # Your project .git
│   ├── cmd                     # Console utils
│   │   ├── app*                 # Your app commands
│   │   ├── dev*                 # Your developer commands
│   │   ├── cloud*               # Your cloud env commands (We use Kubernates)
-------------------------------------------------------------------------------------
│   │   └── laradock            # Laradock_env root (THIS PROJECT)
│   │       ├── .env*               # install with: cp .env_example .env
│   │       ├── .env.example
│   │       ├── .git                # Laeadock_env git  
│   │       ├── .laradock           # Laradock_env internal utils
│   │       │   ├── customize.sh        # Example with customize laradock. Not used in this package
│   │       │   ├── env.sh              # Prepare env
│   │       │   ├── rebuild.sh          # Renew all containers and prepare APP (migration, seeds)
│   │       │   ├── rebuild_containers.sh # Renew all containers
│   │       │   ├── uninstall.sh        # Uninstall Laradock and remove containers and DB state
│   │       │   └── upgrade.sh          # Upgrade Laradock or load actual version 
│   │       ├── app                 # Laradock command for application
│   │       │   ├── install-*.sh        # Prepare App things
│   │       │   ├── install-composer.sh # composer install
│   │       │   └── purge-*.sh          # Purge DB state
│   │       ├── conn                # Connect to containera
│   │       │   └── *.sh                # Connection with different containers terminal
│   │       │   └── workspace.sh        # Application workspace bash
│   │       ├── fix.sh              # Fix most of problems with any containers
│   │       ├── install.sh          # Prepare last laradock version
│   │       ├── LICENSE             # MIT LICENSE
│   │       ├── logs.sh             # Laradock Logs
│   │       ├── ps.sh               # Laradock container list
│   │       ├── README.md           # This document
│   │       ├── restart.sh          # Laradock restart
│   │       ├── stop.sh             # Laradock stop 
│   │       └── up.sh               # Laradock run
-------------------------------------------------------------------------------------
│   └── public              # Public HTTP root path
│       └── index.php           # default http script
├── laradock_laravel*       # Autocreated Laradock root
└── .gitignore              # Add `laradock_laravel*` +/- `cmd/laradock` to gitignore

INSTALL

Run in your project path

git submodule add git://github.com/bagart/laradock_env.git cmd/laradock
cmd/laradock/up.sh

Alternative

git clone git://github.com/bagart/laradock_env.git cmd/laradock
cmd/laradock/up.sh
Optional

sync with project

rm -rf cmd/laradock/.git
git add cmd/laradock/*

Configuration

Configure Laradock ENV

Customize Laradock PATH

cp cmd/laradock/.env.example cmd/laradock/.env

Configure Laradock

file: laravel/.env

DB_CONNECTION=pgsql
DB_HOST=postgres
DB_DATABASE=default
DB_USERNAME=default
DB_PASSWORD=secret

BROADCAST_DRIVER=redis
CACHE_DRIVER=redis
SESSION_DRIVER=redis

REDIS_HOST=redis
REDIS_PASSWORD=null
REDIS_PORT=6379 

#for use with workers: redis|beanstalkd|etc
QUEUE_CONNECTION=sync

laradock_env's People

Contributors

bagart avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

laradock_env's Issues

Use submodule for laradock

Would it make sense to use a submodule/symlink to pull the laradock source instead of maintaining two source trees and merging? If so, I could work on that and make a PR :)

Cool project btw, makes it where I don't need to copy and paste the directory for different envs 👍

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.