Skip to content

Commit

Permalink
Using go dep (#26)
Browse files Browse the repository at this point in the history
* Using go dep

* Separate dependecy and application docker layers

* Empty line
  • Loading branch information
filiphaftek authored Jun 19, 2018
1 parent b46644f commit a1fc42e
Show file tree
Hide file tree
Showing 404 changed files with 141 additions and 196,519 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
rabbit-amazon-forwarder
samples
vendor/
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
FROM golang:1.9.2-alpine3.6 AS golang-build
RUN mkdir -p /go/src/github.com/AirHelp/rabbit-amazon-forwarder
WORKDIR /go/src/github.com/AirHelp/rabbit-amazon-forwarder
RUN apk --no-cache add git && go get -u github.com/golang/dep/cmd/dep
COPY Gopkg.toml Gopkg.lock ./
RUN dep ensure -v -vendor-only
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o rabbit-amazon-forwarder .

Expand Down
5 changes: 5 additions & 0 deletions Dockerfile-test
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
FROM golang:1.9.2-alpine3.6
WORKDIR /go/src/github.com/AirHelp/rabbit-amazon-forwarder
RUN apk --no-cache add git && go get -u github.com/golang/dep/cmd/dep
COPY Gopkg.toml Gopkg.lock ./
RUN dep ensure -v -vendor-only
COPY . .

89 changes: 89 additions & 0 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 42 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Gopkg.toml example
#
# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
# for detailed Gopkg.toml documentation.
#
# required = ["github.com/user/thing/cmd/thing"]
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
#
# [[constraint]]
# name = "github.com/user/project"
# version = "1.0.0"
#
# [[constraint]]
# name = "github.com/user/project2"
# branch = "dev"
# source = "github.com/myfork/project2"
#
# [[override]]
# name = "github.com/x/y"
# version = "2.4.0"
#
# [prune]
# non-go = false
# go-tests = true
# unused-packages = true


[[constraint]]
name = "github.com/aws/aws-sdk-go"
version = "1.14.7"

[[constraint]]
name = "github.com/sirupsen/logrus"
version = "1.0.5"

[[constraint]]
branch = "master"
name = "github.com/streadway/amqp"

[prune]
go-tests = true
unused-packages = true
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ When making subscription to SNS -> SQS/HTTP/HTTPS set `Raw message delivery` to
## Build docker image

```bash
make release
make build
```

## Run
Expand Down
6 changes: 0 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ services:
context: .
dockerfile: Dockerfile-test
command: go test ./...
volumes:
- ./:/go/src/github.com/AirHelp/rabbit-amazon-forwarder
depends_on:
- fmt
- vet
Expand All @@ -26,12 +24,8 @@ services:
context: .
dockerfile: Dockerfile-test
command: go vet -v ./...
volumes:
- .:/go/src/github.com/AirHelp/rabbit-amazon-forwarder
fmt:
build:
context: .
dockerfile: Dockerfile-test
command: gofmt ./...
volumes:
- .:/go/src/github.com/AirHelp/rabbit-amazon-forwarder
202 changes: 0 additions & 202 deletions vendor/github.com/aws/aws-sdk-go/LICENSE.txt

This file was deleted.

3 changes: 0 additions & 3 deletions vendor/github.com/aws/aws-sdk-go/NOTICE.txt

This file was deleted.

Loading

0 comments on commit a1fc42e

Please sign in to comment.