diff --git a/.gitignore b/.gitignore index a96e812..7d8c716 100644 --- a/.gitignore +++ b/.gitignore @@ -172,6 +172,4 @@ logs/ variables.env # configs -haproxy.cfg mediamtx.yml -nginx.conf diff --git a/config/haproxy/haproxy.cfg.dist b/config/haproxy/haproxy.cfg similarity index 93% rename from config/haproxy/haproxy.cfg.dist rename to config/haproxy/haproxy.cfg index 0a14d35..410a4e7 100644 --- a/config/haproxy/haproxy.cfg.dist +++ b/config/haproxy/haproxy.cfg @@ -62,9 +62,9 @@ frontend https # Router # ACL to match the sni hosts - acl is_stream ssl_fc_sni -i stream.example.com - acl is_tv ssl_fc_sni -i tv.example.com - acl is_vod ssl_fc_sni -i vod.example.com + acl is_stream ssl_fc_sni -i "stream.${BASE_URL}" + acl is_tv ssl_fc_sni -i "tv.${BASE_URL}" + acl is_vod ssl_fc_sni -i "vod.${BASE_URL}" # Define the ACL conditions and corresponding actions use_backend backend_restreamer if is_stream @@ -81,4 +81,4 @@ backend backend_scheduler backend backend_archive balance leastconn - server archive1 archive:80 check inter 5s rise 4 fall 2 + server archive1 archive:3000 check inter 5s rise 4 fall 2 diff --git a/docker-compose.yml b/docker-compose.yml index adcdf16..da23439 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,6 +7,8 @@ networks: services: haproxy: image: haproxy:lts + env_file: + - "variables.env" ports: - "80:80" - "443:443"