Skip to content

Commit

Permalink
Add caching to mafiastarlite
Browse files Browse the repository at this point in the history
  • Loading branch information
timonegk committed Aug 8, 2023
1 parent c8da57a commit 6404584
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion MafiAStarLite/MafiAStarLite
Submodule MafiAStarLite updated from 37bcfe to 4421e6
20 changes: 18 additions & 2 deletions MafiAStarLite/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# vim: set filetype=conf:

proxy_cache_path /tmp/nginx_cache levels=1:2 keys_zone=images:10m inactive=30d max_size=1g;

server {
listen 80;
server_name default_server;
Expand All @@ -17,8 +19,22 @@ server {
uwsgi_pass 127.0.0.1:3008;
}

location /songs_internal {
location /songs_internal/ {
internal;
alias /app/songs;
proxy_pass http://127.0.0.1:8888;
proxy_cache images;
proxy_cache_valid 200 30d;
}
}

server {
listen 8888;
server_name default_server;

location /songs_internal/ {
alias /app/songs/;
image_filter resize 256 -;
image_filter_jpeg_quality 90;
image_filter_buffer 20M;
}
}

0 comments on commit 6404584

Please sign in to comment.