Update service socket docs

This commit is contained in:
apainintheneck 2023-09-24 12:04:55 -07:00
parent afeef33bc1
commit ddfa723f77

View File

@ -1052,6 +1052,24 @@ The `sockets` method accepts a formatted socket definition as `<type>://<host>:<
Please note that sockets will be accessible on IPv4 and IPv6 addresses by default. Please note that sockets will be accessible on IPv4 and IPv6 addresses by default.
If you only need one socket and you don't care about the name (the default is `Listeners`):
```rb
service do
run [opt_bin/"beanstalkd", "test"]
sockets "tcp://127.0.0.1:80"
end
```
If you need multiple sockets and/or you want to specify the name:
```rb
service do
run [opt_bin/"beanstalkd", "test"]
sockets "Socket" => "tcp://0.0.0.0:80", "SocketTLS" => "tcp://0.0.0.0:443"
end
```
### Using environment variables ### Using environment variables
Homebrew has multiple levels of environment variable filtering which affects which variables are available to formulae. Homebrew has multiple levels of environment variable filtering which affects which variables are available to formulae.