server {
  listen 80;
  server_name pi.cloud.docker;

  keepalive_timeout 5;

  root /var/www/piCloud/static;

  location / {
    try_files $uri @proxy_to_app;
  }

  location @proxy_to_app {
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;
    proxy_pass http://unix:/var/run/piCloud.sock;
  }
}