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:
24
Dockerfile
Normal file
24
Dockerfile
Normal 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"]
|
||||
Reference in New Issue
Block a user