[indico-web] Add static image



commit 4e3fc7d762cf08728df2f5a69a2bcae3b782abff
Author: Bartłomiej Piotrowski <bpiotrowski gnome org>
Date:   Tue Nov 26 16:02:12 2019 +0100

    Add static image

 static/Dockerfile  | 14 ++++++++++++++
 static/indico.conf | 23 +++++++++++++++++++++++
 2 files changed, 37 insertions(+)
---
diff --git a/static/Dockerfile b/static/Dockerfile
new file mode 100644
index 0000000..1b02257
--- /dev/null
+++ b/static/Dockerfile
@@ -0,0 +1,14 @@
+FROM nginxinc/nginx-unprivileged:stable-alpine
+
+USER root
+RUN apk add --no-cache py-pip unzip
+
+RUN mkdir /tmp/indico-pip && \
+    pip download --no-deps -d /tmp/indico-pip indico && \
+    unzip /tmp/indico-pip/indico-*.whl -d /srv/ 'indico/web/static/*' && \
+    rm -rf /tmp/indico-pip
+
+RUN rm /etc/nginx/conf.d/default.conf
+COPY indico.conf /etc/nginx/conf.d/indico.conf
+
+EXPOSE 8080
diff --git a/static/indico.conf b/static/indico.conf
new file mode 100644
index 0000000..9f827f0
--- /dev/null
+++ b/static/indico.conf
@@ -0,0 +1,23 @@
+server {
+  listen 8080;
+  listen [::]:8080;
+  error_log stderr error;
+
+  location ~ ^/(images|fonts)(.*)/(.+?)(__v[0-9a-f]+)?\.([^.]+)$ {
+    alias /srv/indico/web/static/$1$2/$3.$5;
+  }
+
+  location ~ ^/(css|dist|images|fonts)/(.*)$ {
+    alias /srv/indico/web/static/$1/$2;
+    access_log off;
+  }
+
+  location /robots.txt {
+    alias /srv/indico/web/static/robots.txt;
+    access_log off;
+  }
+
+  location / {
+    return 404;
+  }
+}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]