Generate a new Elixir project using mix and add cowboy and plug as dependencies in mix.exs:
defp deps do
[
{:cowboy, "~> 1.0.0"},
{:plug, "~> 0.8.1"}
]
endGenerate a new Elixir project using mix and add cowboy and plug as dependencies in mix.exs:
defp deps do
[
{:cowboy, "~> 1.0.0"},
{:plug, "~> 0.8.1"}
]
endI tweeted Tutum last night asking if they're looking at implementing zero downtime re-deploys for a given service. Slightly surprised by their response as it seems like a critical feature if you want to use the service for a production environment.
"not a top priority, but by Spring :)"
As Tutum currently doesn't support graceful termination of containers within a service, I was experiencing a 5-10 second window of 503 errors, so decided to use the following hack (code below) until the feature is officially implemented.
| /* | |
| Serve is a very simple static file server in go | |
| Usage: | |
| -p="8100": port to serve on | |
| -d=".": the directory of static files to host | |
| Navigating to http://localhost:8100 will display the index.html or directory | |
| listing file. | |
| */ | |
| package main |
| This playbook has been removed as it is now very outdated. |
| set :application, "My Static Content" | |
| set :servername, 'test.example.com' | |
| # no git? simply deploy a directory | |
| set :scm, :none | |
| set :repository, "." # the directory to deploy | |
| # using git? deploy from local git repository | |
| # set :scm, :git | |
| # set :repository, 'file//.' # path to local git repository |