[library-web/oscp] Move the httpd image to use centos/httpd-24-centos7
- From: Andrea Veri <averi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [library-web/oscp] Move the httpd image to use centos/httpd-24-centos7
- Date: Thu, 23 Jan 2020 16:38:42 +0000 (UTC)
commit 8edb0ae98984246c0e82ac97f63a9b7e78eb73a4
Author: Andrea Veri <averi redhat com>
Date: Thu Jan 23 17:38:12 2020 +0100
Move the httpd image to use centos/httpd-24-centos7
httpd/Dockerfile | 26 ++++----------
.../httpd-cfg}/developer.gnome.org.conf | 1 -
httpd/app_data/httpd-cfg/help.gnome.org.conf | 41 ++++++++++++++++++++++
httpd/entrypoint.sh | 2 --
4 files changed, 48 insertions(+), 22 deletions(-)
---
diff --git a/httpd/Dockerfile b/httpd/Dockerfile
index c5bd602..806186e 100644
--- a/httpd/Dockerfile
+++ b/httpd/Dockerfile
@@ -1,22 +1,10 @@
-FROM centos/s2i-base-centos7
+FROM centos/httpd-24-centos7
+USER root
-RUN INSTALL_PKGS="httpd24 httpd24-mod_ssl" && \
- yum install -y centos-release-scl epel-release && \
- yum -y --setopt=tsflags=nodocs install --enablerepo=centosplus $INSTALL_PKGS && \
- rpm -V $INSTALL_PKGS && \
- # Remove centos-logos (httpd dependency) to keep image size smaller.
- rpm -e --nodeps centos-logos && \
- yum -y clean all --enablerepo='*'
+COPY app_data /opt/app-root/src
+RUN chown -R 1000390000:1000390000 /opt/app-root/src
-RUN sed -ri ' s!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g; s!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g;'
/opt/rh/httpd24/root/etc/httpd/conf/httpd.conf && \
- sed -ri ' s!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g; s!^(\s*TransferLog)\s+\S+!\1 /proc/self/fd/1!g;
s!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g;' /opt/rh/httpd24/root/etc/httpd/conf.d/ssl.conf
+EXPOSE 8080
-RUN sed -i 's/Listen\ 80/Listen\ 8080/' /opt/rh/httpd24/root/etc/httpd/conf/httpd.conf && \
- sed -i 's/Listen\ 443/Listen\ 8443/' /opt/rh/httpd24/root/etc/httpd/conf.d/ssl.conf && \
- sed -i 's/_default_:443/_default_:8443/' /opt/rh/httpd24/root/etc/httpd/conf.d/ssl.conf
-
-ADD developer.gnome.org.conf /opt/rh/httpd24/root/etc/httpd/conf.d/developer.gnome.org.conf
-
-ADD entrypoint.sh /entrypoint.sh
-ENTRYPOINT ["/entrypoint.sh"]
-CMD ["httpd", "-DFOREGROUND"]
+USER 1001
+ENTRYPOINT ["/usr/bin/run-httpd"]
diff --git a/httpd/developer.gnome.org.conf b/httpd/app_data/httpd-cfg/developer.gnome.org.conf
similarity index 97%
rename from httpd/developer.gnome.org.conf
rename to httpd/app_data/httpd-cfg/developer.gnome.org.conf
index 630ed1c..ba1a6be 100644
--- a/httpd/developer.gnome.org.conf
+++ b/httpd/app_data/httpd-cfg/developer.gnome.org.conf
@@ -1,7 +1,6 @@
<VirtualHost *:8080>
DocumentRoot /data/output/developer.gnome.org
ServerName developer.gnome.org
- ServerAlias developer.oscp.gnome.org
SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" forwarded
diff --git a/httpd/app_data/httpd-cfg/help.gnome.org.conf b/httpd/app_data/httpd-cfg/help.gnome.org.conf
new file mode 100644
index 0000000..2ba33f1
--- /dev/null
+++ b/httpd/app_data/httpd-cfg/help.gnome.org.conf
@@ -0,0 +1,41 @@
+<VirtualHost *:8080>
+ DocumentRoot /data/output/help.gnome.org
+ ServerName help.gnome.org
+
+ DirectoryIndex index.html
+
+ RemoveType .el .gv .ms .pl .ps .si .sl .tr
+
+ WSGIDaemonProcess library
+ WSGIProcessGroup library
+
+ WSGIScriptAlias /symbols /var/cache/gnomeweb/git/library-web/web/lgoweb.wsgi
+
+ RedirectPermanent /devel/ https://developer.gnome.org/
+ RedirectPermanent /devel https://developer.gnome.org
+
+ # Bug #688491
+ RedirectMatch /users/gnome-access-guide/(.*)$ https://help.gnome.org/users/gnome-help/$1
+
+ # Bug #744334
+ RedirectPermanent /users/programming-guidelines https://developer.gnome.org/programming-guidelines
+ RedirectMatch /users/programming-guidelines/(.*)$ https://developer.gnome.org/programming-guidelines/$1
+</VirtualHost>
+
+<Directory /data/output/help.gnome.org>
+ Options +Indexes +MultiViews
+
+ IndexOptions +FancyIndexing -IconsAreLinks +VersionSort +FoldersFirst +SuppressHTMLPreamble
+ HeaderName /HEADER.html
+ ReadmeName /FOOTER.html
+ IndexStyleSheet /lgo.css
+
+ SetEnvIf Cookie "language=(.+)" prefer-language=$1 Header append Vary cookie
+ #SetEnvIf Cookie "language=en" prefer-language=en
+ #SetEnvIf Cookie "language=sr" prefer-language=sr
+
+ LanguagePriority en
+ ForceLanguagePriority Prefer Fallback
+
+ Header append Vary Cookie
+</Directory>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]