librarynotices/Dockerfile
Dan Hamik 96011017bc
All checks were successful
/ Plan (push) Successful in 32s
/ Plan (pull_request) Successful in 19s
Crontab changes
2024-11-26 01:08:34 -06:00

19 lines
595 B
Docker

FROM debian:bullseye-slim
#
RUN apt update && apt install cron apache2 python3 python3-pip php libapache2-mod-php -y
RUN a2enmod php*
COPY crontab /crontab
COPY refresh.php /var/www/html/
COPY libnotices.py /usr/local/bin/
COPY requirements.txt /
COPY init.sh /
RUN chmod +x /init.sh
RUN pip3 install -r /requirements.txt
RUN mkdir /var/www/.aws
RUN chmod +x /usr/local/bin/libnotices.py
RUN chown www-data:www-data /var/www -R
RUN crontab -u www-data /crontab
RUN apt clean
EXPOSE 80
CMD ["/init.sh"]
#(cron -l 8 & ) && su - www-data -s /usr/local/bin/libnotices.py & apache2ctl -D FOREGROUND]