configure an Nginx proxy for cortex.status.im
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
ca0936b573
commit
9ef85ceeb4
|
@ -1,7 +1,6 @@
|
||||||
---
|
---
|
||||||
# Cortex -----------------------------------------------------------------------
|
# Cortex -----------------------------------------------------------------------
|
||||||
|
cortex_domain: 'cortex.status.im'
|
||||||
# Ports
|
|
||||||
cortex_port: 9001
|
cortex_port: 9001
|
||||||
|
|
||||||
# Paths
|
# Paths
|
||||||
|
@ -20,11 +19,7 @@ cortex_search_nodes: |
|
||||||
| list }}
|
| list }}
|
||||||
|
|
||||||
# The Hive ---------------------------------------------------------------------
|
# The Hive ---------------------------------------------------------------------
|
||||||
|
|
||||||
# The Hive UI
|
|
||||||
the_hive_domain: 'hive.status.im'
|
the_hive_domain: 'hive.status.im'
|
||||||
|
|
||||||
# Ports
|
|
||||||
the_hive_port: 9000
|
the_hive_port: 9000
|
||||||
|
|
||||||
# TheHive application secret
|
# TheHive application secret
|
||||||
|
@ -88,3 +83,30 @@ nginx_sites:
|
||||||
proxy_set_header X-Forwarded-Host $host;
|
proxy_set_header X-Forwarded-Host $host;
|
||||||
proxy_set_header X-Forwarded-Port $server_port;
|
proxy_set_header X-Forwarded-Port $server_port;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cortex_http:
|
||||||
|
- listen 80
|
||||||
|
- server_name {{ cortex_domain }}
|
||||||
|
- return 302 https://$server_name$request_uri
|
||||||
|
|
||||||
|
cortex_https:
|
||||||
|
- listen 443 ssl
|
||||||
|
- server_name {{ cortex_domain }}
|
||||||
|
|
||||||
|
- ssl_certificate /certs/status.im/origin.crt
|
||||||
|
- ssl_certificate_key /certs/status.im/origin.key
|
||||||
|
|
||||||
|
- location / {
|
||||||
|
proxy_pass http://127.0.0.1:{{ cortex_port }}/;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_cache_bypass $http_upgrade;
|
||||||
|
proxy_read_timeout 3600;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "upgrade";
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
proxy_set_header X-Forwarded-Host $host;
|
||||||
|
proxy_set_header X-Forwarded-Port $server_port;
|
||||||
|
}
|
||||||
|
|
9
dns.tf
9
dns.tf
|
@ -7,6 +7,15 @@ resource "cloudflare_record" "hive_ui" {
|
||||||
proxied = true
|
proxied = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resource "cloudflare_record" "cortex_ui" {
|
||||||
|
zone_id = lookup(local.zones, "status.im")
|
||||||
|
type = "A"
|
||||||
|
name = "cortex"
|
||||||
|
value = module.hive_master.public_ips[count.index]
|
||||||
|
count = length(module.hive_master.public_ips)
|
||||||
|
proxied = true
|
||||||
|
}
|
||||||
|
|
||||||
resource "cloudflare_record" "hive_es_hq" {
|
resource "cloudflare_record" "hive_es_hq" {
|
||||||
zone_id = lookup(local.zones, "status.im")
|
zone_id = lookup(local.zones, "status.im")
|
||||||
type = "A"
|
type = "A"
|
||||||
|
|
Loading…
Reference in New Issue