Spaces:
Sleeping
Sleeping
File size: 512 Bytes
f245764 1b332a2 f245764 1b332a2 f245764 1b332a2 f245764 1b332a2 f245764 2064920 1b332a2 f245764 1b332a2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | 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"] |