set haproxy to use the variables.env file for BASE_URL
This commit is contained in:
parent
27e6b8c5c2
commit
4a2d41f2fd
3 changed files with 6 additions and 6 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -172,6 +172,4 @@ logs/
|
|||
variables.env
|
||||
|
||||
# configs
|
||||
haproxy.cfg
|
||||
mediamtx.yml
|
||||
nginx.conf
|
||||
|
|
|
@ -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
|
|
@ -7,6 +7,8 @@ networks:
|
|||
services:
|
||||
haproxy:
|
||||
image: haproxy:lts
|
||||
env_file:
|
||||
- "variables.env"
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
|
|
Loading…
Reference in a new issue