Fix missing minify dependency and docker image

This commit is contained in:
James Mills 2023-03-16 18:37:41 +10:00
parent b79191b678
commit 4aab1832b5
No known key found for this signature in database
GPG Key ID: AC4C014F1440EBD6
2 changed files with 11 additions and 2 deletions

View File

@ -1,10 +1,18 @@
# Build # Build
FROM prologic/zs AS build FROM golang:alpine AS build
RUN apk add --no-cache -U build-base git
RUN mkdir -p /src RUN mkdir -p /src
WORKDIR /src WORKDIR /src
# Copy Makefile
COPY Makefile ./
# Install deps
RUN make deps
# Copy content # Copy content
COPY . . COPY . .
@ -12,6 +20,6 @@ COPY . .
RUN zs build RUN zs build
# Runtime # Runtime
FROM prologic/zs AS runtime FROM prologic/static AS runtime
COPY --from=build /src/.pub /data COPY --from=build /src/.pub /data

View File

@ -8,6 +8,7 @@ all: build
deps: deps:
@$(GOCMD) install go.mills.io/zs@latest @$(GOCMD) install go.mills.io/zs@latest
@$(GOCMD) install github.com/tdewolff/minify/v2/cmd/minify@latest
dev : DEBUG=1 dev : DEBUG=1
dev : build dev : build