nomad

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

nginx.conf.tmpl (1298B)


      1 server {
      2     listen               {{ env "NOMAD_PORT_frontend_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 }
     15 
     16 server {
     17     listen               {{ env "NOMAD_PORT_api_https" }} ssl;
     18 
     19     ssl_certificate      /etc/letsencrypt/live/api-myheats-demo.p0c.ch/fullchain.pem;
     20     ssl_certificate_key  /etc/letsencrypt/live/api-myheats-demo.p0c.ch/privkey.pem;
     21 
     22     location / {
     23         proxy_pass       http://{{ env "NOMAD_ADDR_api_http" }};
     24         proxy_set_header Host $host;
     25         proxy_set_header X-Real-IP $remote_addr;
     26         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
     27         proxy_set_header X-Forwarded-Proto $scheme;
     28 
     29         # WebSocket proxying
     30         # https://nginx.org/en/docs/http/websocket.html
     31         proxy_http_version 1.1;
     32         proxy_set_header Upgrade $http_upgrade;
     33         proxy_set_header Connection "upgrade";
     34     }
     35 }