Flynn supports environment variables for applications
flynn env set RAILS_ENV=development
flynn env get RAILS_ENV
Install the flynn cli
L=/usr/local/bin/flynn && curl -sL -A "`uname -sp`" https://cli.flynn.io/flynn.gz | zcat >$L && chmod +x $L
Add the flynn cluster (with details you should recieve from your flynn administrator)
flynn cluster add -g flynn.companyname.io:2222 -p cNemhn3qBtmhIz8QVxzBaMQSNChEb3KAyrdrC2uliS4= default https://flynn.companyname.io 41d6df8e0028f1f8b939c84792770b1e
Create a new instance
# install https://github.com/hipchat/hipchat-cli in /usr/local/bin | |
echo '--- running specs' | |
if bundle exec rspec; then | |
echo "[Successful] $BUILDBOX_PROJECT_SLUG - Build - $BUILDBOX_BUILD_URL - Commit - $REVISION" | hipchat_room_message -t $HIPCHAT_TOKEN -r $HIPCHAT_ROOM -f "Buildbox" -c "green" | |
else | |
echo "[Failed] $BUILDBOX_PROJECT_SLUG - Build - $BUILDBOX_BUILD_URL - Commit - $REVISION" | hipchat_room_message -t $HIPCHAT_TOKEN -r $HIPCHAT_ROOM -f "Buildbox" -c "red" | |
exit 1; | |
fi |
require 'json' | |
require 'socket' | |
require 'net/http' | |
hostname = Socket.gethostname | |
api_key = ENV['API_KEY'] | |
account_name = ENV['ACCOUNT_NAME'] | |
uri = URI("https://api.buildbox.io/v1/accounts/#{account_name}/agents?api_key=#{api_key}") | |
req = Net::HTTP::Post.new(uri, initheader = {'Content-Type' =>'application/json'}) |
class ApplicationController < ActionController::Base | |
rescue_from Apartment::SchemaNotFound, :with => :render_not_found | |
end |
NAME=gof3r | |
VERSION=1.0 | |
all: build | |
build: | |
go build | |
clean: | |
rm $(NAME)_$(VERSION)_amd64.deb |