Initial commit

This commit is contained in:
Artem Mamonov
2025-02-06 02:36:10 +01:00
commit acf9b43671
24 changed files with 1946 additions and 0 deletions

30
Dockerfile Normal file
View File

@@ -0,0 +1,30 @@
FROM golang:1.20 AS builder
# Set the working directory
WORKDIR /app
# Copy go.mod and go.sum files
COPY . .
# Download all dependencies
RUN go mod download
# Build the Go application
RUN make build-linux
# Use a minimal base image
FROM scratch
# Set the working directory
WORKDIR /app
# Copy the binary from the builder stage
COPY --from=builder /app/cmd/backend .
COPY --from=builder /app/static ./static
COPY --from=builder /app/config.yaml .
# Expose the application port
EXPOSE 8080
# Command to run the binary
CMD ["./backend", "-config", "config.yaml"]