Skip to content

Commit dea4dcd

Browse files
committed
Adds dockerfile for tradeclient, adds support for docker builds in makefile.
1 parent d483fbf commit dea4dcd

File tree

121 files changed

+96
-103956
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+96
-103956
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
*.swp
22
tmp
33
vendor
4-
bin
4+
bin
5+
.exe

.travis.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,23 @@
11
language: go
2-
sudo: false
3-
4-
go:
5-
- 1.9
6-
- tip
72

83
matrix:
94
allow_failures:
105
- go: tip
6+
fast_finish: true
7+
include:
8+
- go: 1.11.x
9+
env: GO111MODULE=on
10+
- go: 1.12.x
11+
env: GO111MODULE=on
12+
- go: 1.13.x
13+
- go: tip
14+
15+
before_install:
16+
- if [[ "${GO111MODULE}" = "on" ]]; then mkdir "${HOME}/go"; export GOPATH="${HOME}/go"; fi
17+
- go mod download
18+
- if [[ "${GO111MODULE}" = "on" ]]; then export PATH="${GOPATH}/bin:${GOROOT}/bin:${PATH}"; fi
19+
- travis_retry go get -u golang.org/x/lint/golint
20+
21+
script: make test
1122

12-
script: make build
23+
sudo: false

Gopkg.lock

Lines changed: 0 additions & 196 deletions
This file was deleted.

Gopkg.toml

Lines changed: 0 additions & 70 deletions
This file was deleted.

Makefile

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,30 @@
11
SHELL := /bin/bash
22

3-
format:
4-
${GOPATH}/bin/goimports -w $(shell find . -type f -name '*.go' -not -path "./vendor/*")
5-
6-
get-dep:
7-
GO111MODULE=off go get -u github.com/golang/dep/cmd/dep
8-
9-
get-lint-tools:
10-
GO111MODULE=off go get -u golang.org/x/lint/golint
11-
GO111MODULE=off go get -u github.com/fzipp/gocyclo
12-
GO111MODULE=off go get -u golang.org/x/tools/cmd/goimports
3+
test: lint vet build
134

145
lint:
6+
golint -set_exit_status ./...
7+
8+
vet:
159
go vet ./...
16-
gocyclo -over 15 $(shell find . -iname '*.go' -type f | grep -v /vendor/)
17-
gocyclo -avg $(shell find . -iname '*.go' -type f | grep -v /vendor/)
18-
golint -set_exit_status $(shell go list ./... | grep -v mock)
19-
goimports -l $(shell find . -type f -name '*.go' -not -path "./vendor/*")
2010

21-
dep:
22-
dep ensure -v -vendor-only
11+
build: clean
12+
go build -v -o ./bin/executor ./cmd/executor
13+
go build -v -o ./bin/ordermatch ./cmd/ordermatch
14+
go build -v -o ./bin/tradeclient ./cmd/tradeclient
2315

2416
clean:
25-
rm -rf bin/*
26-
rm -rf tmp/*
17+
rm -rf ./bin
18+
rm -rf ./tmp
2719

28-
build:
20+
# Commands for docker images.
21+
# ----------------------------
22+
build-linux:
2923
GOOS=linux GOARCH=amd64 go build -v -o ./bin/executor ./cmd/executor
24+
GOOS=linux GOARCH=amd64 go build -v -o ./bin/ordermatch ./cmd/ordermatch
25+
GOOS=linux GOARCH=amd64 go build -v -o ./bin/tradeclient ./cmd/tradeclient
3026

31-
dock: build
32-
docker build -t executor:latest -f ${GOPATH}/src/github.com/quickfixgo/examples/cmd/executor/Dockerfile ${GOPATH}/src/github.com/quickfixgo/examples
27+
build-docker: clean build-linux
28+
docker build -t quickfixgo/executor:latest -f ./cmd/executor/Dockerfile .
29+
docker build -t quickfixgo/ordermatch:latest -f ./cmd/ordermatch/Dockerfile .
30+
docker build -t quickfixgo/tradeclient:latest -f ./cmd/tradeclient/Dockerfile .

cmd/tradeclient/Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM golang:alpine
2+
3+
ADD config config
4+
5+
ADD bin/tradeclient /tradeclient
6+
7+
ENTRYPOINT ["/tradeclient"]

go.mod

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
module github.com/quickfixgo/examples
2+
3+
go 1.13
4+
5+
require (
6+
github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8
7+
github.com/quickfixgo/enum v0.0.0-20171007195659-2cbed3730c3e
8+
github.com/quickfixgo/field v0.0.0-20171007195410-74cea5ec78c7
9+
github.com/quickfixgo/fix40 v0.0.0-20171007200002-cce875b2c2e7
10+
github.com/quickfixgo/fix41 v0.0.0-20171007212429-b272ca343ed2
11+
github.com/quickfixgo/fix42 v0.0.0-20171007212724-86a4567f1c77
12+
github.com/quickfixgo/fix43 v0.0.0-20171007213001-a7ff4f2a2470
13+
github.com/quickfixgo/fix44 v0.0.0-20171007213039-f090a1006218
14+
github.com/quickfixgo/fix50 v0.0.0-20171007213247-d09e70735b64
15+
github.com/quickfixgo/fixt11 v0.0.0-20171007213433-d9788ca97f5d
16+
github.com/quickfixgo/quickfix v0.6.1-0.20190718201950-819c58d51b95
17+
github.com/quickfixgo/tag v0.0.0-20171007194743-cbb465760521
18+
github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24
19+
golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7
20+
)

0 commit comments

Comments
 (0)