Skip to content

Commit 85335bc

Browse files
committed
Merge branch 'main' of https://github.com/jokob-sk/Pi.Alert
2 parents 93420b1 + b7d60ea commit 85335bc

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

dockerfiles/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ docker run -d --rm --network=host \
3535
| Variable | Description | Default |
3636
| :------------- |:-------------| -----:|
3737
| `PORT` |Port of the web interface | `20211` |
38+
| `LISTEN_ADDR` |Set the specific IP Address for the web interface | `0.0.0.0` |
3839
|`TZ` |Time zone to display stats correctly. Find your time zone [here](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) | `Europe/Berlin` |
3940
|`HOST_USER_GID` |User ID (UID) to map the user in the container to a server user with sufficient read&write permissions on the mapped files | `1000` |
4041
|`HOST_USER_ID` |User Group ID (GID) to map the user group in the container to a server user group with sufficient read&write permissions on the mapped files | `1000` |

dockerfiles/start.sh

+4
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ sudo ln -s "$INSTALL_DIR/pialert/install/default" /etc/nginx/sites-available/def
4848
# use user-supplied port
4949
sudo sed -i 's/listen 80/listen '"$PORT"'/g' /etc/nginx/sites-available/default
5050

51+
# Change web interface address if set
52+
if [ -n "${LISTEN_ADDR}" ]; then
53+
sed -ie 's/listen /listen '${LISTEN_ADDR}:'/g' /etc/nginx/sites-available/default
54+
fi
5155

5256
# Run the hardware vendors update at least once
5357
echo "[INSTALL] Run the hardware vendors update"

0 commit comments

Comments
 (0)