fga-eps-mds/2019.1-unbrake

View on GitHub
deploy/nginx.proxy.prod.conf

Summary

Maintainability
Test Coverage
user nobody nogroup;

error_log /var/log/nginx/error.log debug;
pid /var/run/nginx.pid;

events {
  worker_connections 1024;
  use epoll;
}

http {
  upstream unbrake_frontend {
    server frontend:80;
  }

  server {
    server_name unbrake.ml www.unbrake.ml frontend.unbrake.ml www.frontend.unbrake.ml;
    listen 80;

    location / {
      proxy_pass http://unbrake_frontend;

      proxy_set_header  Host             $host;
      proxy_set_header  X-Real-IP        $remote_addr;
      proxy_set_header  X-Forwarded-For  $proxy_add_x_forwarded_for;
    }
  }

  upstream unbrake_api {
    server api-server:80;
  }
  server {
    listen 80;
    server_name api.unbrake.ml www.api.unbrake.ml;

    location / {
      proxy_pass http://unbrake_api/graphql;

      proxy_set_header  Host             $host;
      proxy_set_header  X-Real-IP        $remote_addr;
      proxy_set_header  X-Forwarded-For  $proxy_add_x_forwarded_for;
    }

    location /mqtt-reading-key {
      proxy_pass http://unbrake_api/graphql/mqtt-reading-key;

      proxy_set_header  Host             $host;
      proxy_set_header  X-Real-IP        $remote_addr;
      proxy_set_header  X-Forwarded-For  $proxy_add_x_forwarded_for;
    }
  }
}