Application Management in Grackle

Applications in Grackle are set up as Linux APPNAME accounts, with a traditional home directory organized to support a wide variety of applications, and entry points from Nginx.

bin/grapp is the shell script which handles managing application accounts in a Grackle system. Like the other shell scripts that make up Grackle, grapp is easily modified to suit your specific environment.

Creating Applications

grapp new APPNAME DOMAIN.COM

To create a new application account, run the new command, and fill in the prompts.

To skip interactive mode, append an APPNAME and DOMAIN for your application to use.

grapp new APPNAME SUBDOMAIN.DOMAIN.COM

The new command also supports giving unique accounts to subdomain addresses. This allows you to set up multiple compartmentalized apps on a single domain.

If you want to point a subdomain at an existing app account, you will need to manually tweak the Nginx Service.

Removing Applications

grapp delete APPNAME

Deletes the specified application account, but preserves the data so that the new command can recreate the account if desired.

Append an optional APPNAME to skip interactive mode.

grapp purge APPNAME

The same as the delete command, except it goes scorched earth and forever deletes everything associated with the application from the system.

Append an optional APPNAME to skip interactive mode.

Utility Commands

grapp backup APPNAME

Generates a backup of the specified application and saves it as a tarball to /home/APPNAME/backups/.

grapp fix-perms APPNAME

In case you screw up the permissions of your app account's home directory structure, this will chown/chgrp/chmod everything back to their Grackle defaults.

Append an optional APPNAME to skip interactive mode.

grapp fix-perms-deep APPNAME

The same as fix-perms, only it runs recursively into your application's files. Useful for solving several Nginx errors that arise from people not setting the right permissions on their files. However, this command can be incredibly destructive if you are intentionally using something other than 750/640 in /public_html/, so use with caution!

Append an optional APPNAME to skip interactive mode.

Service Configuration

There are a handful of commands for deploying common web services & technologies:

grapp (brew-on|brew-off) APPNAME

Grants the specified application access to Homebrew.

Append an optional APPNAME to skip interactive mode.

Note: Requires Homebrew. Run grinstall brew to install Grackle's Homebrew component.

grapp (php-on|php-off) APPNAME

Enables and disables the PHP configuration for the specified application.

Append an optional APPNAME to skip interactive mode.

Note: Requires PHP. Run grinstall php to install Grackle's PHP component.

grapp (shell-on|shell-off) APPNAME

Enables and disables shell access for the specified application.

Append an optional APPNAME to skip interactive mode.

grapp (web-on|web-off) APPNAME

Enables and disables the Nginx zone for the specified application, turning on/off public web access.

Append an optional APPNAME to skip interactive mode.

Note: Requires Nginx. Run grinstall nginx to install Grackle's Nginx component.