iLab Media cloud env file location

I’m setting up a site with the excellent iLab Media Cloud plugin and Imgix. iLab recommends using environment variables instead of putting settings into the plugin via wp-admin.

  1. If I’m using Trellis would the env info go into trellis/group_vars/all/main.yml?
  2. Is it worth making a new file trellis/group_vars/all/ilab.yml?
  3. Is there a difference in syntax from .env to .yml?

You’ll wanna put them in the vault.yml for the given environment(s) (e.g. group_vars/production/vault.yml) — that way they stay encrypted. The syntax between them are a bit different, check out the Roots’ Salts generator for an example of the difference: https://roots.io/salts.html

2 Likes

Oh nice pointer re syntax - thanks @knowler!

So given that this would be for serving images it should be added to all three environments yes? Or would it normally only be production?