deis/deis — pull request #2431 by aledbf (2014-11-08 18:11:02+00:00)
Title: feat(controller): read Procfile from docker images during deis pull

Deis includes a way to "pull" a docker image from any repository and deploy that image as a build for any app.
The "problem" is that only allows `cmd` as process type. So if I'm using deis in development is not possible to use `deis pull` to transfer that image to production unless the app uses cmd as process type.
This PR allows the introspection of the file `/app/Procfile` inside `deis pull` and update the procfile definition (in postgres) so it's possible to do `deis scale web=1` after `deis pull` (without this PR is not possible)

*Example:*
```console
$ cat Procfile
web: node index
cron: node cron
```

`deis pull dev-registry.deis.io:5000/app-dev-demo:v39 --app=app-demo`

```console
Nov 08 11:35:03 nodo-3 sh[8282]: INFO app-demo: build app-demo-f82b536 created
Nov 08 11:35:03 nodo-3 sh[8282]: INFO Procfile structure: { "web": 1, "cron": 1 }
Nov 08 11:35:03 nodo-3 sh[8282]: INFO app-demo: release app-demo-v4 created
Nov 08 11:35:04 nodo-3 sh[8282]: 172.30.1.4 "POST /v1/apps/app-demo/builds HTTP/1.1" 201 - "python-requests/2.4.3 CPython/2.7.5 Darwin/14.0.0"
```

So the version 39 in development is 4 in production.