Files
uberbringer/Dockerfile
T
57_WolveandClaude Opus 5.5 92dcacb3b9
Security / Vulnerability check (push) Successful in 52s
Test / Lint and test (push) Successful in 2m0s
Install behind Caddy instead of nginx and acme.sh
install.sh sets up a fresh Debian or Ubuntu host behind Caddy, installed
from Caddy's apt repository, which obtains and renews the certificate
itself. The site goes to /etc/caddy/uberbringer.caddy and the Caddyfile
imports it; an edited Caddyfile only gains the import line. The result is
validated as the caddy user, and both files are put back if Caddy rejects
it. Caddy's body limit follows webserver.body_limit, and a larger body
gets the daemon's 413 body_too_large JSON. A re-run upgrades the binary,
the unit and Caddy and restarts the service. The script does not migrate
hosts set up by the 0.1 script.

The Docker image stays a proxy-free microservice behind the operator's
own reverse proxy. The README credits the pre-refactor code, written
without AI, and design.md records the persistent job store and image
previews as deferred work.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 01:09:07 -06:00

28 lines
953 B
Docker

# syntax=docker/dockerfile:1
FROM golang:1.27-alpine AS build
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
ARG VERSION=dev
ARG COMMIT=none
RUN CGO_ENABLED=0 go build -trimpath \
-ldflags "-s -w -X main.version=${VERSION} -X main.commit=${COMMIT}" \
-o /out/uberbringer ./cmd/uberbringer
FROM alpine:3.24
# ca-certificates for fetching https images, tzdata for local log times.
RUN apk add --no-cache ca-certificates tzdata \
&& addgroup -S uberbringer \
&& adduser -S -D -H -G uberbringer -h /etc/uberbringer uberbringer
COPY --from=build /out/uberbringer /usr/local/bin/uberbringer
USER uberbringer
WORKDIR /etc/uberbringer
# Plain HTTP for a reverse proxy in front, which terminates TLS. Mount
# config.toml at /etc/uberbringer/config.toml with bind_ip = "0.0.0.0" and the
# proxy's address in trusted_proxies.
EXPOSE 8080
ENTRYPOINT ["/usr/local/bin/uberbringer"]
CMD ["--config", "/etc/uberbringer/config.toml"]