-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make booty slightly-stateful, add web ui, lots of minor changes. this…
… commit is way too big, i'm ashamed lol
- Loading branch information
Showing
53 changed files
with
15,203 additions
and
50 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 |
---|---|---|
@@ -1,4 +1,6 @@ | ||
bin/* | ||
data/* | ||
examples/* | ||
old/* | ||
old/* | ||
Makefile | ||
README.md |
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,2 +1,3 @@ | ||
bin/ | ||
data/ | ||
.vscode/* |
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,13 +1,23 @@ | ||
FROM golang:1.16-alpine | ||
### Stage One | ||
FROM golang:1.19-alpine | ||
|
||
WORKDIR /app | ||
|
||
COPY . . | ||
|
||
RUN CGO_ENABLED=0 GOARCH=amd64 GOOS=linux go build -o bin/booty cmd/main.go | ||
RUN CGO_ENABLED=0 GOARCH=amd64 GOOS=linux go build -o bin/booty -ldflags "-X main.version=$BOOTY_VERSION -X main.timestamp=$BOOTY_TIMESTAMP" cmd/main.go | ||
|
||
FROM node:lts-alpine as build-stage | ||
WORKDIR /app | ||
COPY web/package*.json ./ | ||
RUN npm install | ||
COPY web/ . | ||
RUN npm run build | ||
|
||
### Final Stage | ||
FROM gcr.io/distroless/base-debian10 | ||
|
||
COPY --from=0 /app/bin/booty / | ||
COPY --from=1 /app/dist/ /web/dist/ | ||
|
||
ENTRYPOINT [ "/booty" ] |
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,11 +1,18 @@ | ||
TOPDIR=$(PWD) | ||
WHOAMI=$(shell whoami) | ||
|
||
build: | ||
go build -o bin/booty cmd/main.go | ||
|
||
run: | ||
go run cmd/main.go | ||
cd web && npm run build && cd .. | ||
go run cmd/main.go --dataDir=data/ | ||
|
||
image: | ||
docker build -t jeefy/booty . | ||
docker build -t ${WHOAMI}/booty . | ||
|
||
image-push: image | ||
docker push ${WHOAMI}/booty | ||
|
||
image-push: | ||
docker push jeefy/booty | ||
image-run: image | ||
docker run -ti -v ${TOPDIR}/data:/data -p 8080:8080 -p 69:69/udp ${WHOAMI}/booty --debug=true --dataDir=/data |
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
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
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
Oops, something went wrong.