FROM node:18-alpine # Install bash for startup script RUN apk add --no-cache bash # The /app directory should act as the main application directory WORKDIR /app # Copy and install frontend dependencies COPY frontend/package*.json ./frontend/ RUN cd frontend && npm install --include=dev # Copy application files COPY frontend/. ./frontend/ # Copy startup script COPY run_frontend.sh /app/run_frontend.sh RUN chmod +x /app/run_frontend.sh # Expose ports EXPOSE 3000 # Start both frontend and router CMD ["/app/run_frontend.sh"]