dab68f34f2
- Minimal, professional CV design with paper-on-gray layout - Bilingual support (Spanish/English) with HTMX language switching - JSON-based content management (cv-en.json, cv-es.json) - Print-optimized CSS for PDF export - Responsive design for all devices - Go backend with stdlib net/http - Clean, maintainable codebase Features: - 18+ years professional experience - SAP CDC expertise - Complete project history - Education, certifications, awards - Multi-language support Tech stack: Go, HTMX, vanilla CSS
47 lines
841 B
Docker
47 lines
841 B
Docker
# Build stage
|
|
FROM golang:1.25-alpine AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy go mod files
|
|
COPY go.mod ./
|
|
|
|
# Download dependencies
|
|
RUN go mod download
|
|
|
|
# Copy source code
|
|
COPY . .
|
|
|
|
# Build binary
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -o cv-server -ldflags="-s -w" .
|
|
|
|
# Runtime stage
|
|
FROM alpine:latest
|
|
|
|
# Install CA certificates for HTTPS
|
|
RUN apk --no-cache add ca-certificates
|
|
|
|
WORKDIR /root/
|
|
|
|
# Copy binary from builder
|
|
COPY --from=builder /app/cv-server .
|
|
|
|
# Copy application files
|
|
COPY templates templates/
|
|
COPY data data/
|
|
COPY static static/
|
|
|
|
# Expose port
|
|
EXPOSE 8080
|
|
|
|
# Set production environment
|
|
ENV GO_ENV=production
|
|
ENV PORT=8080
|
|
|
|
# Health check
|
|
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
|
CMD wget --no-verbose --tries=1 --spider http://localhost:8080/health || exit 1
|
|
|
|
# Run the binary
|
|
CMD ["./cv-server"]
|