Skip to content

Commit

Permalink
Merge pull request #266 from dsgnr/fix_custom_index
Browse files Browse the repository at this point in the history
Fix web container where volume mounts are used
  • Loading branch information
dsgnr authored Nov 18, 2024
2 parents 130da13 + af0dd1e commit d75622d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to this project will be documented in this file.

## [3.1.2] - 2024-11-18
- Fixes a regression caused by [#258](https://github.com/dsgnr/portchecker.io/pull/258)
where the web container would fail to start if the index was overwritten by a custom volume mount.

## [3.1.1] - 2024-11-18
- Fixes incorrect environment variable defaults in README
- Adds threading to `query_ipv4` method. Uses default worker value (CPU count).
Expand Down
2 changes: 1 addition & 1 deletion backend/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]
package-mode = false
name = "portchecker.io"
version = "3.1.1"
version = "3.1.2"
description = """portchecker.io is an open-source API for checking port \
availability on specified hostnames or IP addresses. \
Ideal for developers and network admins, it helps troubleshoot network \
Expand Down
7 changes: 5 additions & 2 deletions frontend/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ set -e
# `DEFAULT_PORT` is set by Webpack at container build time if the environment variable is provided.
# If this variable is not set at that time (like for production images), we must modify the rendered HTML on container up.
if [ -n "$DEFAULT_PORT" ]; then
sed -i -E "s/(<input[^>]*id=\"port\"[^>]*value=\")[^\"]*\"/\\1${DEFAULT_PORT}\"/" /usr/share/nginx/html/index.html
echo "Updated DEFAULT_PORT value to $DEFAULT_PORT."
if sed -i -E "s/(<input[^>]*id=\"port\"[^>]*value=\")[^\"]*\"/\\1${DEFAULT_PORT}\"/" /usr/share/nginx/html/index.html; then
echo "Updated DEFAULT_PORT value to $DEFAULT_PORT."
else
echo "An error occurred when attempting to set the DEFAULT_PORT value."
fi
else
echo "DEFAULT_PORT is not set. No changes made."
fi
Expand Down

0 comments on commit d75622d

Please sign in to comment.