fix docker

This commit is contained in:
maddalax 2024-09-24 12:46:17 -05:00
parent 2b8ba6e1aa
commit 33cf2dcac7
6 changed files with 16 additions and 10 deletions

View file

@ -7,4 +7,5 @@ js/node_modules
go.work
go.work.sum
.idea
!framework/assets/dist
!framework/assets/dist
__htmgo

View file

@ -10,12 +10,13 @@ COPY go.mod go.sum ./
# Download and cache the Go modules
RUN go mod download
# Always download the latest version of the framework
RUN go get github.com/maddalax/htmgo/framework@latest
# Copy the source code into the container
COPY . .
# Always download the latest version of the framework
RUN go get github.com/maddalax/htmgo/framework@latest
RUN go mod tidy
# Build the Go binary for Linux
RUN CGO_ENABLED=0 GOPRIVATE=github.com/maddalax LOG_LEVEL=debug go run github.com/maddalax/htmgo/cli/htmgo@latest build

View file

@ -7,4 +7,5 @@ js/node_modules
go.work
go.work.sum
.idea
!framework/assets/dist
!framework/assets/dist
__htmgo

View file

@ -14,14 +14,15 @@ COPY go.mod go.sum ./
# Download and cache the Go modules
RUN go mod download
# Always download the latest version of the framework
RUN go get github.com/maddalax/htmgo/framework@latest
# Copy the source code into the container
COPY . .
# Always download the latest version of the framework
RUN go get github.com/maddalax/htmgo/framework@latest
RUN go mod tidy
# Build the Go binary for Linux
RUN GOPRIVATE=github.com/maddalax go run github.com/maddalax/htmgo/cli/htmgo@latest build
RUN LOG_LEVEL=debug GOPRIVATE=github.com/maddalax GOPROXY=direct go run github.com/maddalax/htmgo/cli/htmgo@latest build
# Stage 2: Create the smallest possible image

View file

@ -4,7 +4,7 @@ go 1.23.0
require (
github.com/labstack/echo/v4 v4.12.0
github.com/maddalax/htmgo/framework v0.0.0-20240923170417-9e23e7cf2bea
github.com/maddalax/htmgo/framework v0.0.0-20240924173916-2b8ba6e1aa58
github.com/mattn/go-sqlite3 v1.14.16
github.com/yuin/goldmark v1.7.4
github.com/yuin/goldmark-highlighting/v2 v2.0.0-20230729083705-37449abec8cc

View file

@ -16,6 +16,8 @@ github.com/labstack/gommon v0.4.2 h1:F8qTUNXgG1+6WQmqoUWnz8WiEU60mXVVw0P4ht1WRA0
github.com/labstack/gommon v0.4.2/go.mod h1:QlUFxVM+SNXhDL/Z7YhocGIBYOiwB0mXm1+1bAPHPyU=
github.com/maddalax/htmgo/framework v0.0.0-20240923170417-9e23e7cf2bea h1:TcZtFXyrJ86nPK6YBeOtkzjYbFMxiPNDJzvmaKRfB/c=
github.com/maddalax/htmgo/framework v0.0.0-20240923170417-9e23e7cf2bea/go.mod h1:TA7KCaKhurpXceQrzClJOHqRsUSd5NL64ZngSg+I3oc=
github.com/maddalax/htmgo/framework v0.0.0-20240924173916-2b8ba6e1aa58 h1:xvBCxG0r2XJHPIb5q994lbZJVPxIOxCRsxoFj5mtlO4=
github.com/maddalax/htmgo/framework v0.0.0-20240924173916-2b8ba6e1aa58/go.mod h1:TA7KCaKhurpXceQrzClJOHqRsUSd5NL64ZngSg+I3oc=
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=