feat: add web UI and Docker setup for ZPLify

- HTTP server wrapping zplgfa library (port 4543)
- File upload with drag-and-drop, width/height resize, encoding selection, image edits
- /convert endpoint returns ZPL output; /preview returns image dimensions
- Dockerfile (multi-stage, Alpine) and docker-compose.yml
This commit is contained in:
2026-03-26 09:52:13 +01:00
parent b89d47a378
commit 05e60cdfe3
3 changed files with 482 additions and 0 deletions

24
Dockerfile Normal file
View File

@@ -0,0 +1,24 @@
FROM golang:1.22-alpine AS builder
WORKDIR /src
# Copy module files and download deps
COPY go.mod go.sum ./
RUN go mod download
# Copy source
COPY . .
# Build the web server
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o /zplgfa-web ./cmd/web
# ─── Final stage ────────────────────────────────────────────────────────────
FROM alpine:3.20
RUN apk add --no-cache ca-certificates
COPY --from=builder /zplgfa-web /usr/local/bin/zplgfa-web
EXPOSE 4543
ENTRYPOINT ["/usr/local/bin/zplgfa-web"]