Add CI/CD pipeline with Gitea Actions and Docker support
Some checks failed
Build and Release / build (push) Has been cancelled
Build and Release / docker-build (push) Has been cancelled

- Create Dockerfile for server with multi-stage build
- Create Dockerfile for agent with multi-stage build
- Set up Gitea Actions workflow to automatically build and release binaries
- Build for all platforms: Linux (amd64/arm64), macOS (amd64/arm64), Windows (amd64)
- Generate checksums for all release artifacts
- Include Docker image building in CI/CD pipeline
- Add release upload script for manual Gitea releases
- Add comprehensive RELEASE.md documentation
This commit is contained in:
Ducky SSH User
2025-12-20 05:21:32 +00:00
parent 765590a1a8
commit 9184de0a1d
5 changed files with 475 additions and 0 deletions

34
Dockerfile.agent Normal file
View File

@@ -0,0 +1,34 @@
# Multi-stage build for nerd-monitor agent
FROM golang:1.24.4-alpine AS builder
WORKDIR /app
# Install build dependencies
RUN apk add --no-cache git make
# Copy go mod files
COPY go.mod go.sum ./
# Download dependencies
RUN go mod download
# Copy source code
COPY . .
# Build the agent binary (no templ needed for agent)
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-w -s" -o nerd-monitor-agent ./cmd/agent
# Runtime stage
FROM alpine:latest
WORKDIR /app
COPY --from=builder /app/nerd-monitor-agent .
# Create non-root user
RUN addgroup -D appgroup && adduser -D appuser -G appgroup
USER appuser
# Run the agent
ENTRYPOINT ["./nerd-monitor-agent"]
CMD ["--server", "localhost:8080"]