Initial commit: COSMOS - turn your old PC to workstation

This commit is contained in:
2026-10-14 12:37:48 +05:30
commit 9d91ef71aa
28 changed files with 11287 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
# Build Stage
FROM golang:1.22-alpine AS builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o /cosmos .
# Runtime Stage
FROM alpine:3.19
RUN apk add --no-cache ca-certificates curl bash msmtp
# Install MinIO Client (mc)
RUN curl -sSL https://dl.min.io/client/mc/release/linux-amd64/mc -o /usr/local/bin/mc && \
chmod +x /usr/local/bin/mc
WORKDIR /app
COPY --from=builder /cosmos /app/cosmos
COPY templates /app/templates
EXPOSE 8080
ENTRYPOINT ["/app/cosmos"]