[odrs-web/oscp] Merge changes from master
- From: Andrea Veri <averi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [odrs-web/oscp] Merge changes from master
- Date: Mon, 17 Dec 2018 14:51:54 +0000 (UTC)
commit 3b734430ee0ad5ad3ff4c5e18c0e1c2ae671fbba
Author: Andrea Veri <averi redhat com>
Date: Mon Dec 17 15:51:28 2018 +0100
Merge changes from master
Dockerfile | 9 +--------
odrs.gnome.org.conf => app_data/httpd-cfg/odrs.gnome.org.conf | 0
app_data/httpd-pre-init/entrypoint.sh | 8 ++++++++
entrypoint.sh | 7 -------
4 files changed, 9 insertions(+), 15 deletions(-)
---
diff --git a/Dockerfile b/Dockerfile
index 9f82fba..41d8099 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -2,7 +2,6 @@ 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 -y
ENV ODRS_HOME=/opt/app-root/src \
@@ -12,20 +11,14 @@ WORKDIR ${ODRS_HOME}
COPY app_data ${ODRS_HOME}
-RUN rm /etc/httpd/conf.d/welcome.conf
-COPY odrs.gnome.org.conf /etc/httpd/conf.d/odrs.gnome.org.conf
-
RUN python /opt/app-root/src/cron.py ratings /opt/app-root/src/app/static/ratings.json
RUN chown -R 1000310000:0 ${ODRS_HOME} && \
chmod -R 664 ${ODRS_HOME} && \
- chown 1000310000:0 /etc/httpd/conf && \
- chown 1000310000:0 /etc/httpd/conf.d && \
- chown 1000310000:0 /etc/httpd/conf.d/odrs.gnome.org.conf && \
find ${ODRS_HOME} -type d -exec chmod 775 {} +
COPY entrypoint.sh /usr/local/bin
EXPOSE 8443
-USER 1000310000
+USER 1001
ENTRYPOINT ["entrypoint.sh"]
diff --git a/odrs.gnome.org.conf b/app_data/httpd-cfg/odrs.gnome.org.conf
similarity index 100%
rename from odrs.gnome.org.conf
rename to app_data/httpd-cfg/odrs.gnome.org.conf
diff --git a/app_data/httpd-pre-init/entrypoint.sh b/app_data/httpd-pre-init/entrypoint.sh
new file mode 100755
index 0000000..a23d400
--- /dev/null
+++ b/app_data/httpd-pre-init/entrypoint.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+sed -i "s/replace_odrs_secret/${ODRS_REVIEWS_SECRET}/" /etc/httpd/conf.d/odrs.gnome.org.conf
+sed -i "s/replace_odrs_username/${MYSQL_DB_USERNAME}/" /etc/httpd/conf.d/odrs.gnome.org.conf
+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 &
diff --git a/entrypoint.sh b/entrypoint.sh
index 9f3b21d..7f138d2 100755
--- a/entrypoint.sh
+++ b/entrypoint.sh
@@ -1,10 +1,3 @@
#!/bin/sh
-sed -i "s/replace_odrs_secret/${ODRS_REVIEWS_SECRET}/" /etc/httpd/conf.d/odrs.gnome.org.conf
-sed -i "s/replace_odrs_username/${MYSQL_DB_USERNAME}/" /etc/httpd/conf.d/odrs.gnome.org.conf
-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]