Skip to content

Commit

Permalink
use servers.conf instead
Browse files Browse the repository at this point in the history
  • Loading branch information
fabienheureux committed Jan 23, 2025
1 parent cb4f07d commit cfa35e6
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 4 deletions.
4 changes: 0 additions & 4 deletions nginx.conf

This file was deleted.

27 changes: 27 additions & 0 deletions servers.conf.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
server {
listen <%= ENV["PORT"] %>;
server_name _;

proxy_cache_path /tmp/nginx_assistant_cache levels=1:2 keys_zone=assistant:10m max_size=1g inactive=60m use_temp_path=off;

location /static/ {
expires max;
alias /app/staticfiles/;
}

location / {
proxy_pass http://unix:/tmp/gunicorn.sock;
proxy_cache assistant;
proxy_cache_key $request_method$request_uri;
proxy_cache_lock on;
proxy_cache_lock_timeout 10s;
proxy_cache_use_stale error timeout updating;
proxy_cache_background_update on;
add_header X-Cache-Status $upstream_cache_status;
}

location ~ ^/(favicon(?:-\d+)?.(?:jpe?g|png|ico))$ {
access_log off;
log_not_found off;
}
}

0 comments on commit cfa35e6

Please sign in to comment.