-
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
Showing
34 changed files
with
1,348 additions
and
373 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,2 +1,3 @@ | ||
tailwindcss | ||
tmp/ | ||
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,26 +1,30 @@ | ||
FROM golang:1.22-alpine as builder | ||
FROM golang:1.22-alpine AS builder | ||
|
||
WORKDIR /app | ||
|
||
COPY . . | ||
|
||
RUN apk update && apk upgrade && apk add --no-cache ca-certificates git | ||
RUN apk update && apk upgrade && apk add --no-cache ca-certificates | ||
RUN update-ca-certificates | ||
|
||
RUN go install github.com/a-h/templ/cmd/templ@latest | ||
|
||
ARG GIT_TAG="unknown" | ||
|
||
RUN GO_ENABLED=0 GOOS=linux go build \ | ||
-ldflags "debtrecyclingcalc.com/internal/buildinfo.GitTag=$(git describe --tags)" \ | ||
-ldflags "-X debtrecyclingcalc.com/internal/buildinfo.GitTag=${GIT_TAG}"\ | ||
-o ./bin/main ./cmd/ | ||
|
||
FROM scratch | ||
|
||
ENV ALLOWED_ORIGIN="*" | ||
ENV SERVER_HOST="0.0.0.0" | ||
ENV SERVER_HOST="127.0.0.1" | ||
|
||
COPY --from=builder /app/bin/main ./bin/main | ||
COPY --from=builder /app/static ./static | ||
|
||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ | ||
|
||
EXPOSE 8080 | ||
|
||
CMD ["./bin/main"] |
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.