nomad

HCL and Docker files for Nomad deployments
git clone https://git.in0rdr.ch/nomad.git
Log | Files | Refs | Pull requests |Archive

nginx-proxy.conf.tmpl (1050B)


      1 server {
      2     listen               {{ env "NOMAD_PORT_proxy_https" }} ssl;
      3 
      4     ssl_certificate      /etc/letsencrypt/live/myheats-demo.p0c.ch/fullchain.pem;
      5     ssl_certificate_key  /etc/letsencrypt/live/myheats-demo.p0c.ch/privkey.pem;
      6 
      7     location / {
      8         proxy_pass       http://{{ env "NOMAD_ADDR_frontend_http" }};
      9         proxy_set_header Host $host;
     10         proxy_set_header X-Real-IP $remote_addr;
     11         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
     12         proxy_set_header X-Forwarded-Proto $scheme;
     13     }
     14     location /v1 {
     15         proxy_pass       http://{{ env "NOMAD_ADDR_api_http" }};
     16         proxy_set_header Host $host;
     17         proxy_set_header X-Real-IP $remote_addr;
     18         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
     19         proxy_set_header X-Forwarded-Proto $scheme;
     20 
     21         # WebSocket proxying
     22         # https://nginx.org/en/docs/http/websocket.html
     23         proxy_http_version 1.1;
     24         proxy_set_header Upgrade $http_upgrade;
     25         proxy_set_header Connection "upgrade";
     26     }
     27 }