Skip to content

Commit

Permalink
Merge pull request #490 from silverbios/set-listener-address
Browse files Browse the repository at this point in the history
Add option to set IP Address for web interface in Docker env - thanks to @silverbios 🙏
  • Loading branch information
jokob-sk authored Nov 8, 2023
2 parents b86f1d7 + 0551cd1 commit b7d60ea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions dockerfiles/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ docker run -d --rm --network=host \
| Variable | Description | Default |
| :------------- |:-------------| -----:|
| `PORT` |Port of the web interface | `20211` |
| `LISTEN_ADDR` |Set the specific IP Address for the web interface | `0.0.0.0` |
|`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` |
|`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` |
|`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` |
Expand Down
4 changes: 4 additions & 0 deletions dockerfiles/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ sudo ln -s "$INSTALL_DIR/pialert/install/default" /etc/nginx/sites-available/def
# use user-supplied port
sudo sed -i 's/listen 80/listen '"$PORT"'/g' /etc/nginx/sites-available/default

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

# Run the hardware vendors update at least once
echo "[INSTALL] Run the hardware vendors update"
Expand Down

0 comments on commit b7d60ea

Please sign in to comment.