This commit is contained in:
Tomas Dvorak
2025-11-02 01:04:02 +01:00
parent ac886502e0
commit b9cea0cd77
153 changed files with 43713 additions and 1700 deletions
+15 -1
View File
@@ -21,15 +21,29 @@ FROM alpine:latest
WORKDIR /app
# Install runtime dependencies (TLS certs, timezone data) and create non-root user
RUN apk add --no-cache ca-certificates tzdata \
&& addgroup -S app && adduser -S app -G app \
&& mkdir -p /app/uploads /app/cache \
&& chown -R app:app /app
# Copy the binary from builder
COPY --from=builder /app/fotbal-club .
COPY --from=builder /app/fotbal-club ./fotbal-club
# Copy templates and static files if any
COPY ./templates ./templates
COPY ./static ./static
# Environment and permissions
ENV GIN_MODE=release
USER app
# Expose port
EXPOSE 8080
# Healthcheck: use busybox wget to probe liveness/readiness
HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 \
CMD wget -q -O - http://127.0.0.1:8080/api/v1/health >/dev/null 2>&1 || exit 1
# Command to run the executable
CMD ["./fotbal-club"]