diff --git a/README.md b/README.md index ea29dd2ad7..1e30c641ca 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,10 @@ This is the web frontend for Vikunja, written in Vue.js. +## Docker + +There is a [docker image available](https://hub.docker.com/r/vikunja/api) with support for http/2 and aggressive caching enabled. + ## Project setup ``` yarn install diff --git a/nginx.conf b/nginx.conf index 1126ab4dcd..e0e517a413 100644 --- a/nginx.conf +++ b/nginx.conf @@ -36,6 +36,15 @@ http { gzip_min_length 256; gzip_types text/plain text/css application/json application/x-javascript application/javascript text/xml application/xml application/xml+rss text/javascript application/vnd.ms-fontobject application/x-font-ttf font/opentype image/svg+xml font/woff2 text/html image/x-icon; + # Expires map + map $sent_http_content_type $expires { + default off; + text/html epoch; # We don't cache the html for the browser to get the content + text/css max; + application/javascript max; + ~image/ max; + } + server { listen 80; listen 81 default_server http2 proxy_protocol; ## Needed when behind HAProxy with SSL termination + HTTP/2 support @@ -43,6 +52,8 @@ http { server_name _; + expires $expires; + ssl_certificate /etc/nginx/ssl/dummy.crt; ssl_certificate_key /etc/nginx/ssl/dummy.key;