This is a simple scripts to automatise work witch Laradock on whole projects.
This script development for usage witch git, docker and docker-compose utilities.
You may run it from your PATH as Unix BASH or Windows CMD script by goodra name.
Specific project Laradock initialised into your PWD in ./goodra or user specific ~/.goodra catalog by PWD basename.
By default, DATA_PATH_HOST configured to save state in Laradock project place.
Scrip defines some Laradock environments:
APP_CODE_PATH_HOSTas current PWD.COMPOSE_PROJECT_NAMEas project name.PHP_IDE_CONFIGpresetserverNameas project name.
Also, append new environments to Laradock project:
LARADOCK_ORIGINis Laradock source repository link.LARADOCK_BRANCHis Laradock source repository tag.LARADOCK_SERVICESis Laradock services list for up. By default,workspaceonly.
goodra ${project:="."} ${command:="init"} ${arguments}First argument is a Laradock project name.
By default, is a . (PWD basename).
Second argument is a command to apply on Laradock project.
It's specific a .sh file name.
By default, is a init (Laradock project initialise).
Another arguments will receive a command script.
goodra . initor
goodra .or
goodraThis command apply default Laradock preset (from default catalog) and initialised Git repository.
If files already exists they will use by priority.
goodra myLaradock initor
goodra myLaradockAgainst myLaradock you may specific your own Laradock project name.
This command also initialised Laradock, but for user specific ~/.goodra/myLaradock catalog.
Command use LARADOCK_ORIGIN and LARADOCK_BRANCH environments from Laradock .env.
goodra . upThis command call docker-compose up with Laradock project environments preset.
Command use LARADOCK_SERVICES environment from Laradock .env.
Also, as init this command may applied for user specific Laradock project.
goodra . exec bashor
goodra . execThis command call docker-compose exec on Laradock workspace container as laradock user.
By default, command specific bash in arguments.
Also, as init this command may applied for user specific Laradock project.
goodra . downThis command call docker-compose down on Laradock project.
Also, as init this command may applied for user specific Laradock project.
Laradock presets witch project named branch, so keep changes in Git.
All existing .sh files in Laradock project may used as commands by name.
Command scripts will receive environments from Laradock .env file.