forked from hound-search/hound
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from EasyPost/new_hound2
Pull forward custom hound fork
- Loading branch information
Showing
54 changed files
with
17,246 additions
and
10,192 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/.vagrant | ||
/node_modules | ||
.DS_Store | ||
*.exe | ||
/db | ||
/data | ||
/.idea | ||
dist/ | ||
config.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ui/bindata.go linguist-generated=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!-- | ||
Please make sure to read the Contributing Guidelines: | ||
https://github.com/hound-search/hound/blob/main/CONTRIBUTING.md | ||
--> | ||
|
||
<!-- PULL REQUEST TEMPLATE --> | ||
<!-- (Update "[ ]" to "[x]" to check a box) --> | ||
|
||
**What kind of change does this PR introduce?** (check at least one) | ||
|
||
- [ ] Bugfix | ||
- [ ] Feature | ||
- [ ] Code style update | ||
- [ ] Refactor | ||
- [ ] Build-related changes | ||
- [ ] Other, please describe: | ||
|
||
**The PR fulfills these requirements:** | ||
- [ ] All tests are passing? | ||
- [ ] New/updated tests are included? | ||
- [ ] If any static assets have been updated, has ui/bindata.go been regenerated? | ||
- [ ] Are there doc blocks for functions that I updated/created? | ||
|
||
If adding a **new feature**, the PR's description includes: | ||
- [ ] A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it) | ||
|
||
**Other information:** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,6 @@ | |
/db | ||
/data | ||
/.idea | ||
dist/ | ||
config.json | ||
/ui/.build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
ui/assets/js/JSXTransformer-0.12.2.js | ||
ui/assets/js/jquery-2.1.3.min.js | ||
ui/assets/js/react-0.12.2.min.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
FROM alpine:3.11.7 | ||
FROM alpine:3.16 | ||
|
||
ENV GOPATH /go | ||
|
||
COPY . /go/src/github.com/hound-search/hound | ||
COPY . /src | ||
|
||
RUN apk update \ | ||
&& apk add go git subversion libc-dev mercurial bzr openssh tini \ | ||
&& cd /go/src/github.com/hound-search/hound \ | ||
&& go mod download \ | ||
&& go install github.com/hound-search/hound/cmds/houndd \ | ||
&& apk del go \ | ||
&& rm -f /var/cache/apk/* \ | ||
&& rm -rf /go/src /go/pkg | ||
&& apk add go git subversion libc-dev mercurial breezy openssh tini build-base npm rsync \ | ||
&& cd /src \ | ||
&& make \ | ||
&& cp .build/bin/houndd /bin \ | ||
&& rm -r .build \ | ||
&& apk del go build-base rsync npm \ | ||
&& rm -f /var/cache/apk/* | ||
|
||
VOLUME ["/data"] | ||
|
||
EXPOSE 6080 | ||
|
||
ENTRYPOINT ["/sbin/tini", "--", "/go/bin/houndd", "-conf", "/data/config.json"] | ||
ENTRYPOINT ["/sbin/tini", "--", "/bin/houndd", "-conf", "/data/config.json"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,46 @@ | ||
CMDS := $(GOPATH)/bin/houndd $(GOPATH)/bin/hound | ||
CMDS := .build/bin/houndd .build/bin/hound | ||
|
||
SRCS := $(shell find . -type f -name '*.go') | ||
UI := $(shell find ui/assets -type f) | ||
|
||
WEBPACK_ARGS := -p | ||
WEBPACK_ARGS := --mode production | ||
ifdef DEBUG | ||
WEBPACK_ARGS := -d | ||
WEBPACK_ARGS := --mode development | ||
endif | ||
|
||
ALL: $(CMDS) | ||
|
||
ui: ui/bindata.go | ||
ui: ui/.build/ui | ||
|
||
node_modules: | ||
# the mtime is updated on a directory when its files change so it's better | ||
# to rely on a single file to represent the presence of node_modules. | ||
node_modules/build: | ||
npm install | ||
date -u >> $@ | ||
|
||
$(GOPATH)/bin/houndd: ui/bindata.go $(SRCS) | ||
go install github.com/hound-search/hound/cmds/houndd | ||
.build/bin/houndd: ui/.build/ui $(SRCS) | ||
go build -o $@ github.com/hound-search/hound/cmds/houndd | ||
|
||
$(GOPATH)/bin/hound: ui/bindata.go $(SRCS) | ||
go install github.com/hound-search/hound/cmds/hound | ||
.build/bin/hound: $(SRCS) | ||
go build -o $@ github.com/hound-search/hound/cmds/hound | ||
|
||
.build/bin/go-bindata: | ||
GOPATH=`pwd`/.build go install github.com/go-bindata/go-bindata/... | ||
|
||
ui/bindata.go: .build/bin/go-bindata node_modules $(wildcard ui/assets/**/*) | ||
rsync -r ui/assets/* .build/ui | ||
ui/.build/ui: node_modules/build $(UI) | ||
mkdir -p ui/.build/ui | ||
cp -r ui/assets/* ui/.build/ui | ||
npx webpack $(WEBPACK_ARGS) | ||
$< -o $@ -pkg ui -prefix .build/ui -nomemcopy .build/ui/... | ||
|
||
dev: ALL | ||
npm install | ||
dev: node_modules/build | ||
|
||
test: | ||
go test github.com/hound-search/hound/... | ||
npm test | ||
|
||
lint: | ||
export GO111MODULE=on | ||
go install github.com/golangci/golangci-lint/cmd/golangci-lint | ||
go get github.com/golangci/golangci-lint/cmd/golangci-lint | ||
export GOPATH=/tmp/gopath | ||
export PATH=$GOPATH/bin:$PATH | ||
golangci-lint run ./... | ||
|
||
clean: | ||
rm -rf .build node_modules | ||
rm -rf .build ui/.build node_modules |
Oops, something went wrong.