Please note that the code works fine when I run the code on my laptop.
The following two groups of code will work on my laptop. However, the second group (which uses my custom package) does not work on the Elastic Beanstalk docker.
Lib standard only
import ( "net/http" "os" ) func main() { port := os.Getenv("PORT") if port == "" { port = "3000" } http.ListenAndServe(":"+port, nil) }
Uses a custom package
import ( "os" "github.com/sim/handlers" ) func main() { port := os.Getenv("PORT") if port == "" { port = "3000" } handlers.ServeAndHandle(port)
Error messages:
Failed to create Docker image. aws_beanstalk / staging-app: andlers: exit status 128 [0mtime = "2015-08-14T05: 08: 17Z" level = "info" msg = "The [/ bin / sh -c go-wrapper download] command returns a non-zero code: 1". View snapshot logs for more information.
2015-08-14 01:08:15 UTC-0400 WARN Failed to create Docker image aws_beanstalk / staging-app, repeating ...
cron.yaml
version: 1 cron: - name: "task1" url: "/scheduled" schedule: "* * * * *"
source share