# Use the official Golang image
FROM golang:1.23.1-alpine

# Set the working directory inside the container
WORKDIR /app

# Copy go.mod and go.sum files and download dependencies
COPY go.mod go.sum ./
RUN go mod download

# Copy the rest of the application source code
COPY . .

RUN go build -o app main.go

# Expose the application's port (change if needed)
EXPOSE 5678

# Command to run the application
CMD ["./app"]
