Rebuilt from scratch in Go with streaming uploads (5GB support), password protection, rate limiting, secure shredding, and a retro-chaotic UI with random GIF backgrounds.
17 lines
380 B
Docker
17 lines
380 B
Docker
FROM golang:1.22-alpine AS builder
|
|
WORKDIR /build
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
COPY main.go .
|
|
RUN CGO_ENABLED=0 go build -ldflags="-s -w" -o hardfiles main.go
|
|
|
|
FROM alpine:3.19
|
|
RUN apk add --no-cache ca-certificates
|
|
WORKDIR /app
|
|
COPY --from=builder /build/hardfiles .
|
|
COPY www/ ./www/
|
|
COPY config.toml .
|
|
RUN mkdir -p files backgrounds
|
|
EXPOSE 5000
|
|
CMD ["./hardfiles"]
|