# Stage 1: Build the Go application
FROM golang:latest AS go_builder

WORKDIR /app

COPY ./backend/main /app/main
#COPY ./backend/grouptasks_lang_log_messages.json /app/
#COPY ./backend/system_lang_log_messages.json /app/
#COPY ./backend/public/swagger/ /app/swagger

# Assuming you build your Go binary using "go build -o main"
#RUN go build -o main

# Stage 2: Create the final image with Python 3 and the Go binary
FROM python:3

WORKDIR /app

# Copy the Go binary from the previous stage
COPY --from=go_builder /app/main /app/main

# Copy any other files you need
COPY ./backend/grouptasks_lang_log_messages.json /app/
COPY ./backend/system_lang_log_messages.json /app/
COPY ./backend/public/swagger/ /app/swagger

# Set up any Python dependencies you might need
# RUN pip install ...

CMD ["./main"]

#FROM golang:latest

#WORKDIR /app

#COPY ./backend/main /app/main
#COPY ./backend/grouptasks_lang_log_messages.json /app/
#COPY ./backend/system_lang_log_messages.json /app/
#COPY ./backend/public/swagger/ /app/swagger

#CMD ["./main"]