fix: run templ generate in Dockerfile before build
The _templ.go files are gitignored, so the Docker build context doesn't include them. Generate them before compiling.
This commit is contained in:
@@ -7,6 +7,7 @@ COPY go.mod go.sum ./
|
|||||||
RUN go mod download
|
RUN go mod download
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
RUN go tool templ generate
|
||||||
RUN go tool gotailwind -i assets/css/input.css -o assets/css/output.css --minify
|
RUN go tool gotailwind -i assets/css/input.css -o assets/css/output.css --minify
|
||||||
RUN --mount=type=cache,target=/root/.cache/go-build \
|
RUN --mount=type=cache,target=/root/.cache/go-build \
|
||||||
CGO_ENABLED=0 go build -ldflags="-s" -o /bin/games .
|
CGO_ENABLED=0 go build -ldflags="-s" -o /bin/games .
|
||||||
|
|||||||
Reference in New Issue
Block a user