all repos — well-binge @ 80150294670e221c25fd3ddab40d0301775d0e60

Create positive, recurring habits.

Dockerfile (view raw)

 1# syntax=docker/dockerfile:1
 2
 3FROM golang:1.23-alpine AS builder
 4
 5WORKDIR /build
 6
 7# Download Go modules
 8COPY go.mod go.sum ./
 9RUN go mod download
10RUN go mod verify
11
12# Transfer source code
13COPY src ./src
14COPY *.go ./
15
16# Build
17RUN CGO_ENABLED=0 go build -trimpath -o /dist/well-binge
18
19
20# Test
21FROM builder AS run-test-stage
22COPY templates ./templates
23RUN go test -v ./...
24
25FROM scratch AS build-release-stage
26
27WORKDIR /app
28
29COPY static ./static
30COPY templates ./templates
31COPY --from=builder /dist .
32
33ENTRYPOINT ["./well-binge"]