mirror of
https://github.com/SamyRai/turash.git
synced 2025-12-26 23:01:33 +00:00
Some checks failed
CI/CD Pipeline / frontend-lint (push) Failing after 28s
CI/CD Pipeline / frontend-build (push) Has been skipped
CI/CD Pipeline / backend-lint (push) Failing after 31s
CI/CD Pipeline / backend-build (push) Has been skipped
CI/CD Pipeline / e2e-test (push) Has been skipped
- Update Dockerfile from golang:1.21 to golang:1.25.3 to match go.mod - Update Dockerfile.dev from golang:1.25 to golang:1.25.3 for consistency - Add GO111MODULE=on to all Go-related CI steps for explicit module mode - Ensures all environments (CI, Docker, local) use Go 1.25.3 consistently
35 lines
687 B
Docker
35 lines
687 B
Docker
# Production Dockerfile for Turash backend
|
|
FROM golang:1.25.3-alpine AS builder
|
|
|
|
# Set working directory
|
|
WORKDIR /app
|
|
|
|
# Copy go mod files
|
|
COPY go.mod go.sum ./
|
|
|
|
# Download dependencies
|
|
RUN go mod download
|
|
|
|
# Copy source code
|
|
COPY . .
|
|
|
|
# Build the unified CLI application with optimizations
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o bugulma-cli ./cmd/cli
|
|
|
|
# Final stage
|
|
FROM alpine:latest
|
|
|
|
# Install ca-certificates for HTTPS requests
|
|
RUN apk --no-cache add ca-certificates
|
|
|
|
WORKDIR /root/
|
|
|
|
# Copy the binary from builder stage
|
|
COPY --from=builder /app/bugulma-cli .
|
|
|
|
# Expose port
|
|
EXPOSE 8080
|
|
|
|
# Command to run the server by default
|
|
CMD ["./bugulma-cli", "server"]
|