Files
Mako/Dockerfile
T
2026-11-01 00:06:51 -06:00

17 lines
626 B
Docker

# Build: docker build -t nurse .
FROM golang:1.27-alpine AS build
WORKDIR /src
COPY . .
RUN CGO_ENABLED=0 go build -trimpath -ldflags "-s -w" -o /nurse ./cmd/nurse
FROM alpine:3.20
RUN apk add --no-cache tzdata ca-certificates && adduser -D -u 10001 nurse && mkdir /config && chown nurse /config
COPY --from=build /nurse /usr/local/bin/nurse
USER nurse
# The config file and the notes both live under /config.
ENV NURSE_CONFIG=/config/nurse.json
WORKDIR /config
EXPOSE 8490
HEALTHCHECK --interval=30s --timeout=3s CMD wget -qO- http://127.0.0.1:8490/healthz || exit 1
ENTRYPOINT ["nurse", "serve", "-listen", "0.0.0.0:8490"]