cloudflare fixed tunnel name (#1096)

## Description:
The binary created a new tunnel on startup, and if the container crashed
looped, then it would generate 100s of tunnels causing us to reach the
1000 tunnel limit.

Now the config is stored on a mounted volume, so if the container
restarts it sees the existing config and does not create a new tunnel.

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

## Please put your Discord username so you can be contacted if a bug or
regression is found:

evan
This commit is contained in:
evanpelle
2025-06-08 19:38:23 -07:00
committed by GitHub
parent 359af90727
commit 718eda9888
7 changed files with 59 additions and 33 deletions
+5
View File
@@ -58,10 +58,15 @@ else
fi
echo "Starting new container for ${HOST} environment..."
# Remove any existing volume for this container if it exists
docker volume rm "cloudflared-${CONTAINER_NAME}" 2> /dev/null || true
docker run -d \
--restart="${RESTART}" \
--env-file "$ENV_FILE" \
--name "${CONTAINER_NAME}" \
-v "cloudflared-${CONTAINER_NAME}:/etc/cloudflared" \
"${DOCKER_IMAGE}"
if [ $? -eq 0 ]; then