Commands

{% highlight sh %} ufo ship ufo ps ufo current ufo apps ufo scale ufo docker build ufo tasks build ufo rollback ufo destroy {% endhighlight %}

variables/base.rb

{% highlight ruby %} @image = helper.full_image_name # includes the git sha tongueroo/demo-ufo:ufo-[sha]. @cpu = 128 @memory_reservation = 256 @environment = helper.env_vars(%Q{ RAILS_ENV=production SITE=awesome }) {% endhighlight %}

templates/main.json.erb

{% highlight json %} { "family": "<%= @family %>", "containerDefinitions": [ { "name": "<%= @name %>", "image": "<%= @image %>", <% if @cpu %> "cpu": <%= @cpu %>, <% end %> "command": <%= @command.to_json %>, <% if @environment %> "environment": <%= @environment.to_json %>, <% end %> "essential": true } ] } {% endhighlight %}

template_definitions.rb

{% highlight ruby %} task_definition "example-web" do source "main" variables( family: task_definition_name, name: "web", awslogs_group: "ecs/example-web", awslogs_stream_prefix: "example", command: ["bin/web"] ) end {% endhighlight %}