DEVELOPMENT ENVIRONMENT

~liljamo/felu

f28e167fd934db2f367f45cd75adb8a337a47089 — Jonni Liljamo 7 months ago 2112dce 0.1.9
fix: templ components in docker
1 files changed, 3 insertions(+), 0 deletions(-)

M Dockerfile
M Dockerfile => Dockerfile +3 -0
@@ 12,6 12,8 @@ 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

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


@@ 24,6 26,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build go test -v ./...
FROM alpine:3.18 AS release

COPY --from=builder /felu /felu
COPY --from=builder /usr/src/app/internal/components /usr/src/app/internal/components
ADD ./static /static

RUN mkdir /var/felu