apps/habbits/Dockerfile 554 B raw
1
# Build from repo root: docker build -t habbits -f apps/habbits/Dockerfile .
2
FROM golang:1.24-bookworm AS builder
3
WORKDIR /app
4
COPY pkg/ ./pkg/
5
COPY apps/habbits/go.mod apps/habbits/go.sum ./apps/habbits/
6
WORKDIR /app/apps/habbits
7
RUN go mod download
8
COPY apps/habbits/ ./
9
RUN CGO_ENABLED=0 go build -o /habbits .
10
11
FROM debian:bookworm-slim
12
RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/*
13
COPY --from=builder /habbits /usr/local/bin/habbits
14
WORKDIR /data
15
ENV HOST=0.0.0.0
16
ENV PORT=3000
17
EXPOSE 3000
18
CMD ["habbits"]