haproxy:
charm: haproxy
constraints: cpu-cores=1 mem={{standard_ram}}
num_units: {{standard_units}}
expose: True
options:
enable_monitoring: true
ssl_cert: include-base64://{{local_dir}}/staging.review.jujucharms.com.crt
ssl_key: include-base64://{{local_dir}}/staging.review.jujucharms.com.key
services: |
- service_name: review-queue
service_host: "0.0.0.0"
service_port: 443
crts: [DEFAULT]
service_options:
- "mode http"
- "balance leastconn"
- "option httpchk HEAD / HTTP/1.0"
- "http-request set-header X-Forwarded-Proto https"
- "redirect scheme https code 301 if !{ ssl_fc }"
server_options: maxconn 100 cookie S{i} check
- service_name: review-queue-redir
service_host: "0.0.0.0"
service_port: 80
service_options:
- "redirect scheme https code 301 if !{ ssl_fc }"