# Use an official node runtime as a parent image
FROM node:20

# Make sure we are in a development environment (this isn't a production ready Dockerfile)
ENV NODE_ENV=development

# Echo that this isn't a production ready Dockerfile
RUN echo "This Dockerfile is not production ready. It is intended for development purposes only."

# Set the working directory in the container
WORKDIR /app

# Copy the frontend directory contents into the container at /app
COPY ./talemate_frontend /app

# Install all dependencies
RUN npm install

# Make port 8080 available to the world outside this container
EXPOSE 8080

# Run frontend server
CMD ["npm", "run", "serve"]