Initial commit
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
||||
# Start from the official Golang image for building
|
||||
FROM golang:1.22-alpine AS builder
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
RUN go mod download
|
||||
RUN go build -o app main.go
|
||||
|
||||
# Use a minimal image for running
|
||||
FROM alpine:latest
|
||||
WORKDIR /app
|
||||
COPY --from=builder /app/app .
|
||||
COPY data ./data
|
||||
EXPOSE 8080
|
||||
ENV RATE_LIMIT_RPS=2
|
||||
ENV RATE_LIMIT_BURST=5
|
||||
CMD ["./app"]
|
||||
Reference in New Issue
Block a user