Skip to content

Instantly share code, notes, and snippets.

@ruchej
Last active January 8, 2023 18:40
Show Gist options
  • Save ruchej/6c28215954345a811ff241f71a5438e3 to your computer and use it in GitHub Desktop.
Save ruchej/6c28215954345a811ff241f71a5438e3 to your computer and use it in GitHub Desktop.
docker-compose.yml
user nginx;
worker_processes 2;
events {
worker_connections 4096;
}
http {
include /etc/nginx/mime.types;
client_max_body_size 100m;
proxy_read_timeout 600;
proxy_connect_timeout 600;
proxy_send_timeout 600;
upstream backend {
server .....:8000;
}
server {
listen 80;
charset utf-8;
location ~ ^/(admin|swagger|docs|redoc|api|auth|favicon|favicon.ico|silk) {
proxy_redirect off;
proxy_pass http://backend;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
}
location ~ ^/(static|media)/(.*)$ {
alias /app/$1/$2;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment