set haproxy to use the variables.env file for BASE_URL

This commit is contained in:
deflax 2024-01-03 02:30:21 +00:00
parent 27e6b8c5c2
commit 4a2d41f2fd
3 changed files with 6 additions and 6 deletions

2
.gitignore vendored
View file

@ -172,6 +172,4 @@ logs/
variables.env variables.env
# configs # configs
haproxy.cfg
mediamtx.yml mediamtx.yml
nginx.conf

View file

@ -62,9 +62,9 @@ frontend https
# Router # Router
# ACL to match the sni hosts # ACL to match the sni hosts
acl is_stream ssl_fc_sni -i stream.example.com acl is_stream ssl_fc_sni -i "stream.${BASE_URL}"
acl is_tv ssl_fc_sni -i tv.example.com acl is_tv ssl_fc_sni -i "tv.${BASE_URL}"
acl is_vod ssl_fc_sni -i vod.example.com acl is_vod ssl_fc_sni -i "vod.${BASE_URL}"
# Define the ACL conditions and corresponding actions # Define the ACL conditions and corresponding actions
use_backend backend_restreamer if is_stream use_backend backend_restreamer if is_stream
@ -81,4 +81,4 @@ backend backend_scheduler
backend backend_archive backend backend_archive
balance leastconn balance leastconn
server archive1 archive:80 check inter 5s rise 4 fall 2 server archive1 archive:3000 check inter 5s rise 4 fall 2

View file

@ -7,6 +7,8 @@ networks:
services: services:
haproxy: haproxy:
image: haproxy:lts image: haproxy:lts
env_file:
- "variables.env"
ports: ports:
- "80:80" - "80:80"
- "443:443" - "443:443"