feat: secure pickup flow and add deployment
Release / deploy (push) Successful in 4m1s

This commit is contained in:
loveuer
2026-09-10 02:44:35 -07:00
parent fa4357a3f2
commit 8ca8341d7c
8 changed files with 276 additions and 34 deletions
+35
View File
@@ -0,0 +1,35 @@
FROM node:24-alpine AS frontend
WORKDIR /src/frontend
COPY frontend/package.json frontend/package-lock.json ./
RUN npm ci
COPY frontend/ ./
RUN npm run build
FROM golang:1.24-alpine AS backend
ARG GOPROXY=https://proxy.golang.org,direct
ENV GOPROXY=${GOPROXY}
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY *.go ./
COPY --from=frontend /src/frontend/dist ./frontend/dist
RUN CGO_ENABLED=0 GOOS=linux go build -trimpath -ldflags="-s -w" -o /ufile .
FROM alpine:3.22
RUN addgroup -S -g 10001 ufile \
&& adduser -S -D -H -u 10001 -G ufile ufile \
&& mkdir -p /data \
&& chown ufile:ufile /data
COPY --from=backend --chown=ufile:ufile /ufile /usr/local/bin/ufile
USER ufile
WORKDIR /data
VOLUME ["/data"]
EXPOSE 6616
CMD ["/usr/local/bin/ufile", "--data", "/data", "--address", "0.0.0.0:6616"]