This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
FROM haproxy:3.2-alpine@sha256:dfba86f031bd4c9039f10f8cc5de75991d1b6766d5460f0335b980408503baad
|
||||
|
||||
COPY infrastructure/haproxy/haproxy.cfg /usr/local/etc/haproxy/haproxy.cfg
|
||||
|
||||
USER 1000:1000
|
||||
|
||||
EXPOSE 8443
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
global
|
||||
log stdout format raw local0
|
||||
maxconn 2048
|
||||
|
||||
defaults
|
||||
log global
|
||||
mode http
|
||||
option httplog
|
||||
timeout connect 3s
|
||||
timeout client 30s
|
||||
timeout server 30s
|
||||
|
||||
resolvers docker
|
||||
nameserver dns 127.0.0.11:53
|
||||
resolve_retries 3
|
||||
timeout resolve 1s
|
||||
timeout retry 1s
|
||||
hold valid 1s
|
||||
|
||||
frontend public_https
|
||||
bind :8443 ssl crt /run/secrets/ingress_pem alpn h2,http/1.1 ssl-min-ver TLSv1.3
|
||||
http-request set-header X-Forwarded-Proto https
|
||||
default_backend api_mtls
|
||||
|
||||
backend api_mtls
|
||||
balance leastconn
|
||||
option httpchk
|
||||
http-check send meth GET uri /health/lb ver HTTP/1.1 hdr Host api
|
||||
http-check expect status 200
|
||||
default-server check inter 2s fall 2 rise 2 resolvers docker init-addr libc,none ssl ssl-min-ver TLSv1.3 verify required verifyhost api ca-file /run/secrets/tls_ca crt /run/secrets/lb_client_pem
|
||||
server-template api 8 api:8444
|
||||
Reference in New Issue
Block a user