Skip to content

Commit

Permalink
Revert "AWS Beanstalk"
Browse files Browse the repository at this point in the history
  • Loading branch information
gewo committed Dec 10, 2015
1 parent 616effb commit 89e0ba8
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 67 deletions.
4 changes: 0 additions & 4 deletions .gitignore

This file was deleted.

10 changes: 3 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
FROM golang:1.4.2-onbuild
FROM golang:1.4.2

RUN go get github.com/tools/godep
RUN cd /go/src/app
RUN godep restore
RUN go build -o bin/application
ENV PORT 3000
EXPOSE 3000
CMD ["./run"]

CMD cd /go/src/app && godep restore && go install && app
7 changes: 0 additions & 7 deletions application.go → api.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,18 +107,11 @@ type Impl struct {

func (i *Impl) InitDB() {
var err error

connection := os.Getenv("DATABASE_URL")

i.DB, err = gorm.Open("postgres", connection)
if err != nil {
log.Fatalf("Got error when connect database, the error is '%v'", err)
}

if err = i.DB.DB().Ping(); err != nil {
log.Fatalf("Unable to verify connection to database: '%v'", err)
}

i.DB.LogMode(true)
}

Expand Down
45 changes: 0 additions & 45 deletions doc/AWS_EB.md

This file was deleted.

4 changes: 0 additions & 4 deletions run

This file was deleted.

0 comments on commit 89e0ba8

Please sign in to comment.