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
|
||||
|
||||
COPY . .
|
||||
RUN go tool templ generate
|
||||
RUN go tool gotailwind -i assets/css/input.css -o assets/css/output.css --minify
|
||||
RUN --mount=type=cache,target=/root/.cache/go-build \
|
||||
CGO_ENABLED=0 go build -ldflags="-s" -o /bin/games .
|
||||
|
||||
Reference in New Issue
Block a user