DEVELOPMENT ENVIRONMENT

~liljamo/felu

23fe5465b8a6ff35d33d749c5a059ee83f33e4f0 — Jonni Liljamo a month ago 6e0ca50
fix: reorder dockerfile to cache templ install
1 files changed, 3 insertions(+), 2 deletions(-)

M Dockerfile
M Dockerfile => Dockerfile +3 -2
@@ 10,11 10,12 @@ WORKDIR /usr/src/app
COPY go.mod go.sum ./
RUN go mod download && go mod verify

COPY cmd/ ./cmd
COPY internal/ ./internal
RUN go install github.com/a-h/templ/cmd/templ@$(go list -m -f '{{ .Version }}' github.com/a-h/templ)
RUN templ generate --path internal/components

COPY cmd/ ./cmd
COPY internal/ ./internal

RUN --mount=type=cache,target=/root/.cache/go-build \
CGO_ENABLED=1 GOOS=linux go build -ldflags=-X=main.version=${VERSION} -v -o /felu ./cmd/felu/main.go