Skip to content

Commit

Permalink
Upgrade to go Modules
Browse files Browse the repository at this point in the history
  • Loading branch information
philnielsen committed Feb 24, 2019
1 parent 12bd082 commit 0b3addc
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 81 deletions.
20 changes: 6 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
FROM golang:latest AS builder
FROM golang:1.11

ENV DEP_VERSION=v0.3.2

RUN curl -fsSL -o /usr/local/bin/dep https://github.com/golang/dep/releases/download/${DEP_VERSION}/dep-linux-amd64 && chmod +x /usr/local/bin/dep

RUN mkdir -p /go/src/github.com/trisongulate
WORKDIR /go/src/github.com/trisongulate

COPY Gopkg.toml Gopkg.lock ./
# copies the Gopkg.toml and Gopkg.lock to WORKDIR

RUN dep ensure -vendor-only
RUN mkdir -p /trisongulate
WORKDIR /trisongulate

ADD . .
RUN go install .
RUN go mod download
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build

ENTRYPOINT [ "/go/bin/trisongulate" ]
ENTRYPOINT [ "/trisongulate/trisongulate" ]
39 changes: 0 additions & 39 deletions Gopkg.lock

This file was deleted.

22 changes: 0 additions & 22 deletions Gopkg.toml

This file was deleted.

11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ Take three songs and recommend a playlist of songs.

### To Run

1. Install [dep](https://github.com/golang/dep)
1. `dep ensure`
1. fill in local.env with Spotify creds
1. `docker-compose up --build`
1. Enjoy those tunes that are spit out!
1. `go build ./..`
2. fill in local.env with Spotify creds
3. `docker-compose up --build`
4. Enjoy those tunes that are spit out!

#### Awesome Libraries Used

- https://github.com/zmb3/spotify
- https://github.com/zmb3/spotify
10 changes: 10 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module github.com/philnielsen/trisongulate

require (
github.com/golang/protobuf v0.0.0-20171113180720-1e59b77b52bf // indirect
github.com/zmb3/spotify v0.0.0-20171114010546-40a7a169da26
golang.org/x/net v0.0.0-20171212005608-d866cfc389ce // indirect
golang.org/x/oauth2 v0.0.0-20171219020721-0448841f0cbe
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 // indirect
google.golang.org/appengine v1.0.0 // indirect
)
12 changes: 12 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
github.com/golang/protobuf v0.0.0-20171113180720-1e59b77b52bf h1:pFr/u+m8QUBMW/itAczltF3guNRAL7XDs5tD3f6nSD0=
github.com/golang/protobuf v0.0.0-20171113180720-1e59b77b52bf/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/zmb3/spotify v0.0.0-20171114010546-40a7a169da26 h1:T9W290lZpp/8vRIU6lfFMNz5HzMIbINACFxldqnrRqg=
github.com/zmb3/spotify v0.0.0-20171114010546-40a7a169da26/go.mod h1:pHsWAmY9PfX7i/uwPZkmWrebc8JbK8FppKbvyevwzSU=
golang.org/x/net v0.0.0-20171212005608-d866cfc389ce h1:4g3VPcb++AP2cNa6CQ0iACUoH7J/3Jxojq0mmJun9A4=
golang.org/x/net v0.0.0-20171212005608-d866cfc389ce/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/oauth2 v0.0.0-20171219020721-0448841f0cbe h1:1vMd61SQS1PtYwB1r/u+VckSuYS//RLbirw5o7dAuaM=
golang.org/x/oauth2 v0.0.0-20171219020721-0448841f0cbe/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
google.golang.org/appengine v1.0.0 h1:dN4LljjBKVChsv0XCSI+zbyzdqrkEwX5LQFUMRSGqOc=
google.golang.org/appengine v1.0.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=

0 comments on commit 0b3addc

Please sign in to comment.