[odrs-web] Reading https://hub.docker.com/r/centos/httpd-24-centos7 helped figuring out a couple of goodies the
- From: Andrea Veri <averi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [odrs-web] Reading https://hub.docker.com/r/centos/httpd-24-centos7 helped figuring out a couple of goodies the
- Date: Mon, 17 Dec 2018 13:57:39 +0000 (UTC)
commit 86fd6854149f165ec71e10230c1429c0c5a09ace
Author: Andrea Veri <averi redhat com>
Date: Mon Dec 17 14:57:20 2018 +0100
Reading https://hub.docker.com/r/centos/httpd-24-centos7 helped figuring out a couple of goodies the
image ships with
Dockerfile | 8 +-------
entrypoint.sh | 7 -------
odrs.gnome.org.conf => httpd-cfg/odrs.gnome.org.conf | 0
httpd-pre-init/entrypoint.sh | 8 ++++++++
4 files changed, 9 insertions(+), 14 deletions(-)
---
diff --git a/Dockerfile b/Dockerfile
index 9f82fba..0de9605 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -12,20 +12,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/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
diff --git a/odrs.gnome.org.conf b/httpd-cfg/odrs.gnome.org.conf
similarity index 100%
rename from odrs.gnome.org.conf
rename to httpd-cfg/odrs.gnome.org.conf
diff --git a/httpd-pre-init/entrypoint.sh b/httpd-pre-init/entrypoint.sh
new file mode 100755
index 0000000..8e7f936
--- /dev/null
+++ b/httpd-pre-init/entrypoint.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+sed -i "s/replace_odrs_secret/${ODRS_REVIEWS_SECRET}/" ${HTTPD_CONFIGURATION_PATH}/odrs.gnome.org.conf
+sed -i "s/replace_odrs_username/${MYSQL_DB_USERNAME}/" ${HTTPD_CONFIGURATION_PATH}/odrs.gnome.org.conf
+sed -i "s/replace_odrs_password/${MYSQL_DB_PASSWORD}/" ${HTTPD_CONFIGURATION_PATH}/odrs.gnome.org.conf
+sed -i "s/replace_odrs_host/${MYSQL_DB_HOST}/" ${HTTPD_CONFIGURATION_PATH}/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 &
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]