improv api, datastore, postgres, runner

This commit is contained in:
Pedro Nasser
2016-07-21 21:18:02 -03:00
parent 154fd82b68
commit 5a13e2c0cc
10 changed files with 215 additions and 127 deletions

View File

@@ -87,6 +87,10 @@ func DockerRun(route *models.Route, c *gin.Context) error {
// log.WithField("payload", "---"+string(payload)+"---").Infoln("incoming request")
// log.WithField("image", image).Infoln("About to run using this image")
for k, v := range route.Headers {
c.Header(k, v[0])
}
// TODO: swap all this out with Titan's running via API
cmd := exec.Command("docker", "run", "--rm", "-i", "-e", fmt.Sprintf("PAYLOAD=%v", string(payload)), image)
stdout, err := cmd.StdoutPipe()