-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
30 additions
and
18 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
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,2 @@ | ||
config.toml | ||
/panorama | ||
/bin |
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,22 +1,16 @@ | ||
FROM docker.io/node:18-alpine AS ui_builder | ||
WORKDIR /app/ui | ||
COPY ui/package*.json ./ | ||
RUN npm install | ||
COPY ui . | ||
RUN npm run build | ||
|
||
FROM docker.io/golang:1.22-alpine AS backend_builder | ||
WORKDIR /app | ||
RUN apk add git | ||
COPY go.mod go.sum main.go ./ | ||
RUN go mod download && go mod verify | ||
COPY --from=ui_builder /app/ui/build /app/ui/build | ||
RUN apk add git make | ||
COPY go.mod go.sum ./ | ||
RUN go mod download | ||
COPY Makefile ./ | ||
COPY cmd ./cmd | ||
COPY internal ./internal | ||
RUN go build -v | ||
RUN make | ||
|
||
FROM scratch | ||
WORKDIR /app | ||
COPY --from=backend_builder /app/panorama ./ | ||
COPY --from=backend_builder /app/bin/panorama ./ | ||
COPY config.example.toml /etc/panorama/config.toml | ||
|
||
ENTRYPOINT ["./panorama", "run", "--config", "/etc/panorama/config.toml"] |
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,18 @@ | ||
GOEXE=$(shell go env GOEXE) | ||
PANORAMA_BIN=bin/panorama${GOEXE} | ||
|
||
.PHONY: all | ||
all: ${PANORAMA_BIN} | ||
|
||
bin/panorama: \ | ||
cmd/panorama/* \ | ||
internal/**/* | ||
go build -o ${PANORAMA_BIN} ./cmd/panorama | ||
|
||
.PHONY: lint | ||
lint: | ||
golangci-lint run --fix=false --color=always | ||
|
||
.PHONY: clean | ||
clean: | ||
rm -rf bin |
File renamed without changes.
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