This commit is contained in:
lubiana 2025-07-24 11:35:37 +02:00
parent ba1f43fd8e
commit 0f9fbc9375
Signed by: lubiana
SSH key fingerprint: SHA256:vW1EA0fRR3Fw+dD/sM0K+x3Il2gSry6YRYHqOeQwrfk
15 changed files with 381 additions and 297 deletions

View file

@ -38,22 +38,12 @@ FROM alpine:latest
# Install runtime dependencies for SQLite
RUN apk add --no-cache ca-certificates sqlite
# Create non-root user
RUN addgroup -g 1001 -S gocheck && \
adduser -S -D -H -h /app -s /sbin/nologin -G gocheck -g gocheck -u 1001 gocheck
# Copy the binary from builder stage
COPY --from=builder /app/gocheck /app/gocheck
# Set working directory
WORKDIR /app
# Change ownership to non-root user
RUN chown -R gocheck:gocheck /app
# Switch to non-root user
USER gocheck
# Expose default port (can be overridden via PORT env var)
EXPOSE 8080