[library-web/oscp] Land support for the /search endpoint
- From: Andrea Veri <averi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [library-web/oscp] Land support for the /search endpoint
- Date: Thu, 13 Feb 2020 19:20:13 +0000 (UTC)
commit ba7e06b2ff8b2f17bc3c3a67bca77f53be0ba93d
Author: Andrea Veri <averi redhat com>
Date: Thu Feb 13 20:14:18 2020 +0100
Land support for the /search endpoint
httpd/Dockerfile | 7 +++++++
httpd/developer.lgorc | 42 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 49 insertions(+)
---
diff --git a/httpd/Dockerfile b/httpd/Dockerfile
index 806186e..67b93cc 100644
--- a/httpd/Dockerfile
+++ b/httpd/Dockerfile
@@ -1,6 +1,13 @@
FROM centos/httpd-24-centos7
USER root
+RUN yum install -y python-html5lib python-sqlite2 git python2-django && \
+ yum -y clean all --enablerepo='*'
+
+RUN git clone https://gitlab.gnome.org/Infrastructure/library-web.git /opt/lgo
+
+ADD developer.lgorc /opt/app-root/src
+
COPY app_data /opt/app-root/src
RUN chown -R 1000390000:1000390000 /opt/app-root/src
diff --git a/httpd/developer.lgorc b/httpd/developer.lgorc
new file mode 100644
index 0000000..439a9fb
--- /dev/null
+++ b/httpd/developer.lgorc
@@ -0,0 +1,42 @@
+import sys
+
+baseref = 'https://developer.gnome.org'
+private_dir = '/data'
+download_cache_dir = os.path.join(private_dir, 'cache')
+output_dir = '/data/output/developer.gnome.org'
+ftp_gnome_org_local_copy = "/ftp"
+fast_mode = True
+
+version_min = '2.32'
+#version_min = '3.10'
+channels = ['devel']
+doc_path_template = '/%(module)s/'
+indexes_xsl_file = '/opt/lgo/data/xslt/dev_indexes.xsl'
+
+symbols_dbm_filepath = '/data/symbols/db-symbols.db'
+symbols_sqlite_filepath = '/data/symbols/db-symbols.sqlite'
+
+blacklist = ['folks']
+#use_git_for_stable_version = ['gnome-devel-docs']
+
+#nightly_tarballs_location = '/usr/local/www/gnomeweb/nightly-tarballs/'
+
+
+mal2html_xsl_filename = '/opt/lgo/data/xslt/mal2html.xsl'
+mal2html_xsl = file(mal2html_xsl_filename).read()
+if '/usr/share/yelp-xsl/xslt/mallard' in mal2html_xsl:
+ atime, mtime = os.stat(mal2html_xsl_filename)[-3:-1]
+ mal2html_xsl = mal2html_xsl.replace('/usr/share/yelp-xsl/xslt/mallard',
+ '/opt/yelp-xsl/xslt/mallard')
+ file(mal2html_xsl_filename, 'w').write(mal2html_xsl)
+ import subprocess
+ sp = subprocess.Popen(['git', 'log', '-n1', '--format=format:%ct', 'mal2html.xsl'],
+ cwd='/opt/lgo/data/xslt/',
+ stdout=subprocess.PIPE)
+ stdout, stderr = sp.communicate()
+ new_mtime = int(stdout.strip())
+ os.utime(mal2html_xsl_filename, (new_mtime, new_mtime))
+
+
+extra_tarballs.extend(['gnome://gnome-devel-docs?min=3.17'])
+extra_tarballs.extend(['gnome://gtk+?min=3.89'])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]