-
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.
- Loading branch information
1 parent
a3ccf10
commit cb8f59f
Showing
3 changed files
with
10 additions
and
10 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,3 @@ | ||
tests/ | ||
docs/ | ||
*.md | ||
*.templ |
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,18 +1,17 @@ | ||
FROM golang:1.22-alpine as builder | ||
|
||
WORKDIR /app | ||
RUN apk add --no-cache git | ||
|
||
COPY . ./ | ||
RUN go install github.com/a-h/templ/cmd/templ@latest | ||
RUN templ generate | ||
RUN go get ./... | ||
RUN go mod tidy | ||
COPY . . | ||
|
||
RUN go mod download | ||
RUN go build -tags prod -o bin/sac main.go | ||
|
||
FROM scratch | ||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -o bin/sac main.go | ||
|
||
FROM alpine:latest as release | ||
|
||
COPY --from=builder /app/bin/sac /sac | ||
|
||
EXPOSE 8080 | ||
ENTRYPOINT [ "./sac" ] | ||
|
||
ENTRYPOINT [ "/sac" ] |
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