Added caching to the docker image

This commit is contained in:
kolaente 2019-08-17 11:52:35 +02:00
parent 551d848a4e
commit 78272ae4cd
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
2 changed files with 15 additions and 0 deletions

View File

@ -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

View File

@ -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;