20 lines
499 B
Docker
20 lines
499 B
Docker
FROM golang:1.23-alpine AS builder
|
|
WORKDIR /app
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
COPY . .
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o ems .
|
|
|
|
FROM alpine:3.19
|
|
RUN apk add --no-cache ca-certificates tzdata
|
|
WORKDIR /app
|
|
COPY --from=builder /app/ems .
|
|
|
|
# Web UI port (put behind Synology HTTPS reverse proxy)
|
|
EXPOSE 9099
|
|
# Prometheus metrics port (keep internal — do not expose via reverse proxy)
|
|
EXPOSE 9100
|
|
|
|
ENTRYPOINT ["/app/ems"]
|
|
CMD ["-config", "/etc/ems/ems-config.yaml"]
|