From 0c2679cab5b9f932711c3baccb53aeb1adf6e770 Mon Sep 17 00:00:00 2001 From: Dan Hamik Date: Mon, 25 Nov 2024 14:27:04 -0600 Subject: [PATCH] moving to init.sh --- Dockerfile | 5 ++++- init.sh | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 init.sh diff --git a/Dockerfile b/Dockerfile index 132630e..47351b5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,10 +5,13 @@ COPY crontab /etc/cron.d/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 apt clean EXPOSE 80 -CMD (cron -l 8 & ) && su - www-data -s /usr/local/bin/libnotices.py & apache2ctl -D FOREGROUND] \ No newline at end of file +CMD ["/init.sh"] +#(cron -l 8 & ) && su - www-data -s /usr/local/bin/libnotices.py & apache2ctl -D FOREGROUND] \ No newline at end of file diff --git a/init.sh b/init.sh new file mode 100644 index 0000000..4a716b2 --- /dev/null +++ b/init.sh @@ -0,0 +1,4 @@ +#!/bin/bash +cron -l 8 & +su - www-data -s /usr/local/bin/libnotices.py +apache2ctl -D FOREGROUND \ No newline at end of file