mirror of
https://github.com/strukturag/nextcloud-spreed-signaling
synced 2026-03-14 14:35:44 +01:00
docker: Allow configuring read/write timeouts.
This commit is contained in:
parent
ea5eb424d6
commit
403a4417cb
2 changed files with 17 additions and 0 deletions
|
|
@ -15,7 +15,11 @@ The running container can be configured through different environment variables:
|
|||
|
||||
- `CONFIG`: Optional name of configuration file to use.
|
||||
- `HTTP_LISTEN`: Address of HTTP listener.
|
||||
- `HTTP_READ_TIMEOUT`: HTTP socket read timeout in seconds.
|
||||
- `HTTP_WRITE_TIMEOUT`: HTTP socket write timeout in seconds.
|
||||
- `HTTPS_LISTEN`: Address of HTTPS listener.
|
||||
- `HTTPS_READ_TIMEOUT`: HTTPS socket read timeout in seconds.
|
||||
- `HTTPS_WRITE_TIMEOUT`: HTTPS socket write timeout in seconds.
|
||||
- `HTTPS_CERTIFICATE`: Name of certificate file for the HTTPS listener.
|
||||
- `HTTPS_KEY`: Name of private key file for the HTTPS listener.
|
||||
- `HASH_KEY`: Secret value used to generate checksums of sessions (32 or 64 bytes).
|
||||
|
|
|
|||
|
|
@ -39,8 +39,21 @@ if [ ! -f "$CONFIG" ]; then
|
|||
if [ -n "$HTTP_LISTEN" ]; then
|
||||
sed -i "s|#listen = 127.0.0.1:8080|listen = $HTTP_LISTEN|" "$CONFIG"
|
||||
fi
|
||||
if [ -n "$HTTP_READ_TIMEOUT" ]; then
|
||||
sed -i "/HTTP socket/,/HTTP socket/ s|#readtimeout =.*|readtimeout = $HTTP_READ_TIMEOUT|" "$CONFIG"
|
||||
fi
|
||||
if [ -n "$HTTP_WRITE_TIMEOUT" ]; then
|
||||
sed -i "/HTTP socket/,/HTTP socket/ s|#writetimeout =.*|writetimeout = $HTTP_WRITE_TIMEOUT|" "$CONFIG"
|
||||
fi
|
||||
|
||||
if [ -n "$HTTPS_LISTEN" ]; then
|
||||
sed -i "s|#listen = 127.0.0.1:8443|listen = $HTTPS_LISTEN|" "$CONFIG"
|
||||
if [ -n "$HTTPS_READ_TIMEOUT" ]; then
|
||||
sed -i "/HTTPS socket/,/HTTPS socket/ s|#readtimeout =.*|readtimeout = $HTTPS_READ_TIMEOUT|" "$CONFIG"
|
||||
fi
|
||||
if [ -n "$HTTPS_WRITE_TIMEOUT" ]; then
|
||||
sed -i "/HTTPS socket/,/HTTPS socket/ s|#writetimeout =.*|writetimeout = $HTTPS_WRITE_TIMEOUT|" "$CONFIG"
|
||||
fi
|
||||
|
||||
if [ -n "$HTTPS_CERTIFICATE" ]; then
|
||||
sed -i "s|certificate = /etc/nginx/ssl/server.crt|certificate = $HTTPS_CERTIFICATE|" "$CONFIG"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue