FROM golang:1.23-alpine

RUN apk --no-cache add curl

# Install ffmpeg
RUN apk update && apk add --no-cache ffmpeg

WORKDIR /app

COPY . .

RUN go mod tidy

# Ensure the Go bin directory is in the PATH
ENV PATH="/go/bin:${PATH}"

RUN go build -o server ./cmd/app

EXPOSE 9090 

CMD ["./server"]
