# Use official Node.js image FROM node:23.7.0 # Set working directory to a writable location WORKDIR /home/node/app # Install required dependencies RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* # Copy the deploy script COPY deploy.sh /deploy.sh # Set correct permissions for the script RUN chmod +x /deploy.sh # Set Node.js environment ENV NODE_ENV=production # Run the script on container startup CMD ["/deploy.sh"]