FROM node:20 RUN apt-get update && apt-get install -y \ git \ cron \ nginx WORKDIR /app COPY start.sh . COPY update.sh . COPY nginx.conf /etc/nginx/sites-available/default RUN chmod +x start.sh RUN chmod +x update.sh # Create cron log file beforehand RUN touch /var/log/cron.log # Cron every hour RUN echo "0 * * * * /app/update.sh >> /var/log/cron.log 2>&1" > /etc/cron.d/react-cron RUN chmod 0644 /etc/cron.d/react-cron RUN crontab /etc/cron.d/react-cron EXPOSE 7860 CMD ["/app/start.sh"]