feat(deploy): Dockerfile + Helm chart for k3s homelab deployment (#89)
Some checks failed
CI/CD Pipeline / Build Docker Cache (push) Successful in 8s
CI/CD Pipeline / Trigger Docker Push (push) Has been cancelled
CI/CD Pipeline / CI Pipeline (push) Has started running

Co-authored-by: Gabriel Radureau <arcodange@gmail.com>
Co-committed-by: Gabriel Radureau <arcodange@gmail.com>
This commit was merged in pull request #89.
This commit is contained in:
2026-05-06 06:51:14 +02:00
committed by arcodange
parent 02bafbb0e2
commit f74ba51d7a
11 changed files with 432 additions and 0 deletions

36
Dockerfile Normal file
View File

@@ -0,0 +1,36 @@
# Build dance-lessons-coach Docker image
FROM golang:1.26-alpine AS builder
# Install git (required for go mod download)
RUN apk add --no-cache git
# Set working directory
WORKDIR /app
# Copy go module files and download dependencies
COPY go.mod go.sum ./
RUN go mod download
# Copy entire source code
COPY . .
# Build the server binary
RUN go build -o app ./cmd/server
# Final lightweight stage
FROM alpine:latest
# Install CA certificates for HTTPS
RUN apk --no-cache add ca-certificates
# Set working directory
WORKDIR /root/
# Copy binary from builder stage
COPY --from=builder /app/app .
# Expose port 8080
EXPOSE 8080
# Start the server
CMD ["./app"]