Added caching to the docker image
This commit is contained in:
parent
551d848a4e
commit
78272ae4cd
2 changed files with 15 additions and 0 deletions
|
@ -8,6 +8,10 @@
|
||||||
|
|
||||||
This is the web frontend for Vikunja, written in Vue.js.
|
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
|
## Project setup
|
||||||
```
|
```
|
||||||
yarn install
|
yarn install
|
||||||
|
|
11
nginx.conf
11
nginx.conf
|
@ -36,6 +36,15 @@ http {
|
||||||
gzip_min_length 256;
|
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;
|
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 {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
listen 81 default_server http2 proxy_protocol; ## Needed when behind HAProxy with SSL termination + HTTP/2 support
|
listen 81 default_server http2 proxy_protocol; ## Needed when behind HAProxy with SSL termination + HTTP/2 support
|
||||||
|
@ -43,6 +52,8 @@ http {
|
||||||
|
|
||||||
server_name _;
|
server_name _;
|
||||||
|
|
||||||
|
expires $expires;
|
||||||
|
|
||||||
ssl_certificate /etc/nginx/ssl/dummy.crt;
|
ssl_certificate /etc/nginx/ssl/dummy.crt;
|
||||||
ssl_certificate_key /etc/nginx/ssl/dummy.key;
|
ssl_certificate_key /etc/nginx/ssl/dummy.key;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue