Skip to content

Instantly share code, notes, and snippets.

@SeyZ
Last active March 28, 2019 13:45
Show Gist options
  • Save SeyZ/4ac7702fa0b37ba0083c8441b87c19d0 to your computer and use it in GitHub Desktop.
Save SeyZ/4ac7702fa0b37ba0083c8441b87c19d0 to your computer and use it in GitHub Desktop.
Forest Admin Toolbelt example
#!/bin/bash
FOREST_EMAIL=sandro@munda.me FOREST_PASSWORD=lumberjack forest login
envsecret=$(forest environments:create -p 82 -n TestFeatureX -u http://my.application.com:4294 | awk '$1 ~ /^ *FOREST_ENV_SECRET/ {print $2}')
forest schema:apply --secret $envsecret
envid=$(forest environments:list -p 82 | awk '$2 ~ "TestFeatureX" {print $1; exit}')
forest environments:copy-layout 2200 $envid -p 82 --force
@SeyZ
Copy link
Author

SeyZ commented Feb 8, 2019

Then, you should start your app without forgetting to inject dynamically the FOREST_ENV_SECRET environment variable. For example in rails: FOREST_ENV_SECRET=$envsecret bundle exec rails s or in node: FOREST_ENV_SECRET=$envsecret npm start

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment