diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..843a358 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,7 @@ +build/ +target/ +node_modules/ +.git* +.bundler/ +*.log +bin/ diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..71d8a0d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM gobuffalo/buffalo:latest + +RUN mkdir -p $GOPATH/src/github.com/bscott/golangflow +WORKDIR $GOPATH/src/github.com/bscott/golangflow +ADD . . +RUN npm install +RUN buffalo build -o bin/app +CMD ./bin/app \ No newline at end of file diff --git a/actions/auth.go b/actions/auth.go index 86eaa5d..924b467 100644 --- a/actions/auth.go +++ b/actions/auth.go @@ -47,3 +47,5 @@ func AuthCallback(c buffalo.Context) error { // Do something with the user, maybe register them/sign them in return c.Render(200, r.JSON(user)) } + + diff --git a/app.json b/app.json index 07a0d20..ee92991 100644 --- a/app.json +++ b/app.json @@ -10,3 +10,5 @@ "addons": ["heroku-postgresql:hobby-dev"], "buildpacks": [] } + + diff --git a/main.go b/main.go index 4edc914..a4afc56 100644 --- a/main.go +++ b/main.go @@ -14,6 +14,7 @@ func init() { setenv.File(".setenv") } + func main() { port := envy.Get("PORT", "3000") log.Printf("Starting golangflow on port %s\n", port)