security fixes and structural improvements

This commit is contained in:
2026-01-11 21:31:34 +00:00
parent dc44a89a67
commit 010b36789c
4 changed files with 219 additions and 5 deletions

View File

@@ -19,12 +19,18 @@ RUN go build -o server main.go
# Final Stage
FROM alpine:latest
WORKDIR /root/
# Create non-root user
RUN addgroup -g 1000 appuser && \
adduser -D -u 1000 -G appuser appuser
WORKDIR /home/appuser
COPY --from=builder /app/server .
# Create directory for sqlite db
RUN mkdir -p data
RUN mkdir -p data && chown -R appuser:appuser /home/appuser
USER appuser
EXPOSE 8000