[odrs-web/oscp] Rebase the branch to use a different docker image (centos/httpd-24-centos7) due to https://bugs.alpi
- From: Andrea Veri <averi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [odrs-web/oscp] Rebase the branch to use a different docker image (centos/httpd-24-centos7) due to https://bugs.alpi
- Date: Tue, 13 Nov 2018 08:41:43 +0000 (UTC)
commit 8129c89604854b6822cd73c738ec4b2d9cea840b
Author: Andrea Veri <averi redhat com>
Date: Tue Nov 13 09:41:31 2018 +0100
Rebase the branch to use a different docker image (centos/httpd-24-centos7) due to
https://bugs.alpinelinux.org/issues/8410
Dockerfile | 22 ++++++----------------
entrypoint.sh | 10 +++++-----
odrs.gnome.org.conf | 7 +++----
3 files changed, 14 insertions(+), 25 deletions(-)
---
diff --git a/Dockerfile b/Dockerfile
index a44891f..8e81098 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,9 +1,9 @@
-FROM python:3.6.4-alpine3.7
+FROM centos/httpd-24-centos7
USER root
-RUN apk update
-RUN apk add gcc make libc-dev python3-dev libffi-dev openssl-dev shadow apache2 apache2-mod-wsgi apache2-ssl
strace
+RUN yum update -y
+RUN yum install gcc make httpd mod_ssl rh-python36 rh-python36-python-pip rh-python36-mod_wsgi
rh-python36-scldevel -y
ENV ODRS_HOME=/odrs-web \
LANG=C
@@ -13,25 +13,15 @@ WORKDIR ${ODRS_HOME}
COPY app_data ${ODRS_HOME}
COPY requirements.txt .
+RUN /bin/bash -c "source /opt/rh/rh-python36/enable"
RUN pip install -r requirements.txt
-COPY odrs.gnome.org.conf /etc/apache2/conf.d/000-default.conf
-RUN sed -i 's/Listen 80/Listen 8080/' /etc/apache2/httpd.conf
-RUN sed -i 's/Listen 443/Listen 8443/' /etc/apache2/conf.d/ssl.conf
-RUN sed -i 's/#LoadModule expires_module/LoadModule expires_module/' /etc/apache2/httpd.conf
-RUN sed -i 's/CustomLog/#CustomLog/' /etc/apache2/httpd.conf
-#RUN sed -i 's/ErrorLog/#ErrorLog/' /etc/apache2/httpd.conf
-RUN echo 'ServerName odrs.gnome.org' >> /etc/apache2/httpd.conf
-RUN sed -i -e "124,300s/^/#/" /etc/apache2/conf.d/ssl.conf
+COPY odrs.gnome.org.conf /etc/httpd/conf.d/000-default.conf
RUN groupadd -g 1001 odrs
RUN useradd -u 1001 -g 1001 -d ${ODRS_HOME}/ -r -s /usr/sbin/nologin odrs
-RUN chown root:1000300000 /etc/apache2/conf.d && \
- chown root:1000300000 /etc/apache2/conf.d/000-default.conf && \
- chown root:1000300000 /var/log/apache2 && chmod 775 /var/log/apache2 && \
- chmod 775 /etc/apache2/conf.d && chmod 664 /etc/apache2/conf.d/000-default.conf && \
- chown -R 1001:0 ${ODRS_HOME} && \
+RUN chown -R 1001:0 ${ODRS_HOME} && \
chmod -R 664 ${ODRS_HOME} && \
find ${ODRS_HOME} -type d -exec chmod 775 {} +
diff --git a/entrypoint.sh b/entrypoint.sh
index cd40ddc..36663fa 100755
--- a/entrypoint.sh
+++ b/entrypoint.sh
@@ -1,8 +1,8 @@
#!/bin/sh
-sed -i "s/replace_odrs_secret/${ODRS_REVIEW_SECRET}/" /etc/apache2/conf.d/000-default.conf
-sed -i "s/replace_odrs_username/${ODRS_DB_USER}/" /etc/apache2/conf.d/000-default.conf
-sed -i "s/replace_odrs_password/${ODRS_DB_PASSWORD}/" /etc/apache2/conf.d/000-default.conf
-sed -i "s/replace_odrs_host/${ODRS_DB_HOST}/" /etc/apache2/conf.d/000-default.conf
+sed -i "s/replace_odrs_secret/${ODRS_REVIEW_SECRET}/" /etc/httpd/conf.d/000-default.conf
+sed -i "s/replace_odrs_username/${ODRS_DB_USER}/" /etc/httpd/conf.d/000-default.conf
+sed -i "s/replace_odrs_password/${ODRS_DB_PASSWORD}/" /etc/httpd/conf.d/000-default.conf
+sed -i "s/replace_odrs_host/${ODRS_DB_HOST}/" /etc/httpd/conf.d/000-default.conf
-exec httpd -DFOREGROUND
+exec /usr/bin/run-httpd
diff --git a/odrs.gnome.org.conf b/odrs.gnome.org.conf
index 938a7fc..fe2e02d 100644
--- a/odrs.gnome.org.conf
+++ b/odrs.gnome.org.conf
@@ -1,7 +1,3 @@
-LogLevel warn
-WSGIDaemonProcess odrs.gnome.org processes=10 threads=15 maximum-requests=100 user=odrs group=odrs
-WSGIProcessGroup odrs.gnome.org
-
<VirtualHost *:8443>
ServerName odrs.gnome.org
DocumentRoot /odrs-web
@@ -14,6 +10,9 @@ WSGIProcessGroup odrs.gnome.org
Alias /static/ /odrs-web/app/static
Alias /1.0/reviews/api/ratings /odrs-web/ratings.json
+ WSGIDaemonProcess odrs.gnome.org processes=10 threads=15 maximum-requests=100 user=odrs group=odrs
+ WSGIProcessGroup odrs.gnome.org
+
WSGIScriptAlias / /odrs-web/odrs.wsgi
SetEnv ODRS_REVIEWS_SECRET replace_odrs_secret
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]