Merge pull request 'moving to init.sh' (#17) from work into main

Reviewed-on: #17
This commit is contained in:
paradizelost 2024-11-25 14:27:41 -06:00
commit 11eff2d940
2 changed files with 8 additions and 1 deletions

View File

@ -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]
CMD ["/init.sh"]
#(cron -l 8 & ) && su - www-data -s /usr/local/bin/libnotices.py & apache2ctl -D FOREGROUND]

4
init.sh Normal file
View File

@ -0,0 +1,4 @@
#!/bin/bash
cron -l 8 &
su - www-data -s /usr/local/bin/libnotices.py
apache2ctl -D FOREGROUND