first commit

This commit is contained in:
Artem Tsyrulnikov
2026-02-05 15:41:56 +03:00
commit f833aeaf41
16 changed files with 1577 additions and 0 deletions

33
Dockerfile Normal file
View File

@@ -0,0 +1,33 @@
# Build stage
FROM golang:1.24-alpine AS builder
WORKDIR /app
# Copy go mod files
COPY go.mod go.sum ./
RUN go mod download
# Copy source code
COPY cmd/ ./cmd/
COPY database/ ./database/
COPY pkg/ ./pkg/
COPY migrations/ ./migrations/
# Build binary
RUN CGO_ENABLED=0 GOOS=linux go build -o bot ./cmd/
# Runtime stage
FROM alpine:latest
RUN apk --no-cache add ca-certificates tzdata
WORKDIR /app
# Create data directory for database
RUN mkdir -p /data
# Copy binary and migrations
COPY --from=builder /app/bot .
COPY --from=builder /app/migrations ./migrations/
CMD ["./bot"]