Skip to content

Commit f611312

Browse files
committed
Use variable for 8123 port setting
1 parent fb4017f commit f611312

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

start_container.sh

+5-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
# `-o pipefail`: Prevent errors in a pipeline (`|`) from being masked
66
set -uo pipefail
77

8+
declare -r APP_PORT=8123
9+
810
# Import environment variables from .env
911
set -o allexport && source .env && set +o allexport
10-
echo "Starting container for image '$DOCKER_IMAGE_NAME:$DOCKER_IMAGE_TAG', exposing port 8123/tcp"
11-
echo "- Run 'curl http://localhost:8123/status' to send a test request to the containerized app."
12+
echo "Starting container for image '$DOCKER_IMAGE_NAME:$DOCKER_IMAGE_TAG', exposing port ${APP_PORT}/tcp"
13+
echo "- Run 'curl http://localhost:${APP_PORT}/status' to send a test request to the containerized app."
1214
echo "- Enter Ctrl-C to stop the container."
13-
docker run -p 8123:8123 "$DOCKER_IMAGE_NAME":"$DOCKER_IMAGE_TAG"
15+
docker run -p "$APP_PORT:$APP_PORT" "$DOCKER_IMAGE_NAME":"$DOCKER_IMAGE_TAG"

0 commit comments

Comments
 (0)