Application Management in Grackle
Applications in Grackle are set up as Linux user 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
To create a new application account, run the new command, and fill in the prompts.
$ grapp new USERNAME DOMAIN.COM
To skip interactive mode, append a username and domain for your application to use.
$ grapp new USERNAME 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
Deletes the specified application account, but preserves the data so that the new command can recreate the account if desired.
$ grapp delete USERNAME
Append a username to the delete command, to skip interactive mode.
$ grapp purge
The same as the delete command, except it goes scorched earth and forever deletes everything associated with the application from the system.
$ grapp purge USERNAME
Append a username to the purge command, to skip interactive mode.
Utility Commands
$ grapp fix-perms
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.
$ grapp fix-perms USERNAME
Append a username to the fix-perms command, to skip interactive mode.
$ grapp fix-perms-deep
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!
$ grapp fix-perms-deep USERNAME
Append a username to the fix-perms-deep command, to skip interactive mode.
Service Configuration
There are a handful of commands for deploying common web services & technologies.
$ grapp web-on|web-off
The web-on and web-off commands enable and disable the Nginx zone for the specified application, turning on/off public web access.
$ grapp web-on|web-off USERNAME
Append a username to the web-on and web-off commands, to skip interactive mode.
$ grapp php-setup
The php-setup command generates a PHP configuration for the specified account.
$ grapp php-setup USERNAME
Append a username to the php-setup command, to skip interactive mode.
$ grapp php-on|php-off
The php-on and php-off commands enable and disable the PHP configuration for the specified account.
$ grapp php-on|php-off USERNAME
Append a username to the php-on and php-off commands, to skip interactive mode.