Test and check Couchbase network connectivity using PHP SDKs.
- Test Couchbase connectivity using PHP SDK v3.x and v4.x
- Supports read-only and full checks
- Configurable log verbosity
- Dockerized for easy usage
Pull and run the Docker image with required environment variables:
docker run --rm \
-e COUCHBASE_CONNSTR="couchbase://host.docker.internal" \
-e COUCHBASE_USER="username" \
-e COUCHBASE_PASS="password" \
-ti deminy/couchbase-network-checkCOUCHBASE_CONNSTR: Couchbase connection string (e.g.,couchbase://host.docker.internal)COUCHBASE_USER: Couchbase usernameCOUCHBASE_PASS: Couchbase password
COUCHBASE_BUCKET: To perform read/write checks on a specific bucket. If not set, only basic connectivity checks are performed.COUCHBASE_READONLY: Set to1to perform read-only checks on the specified bucket. RequiresCOUCHBASE_BUCKET.COUCHBASE_LOG_LEVEL: Set todebugortracefor verbose logging.
docker run --rm \
-e COUCHBASE_CONNSTR="couchbase://host.docker.internal" \
-e COUCHBASE_USER="username" \
-e COUCHBASE_PASS="password" \
-e COUCHBASE_BUCKET="test" \
-e COUCHBASE_READONLY=1 \
-ti deminy/couchbase-network-checkdocker run --rm \
-e COUCHBASE_CONNSTR="couchbase://host.docker.internal" \
-e COUCHBASE_USER="username" \
-e COUCHBASE_PASS="password" \
-e COUCHBASE_LOG_LEVEL=debug \
-ti deminy/couchbase-network-checkdocker build --build-arg COUCHBASE_VERSION=4.4.0 -t deminy/couchbase-network-check .
docker build --build-arg COUCHBASE_VERSION=4.4.0 -t deminy/couchbase-network-check:4.4.0 .
docker build --platform linux/amd64 \
--build-arg COUCHBASE_VERSION=3.2.2 \
-t deminy/couchbase-network-check:3.2.2 .docker compose up -d
docker compose exec -ti couchbase4 php --ri couchbase # PHP SDK v4.4.0
docker compose exec -ti couchbase3 php --ri couchbase # PHP SDK v3.2.2# Basic connectivity checks:
docker compose exec -ti couchbase4 php ./check.php
docker compose exec -ti couchbase3 php ./check.php
# Perform read/write checks on a specific bucket:
docker compose exec -e COUCHBASE_BUCKET=test -ti couchbase4 php ./check.php
docker compose exec -e COUCHBASE_BUCKET=test -ti couchbase3 php ./check.php
# Read-only checks:
docker compose exec -e COUCHBASE_BUCKET=test -e COUCHBASE_READONLY=1 -ti couchbase4 php ./check.php
docker compose exec -e COUCHBASE_BUCKET=test -e COUCHBASE_READONLY=1 -ti couchbase3 php ./check.php
# Debug-level logging:
docker compose exec -e COUCHBASE_LOG_LEVEL=debug -ti couchbase4 php ./check.php
docker compose exec -e COUCHBASE_LOG_LEVEL=debug -ti couchbase3 php ./check.php
# Trace-level logging:
docker compose exec -e COUCHBASE_LOG_LEVEL=trace -ti couchbase4 php ./check.php
docker compose exec -e COUCHBASE_LOG_LEVEL=trace -ti couchbase3 php ./check.phpdocker compose downThis project is licensed under the terms of the MIT License. See LICENSE.txt for details.