[odrs-web/oscp] Don't even attempt to use cron, go for a while loop instead
- From: Andrea Veri <averi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [odrs-web/oscp] Don't even attempt to use cron, go for a while loop instead
- Date: Thu, 29 Nov 2018 21:48:16 +0000 (UTC)
commit 89bf38c2de680779668ae3eb1a1110d19ead758b
Author: Andrea Veri <averi redhat com>
Date: Thu Nov 29 22:48:11 2018 +0100
Don't even attempt to use cron, go for a while loop instead
Dockerfile | 5 ++---
entrypoint.sh | 2 ++
odrs.cron | 1 -
3 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/Dockerfile b/Dockerfile
index 344660a..8d31282 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -3,7 +3,7 @@ FROM centos/httpd-24-centos7
USER root
RUN yum update -y
-RUN yum install gcc make python27-python python27-python-pip python27-mod_wsgi python27-python-devel
python2-cryptography python-flask python2-flask-wtf python2-flask-login python2-PyMySQL crontab -y
+RUN yum install gcc make python27-python python27-python-pip python27-mod_wsgi python27-python-devel
python2-cryptography python-flask python2-flask-wtf python2-flask-login python2-PyMySQL -y
ENV ODRS_HOME=/opt/app-root/src \
LANG=C
@@ -16,7 +16,6 @@ COPY odrs.gnome.org.conf /etc/httpd/conf.d/odrs.gnome.org.conf
RUN rm /etc/httpd/conf.d/welcome.conf
RUN python /opt/app-root/src/cron.py ratings /opt/app-root/src/app/static/ratings.json
-COPY odrs.cron /etc/cron.d/odrs
RUN chown -R 1000310000:0 ${ODRS_HOME} && \
chmod -R 664 ${ODRS_HOME} && \
@@ -25,5 +24,5 @@ RUN chown -R 1000310000:0 ${ODRS_HOME} && \
COPY entrypoint.sh /usr/local/bin
EXPOSE 8443
-USER 1001
+USER 1000310000
ENTRYPOINT ["entrypoint.sh"]
diff --git a/entrypoint.sh b/entrypoint.sh
index 023ca37..9f3b21d 100755
--- a/entrypoint.sh
+++ b/entrypoint.sh
@@ -5,4 +5,6 @@ sed -i "s/replace_odrs_username/${MYSQL_DB_USERNAME}/" /etc/httpd/conf.d/odrs.gn
sed -i "s/replace_odrs_password/${MYSQL_DB_PASSWORD}/" /etc/httpd/conf.d/odrs.gnome.org.conf
sed -i "s/replace_odrs_host/${MYSQL_DB_HOST}/" /etc/httpd/conf.d/odrs.gnome.org.conf
+while true; do python /opt/app-root/src/cron.py ratings /opt/app-root/src/app/static/ratings.json ; sleep
43200 ; done &
+
exec /usr/bin/run-httpd
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]