committtttt

This commit is contained in:
Dev
2025-09-13 06:48:55 +03:00
commit 2d49f69be6
32 changed files with 6478 additions and 0 deletions

39
backend/Dockerfile Normal file
View File

@@ -0,0 +1,39 @@
# Build stage
FROM golang:1.21-alpine AS builder
# Set working directory
WORKDIR /app
# Install git and certificates
RUN apk add --no-cache git ca-certificates tzdata
# Copy go mod files
COPY go.mod go.sum ./
# Download dependencies
RUN go mod download
# Copy source code
COPY . .
# Build the application
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main cmd/main.go
# Final stage
FROM alpine:latest
# Install ca-certificates for HTTPS
RUN apk --no-cache add ca-certificates tzdata
# Set working directory
WORKDIR /root/
# Copy binary from builder
COPY --from=builder /app/main .
COPY --from=builder /app/.env.example .
# Expose port
EXPOSE 8080
# Command to run the application
CMD ["./main"]