2017 © Pedro Peláez
 

project rocket-tools

RocketFirm tools to jumpstart with development

image

naffiq/rocket-tools

RocketFirm tools to jumpstart with development

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

RocketTools

This little php script helps you generate and manage nginx configuration for your project., (*1)

Installation

Via composer

Install this project globally by running, (*2)

$ composer global require naffiq/rocket-tools

Make sure, that you have your composer's bin directory linked to your PATH environment variable., (*3)

Download PHAR executable

You can get the latest version this utility on releases page. Just grab rocket-tools.phar and put it to your /usr/local/bin directory (if you're on macOS/Linux) or just any folder listed in your PATH on Windows., (*4)

Usage

Check the version by running, (*5)

$ rocket-tools --version

Generate nginx configurations

You can create nginx config in sites-available for your Yii2 project (basic for now) by running, (*6)

$ rocket-tools nginx:generate <server-name> [<config-name>] [<document-root>] [<sites-available>] [<port>] [<fast-cgi-pass>]

This command takes following arguments: - server-name Domain (server_name) for newly created app - config-name File name for your config file. If not set first server-name is used - document-root Document root for your project. If not set, taken from run directory. default: "CURRENT/RUNNING/DIRECTORY" - sites-available Path of sites-available folder default: "/etc/nginx/sites-available" - port Listen port. default: 80 - fast-cgi-pass Fast CGI pass. default: "unix:/var/run/php7.1-fpm.sock", (*7)

You can override defaults by configuring rocket-tools with [config:update](#Configuring RocketTools) command., (*8)

Run this command to link config from sites-available to sites-enabled folder:, (*9)

$ rocket-tools nginx:link <site-name> [<sites-available>] [<sites-enabled>] 

Arguments: - site-name Configuration file name - sites-available Sites available directory (without .conf) default: "/etc/nginx/sites-available" - sites-enabled Sites enabled directory default: "/etc/nginx/sites-enabled", (*10)

To unlink config run:, (*11)

$ rocket-tools nginx:unlink <site-name> [<sites-enabled>]

Arguments: - site-name Configuration file name - sites-enabled Sites enabled directory default: "/etc/nginx/sites-enabled", (*12)

You can override defaults by configuring rocket-tools with [config:update](#Configuring RocketTools) command., (*13)

Configuring RocketTools

To override default configurations run:, (*14)

$ config:update <config-name> <config-value>
$ config:set <config-name> <config-value>

Arguments: - config-name Configuration key - config-value Configuration value, (*15)

So in order to override nginx:generate configurations simply take it's argument (for example sites-available), add nginx- prefix to it and use it as configuration key. The only exception is fast-cgi-pass, which is related to php-fpm and hand, (*16)

Example:, (*17)

$ config:update nginx-sites-available /usr/local/etc/nginx/sites-available

There is also a command for viewing your current configuration:, (*18)

$ config:get [<config-name>]

Arguments: - config-name Configuration key. If not set, displays all config values., (*19)

Configuration files

All of the configuration files are stored in $HOME/.rocket-tools/ directory. If you want to change it, set ROCKET_TOOLS_HOME environment variable to desired path., (*20)

Updating RocketTools

If you are using composer run:, (*21)

$ composer global update naffiq/rocket-tools

Just like composer.phar, rocket-tools.phar file contains self-update command, if you manually downloaded it from releases page., (*22)

Under the hood:

TODO:

  • [ ] Add default templates for nginx configs (Yii2 advanced, Laravel, Symfony)
  • [ ] Custom templates for nginx config
  • [ ] Apache2 config generator
  • [ ] Automated MySQL DB/User creation
  • [ ] Automated .env file generator
  • [ ] hosts file editor
  • [ ] All of the steps in one command master

License: MIT

Crafted with ♥, (*23)

The Versions

26/05 2017

dev-master

9999999-dev

RocketFirm tools to jumpstart with development

  Sources   Download

MIT

The Requires

 

The Development Requires

26/05 2017

v0.2.2

0.2.2.0

RocketFirm tools to jumpstart with development

  Sources   Download

MIT

The Requires

 

The Development Requires

26/05 2017

v0.2.1

0.2.1.0

RocketFirm tools to jumpstart with development

  Sources   Download

MIT

The Requires

 

The Development Requires

25/05 2017

v0.2.0

0.2.0.0

RocketFirm tools to jumpstart with development

  Sources   Download

MIT

The Requires

 

The Development Requires

25/05 2017

v0.1.2

0.1.2.0

RocketFirm tools to jumpstart with development

  Sources   Download

MIT

The Requires

 

The Development Requires

25/05 2017

v0.1.1

0.1.1.0

RocketFirm tools to jumpstart with development

  Sources   Download

MIT

The Requires

 

The Development Requires

25/05 2017

v0.1.0

0.1.0.0

RocketFirm tools to jumpstart with development

  Sources   Download

MIT

The Requires

 

The Development Requires