This commit is contained in:
Tomáš Dvořák
2025-10-16 13:32:05 +02:00
commit 12cba639b9
663 changed files with 168914 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
# Build stage
FROM golang:1.24.5-alpine AS builder
WORKDIR /app
# Install dependencies
RUN apk add --no-cache git
# Download dependencies
COPY go.mod go.sum ./
RUN go mod download
# Copy source code
COPY . .
# Build the application
RUN CGO_ENABLED=0 GOOS=linux go build -o fotbal-club
# Final stage
FROM alpine:latest
WORKDIR /app
# Copy the binary from builder
COPY --from=builder /app/fotbal-club .
# Copy templates and static files if any
COPY ./templates ./templates
COPY ./static ./static
# Expose port
EXPOSE 8080
# Command to run the executable
CMD ["./fotbal-club"]