brair/pocket.sh

收集了用于在 Symfony 框架中创建项目的常用命令。

dev-master 2020-02-12 17:07 UTC

This package is not auto-updated.

Last update: 2024-09-27 20:06:32 UTC


README

这组脚本包含在生产服务器上处理应用程序所需的所有工具。

配置

  1. app/bin/ 中创建文件 pocket.sh
  2. 将以下代码放入文件中
    #!/bin/bash
    

初始化

ROOT_DIR="./_pocket" APP_DIR="../"

source "../vendor/brair/pocket.sh/main.sh"

3. get pocket.sh

composer req brair/pocket.sh:latest

4. Now you can usage pocket.sh commands
***

### main
usage: ./pocket.sh [ app | git | docker ]

Examples:
  ./main.sh app              # use application commands
  ./main.sh git              # use git commands
  ./main.sh docker           # use docker commands

### app
usage: ./pocket.sh app [ install | reset | update ]

Examples:
  ./main.sh app install           # install dependency and run docker containers
  ./main.sh app reset             # remove dependency and all docker containers & images
  ./main.sh app update            # pull origin from repository

### docker
usage: ./pocket.sh docker [ start | reset ]

Examples:
  ./main.sh docker start             # run all containers for app
  ./main.sh docker reset             # remove all docker containers & images

### git
usage: ./pocket.sh git [ release ]

Examples:
  ./main.sh git release             # create new release from dev branch and merge to master

***
### other
##### usage functions in scripts
usage: message "EXAMPLE" [ -r | -b | -m ]

Examples:
  showInfo "EXAMPLE" -r        # console message with red backgound
  showInfo "EXAMPLE" -b        # console message with blue backgound
  showInfo "EXAMPLE" -m        # console message with magenta backgound