client_max_body_size 2M;

upstream ifcbdb_server {
  server ifcbdb:8000;
}

server {
    listen 80;

    server_name localhost;

    gzip on;
    gzip_proxied any;
    gzip_types application/javascript application/json text/css text/html;

    location /static/ {
        alias /static/;
    }

    location / {
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
	proxy_set_header Host $http_host;
        proxy_redirect off;
	proxy_http_version 1.1;
	proxy_set_header Connection "";

        if (!-f $request_filename) {
            proxy_pass http://ifcbdb_server;
            break;
        }
    }
}
