refactor: python to go

This commit is contained in:
Cipher Vance
2025-11-15 19:57:35 -06:00
parent 778533b655
commit dcf48c94fd
31 changed files with 2990 additions and 554 deletions

44
Containerfile Normal file
View File

@@ -0,0 +1,44 @@
# Build stage
FROM golang:1.25-alpine AS builder
WORKDIR /app
# Install build dependencies
RUN apk add --no-cache git
# Copy go mod files
COPY go.mod go.sum ./
# Download dependencies
RUN go mod download
# Copy source code
COPY . .
# Build the application
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo \
-o server ./cmd/landing
# Final stage
FROM alpine:latest
# Install ca-certificates for HTTPS
RUN apk --no-cache add ca-certificates
WORKDIR /app
# Copy binary from builder
COPY --from=builder /app/server .
# Copy templates directory
COPY --from=builder /app/templates ./templates
# Copy static files directory
COPY --from=builder /app/static ./static
# Copy .env (optional - can be overridden at runtime)
COPY .env .env
EXPOSE 8080
CMD ["./server"]