Advanced Service Configuration

For advanced users, Indigo allows unlimited control over the service configurations, by providing the ability to override the underlying service config files.

Overview

Indigo allows you to provide custom configuration overrides, at the filesystem level. Do so requires a general understanding of how Indigo manages service configuration.

  • Indigo ships with clean configurations for each service, stored inside the application bundle (Indigo.app/Contents/Resources/Services)
  • when you include a service in a stack, Indigo saves a copy of each config into a central location (~/.indigo/stacks)
  • Indigo then merges any service configurations found inside the stack configuration file
  • finally, Indigo customises these stack config files for each stack as needed (using {{mustache}} templating)

TLDR; The .indigostack files are actually bundles, and if correctly-named directories are found inside the bundle, Indigo will recursively merge them over the top of its own configuration.

An example scenario

As an example, a workproject.indigostack bundle could contain the following manually-added directory structures and files:

  • php_B058/etc/conf.d/php+pcre.ini for advanced PHP configuration
  • php_A969/etc/php.ini to configure a higher memory_limit for another PHP service
  • system/nginx_reverse_proxy/conf/sites-enabled/custom.conf to customise the system stack’s reverse proxy configuration

Step-by-step Guide

Using a PHP service as an example:

A. Prepare the new config

  1. locate the source configuration files for the service. These are inside the Indigo app bundle at Indigo.app/Contents/Resources/Services eg Indigo.app/Contents/Resources/Services/php/8.1.5/etc/php.ini.
  2. copy that file to your Desktop, together with its containing folder(s). The result should be something like ~/Desktop/php/8.1.5/etc/php.ini
  3. edit the config file (in this example php.ini) however you wish
  4. additionally, it’s possible to add totally new config files. These need to appear in the file system locations that the service would normally expect to find them.

B. Rename new config parent directory

  1. Indigo gives each service a unique ID when it is added to a stack. To find this, in Indigo right-click the service in the rack and select “Show Compiled in Finder”
  2. take note of the service folder name eg php_B058
  3. rename the folder on your desktop to match ie from php to php_B058

C. Move the new config into your indigostack file

  1. in Indigo, right-click on the stack and select “Show in Finder” to locate its .indigostack file
  2. show the contents of the .indigostack file: right-click it in the Finder and select “Show Package Contents”
  3. move the new config from your Desktop into your .indigostack bundle eg mystack.indigostack/php_B058/etc/php.ini
  4. Indigo should notice the change and automatically rebuild your stack. If not, in Indigo right-click the stack and select “Rebuild…”