Files
Baradb/scripts/docker-run.sh
T
dimgigov cd46edcb67
CI / test (push) Has been cancelled
CI / verify (push) Has been cancelled
Clients CI / build-server (push) Has been cancelled
Clients CI / test-python (push) Has been cancelled
Clients CI / test-javascript (push) Has been cancelled
Clients CI / test-nim (push) Has been cancelled
Clients CI / test-rust (push) Has been cancelled
Bump version to 1.1.6; fix storage bugs, tests, CI pipeline and Docker config
Storage fixes:
- Fix bloom filter hash2 OverflowDefect (uint64 instead of int Hash)
- Fix MemTable.put size calculation on overwrite (was leaking size)
- Fix fuzz_test duplicate-key issues in LSM delete and SSTable tests

Test fixes:
- Fix stress_test.nim: replace deprecated threadpool with std/threads
- Fix fuzz_test.nim: add missing imports (tables, algorithm, sets)
- Fix fuzz_test.nim: var sst for close() compatibility
- Remove unused imports from test_all.nim and bench_all.nim

Docker / CI fixes:
- Fix Dockerfile.source: invalid nimlang/nim:2.2.10-alpine tag → 2.2.10 + ubuntu:24.04 runtime
- Fix Dockerfile.source healthcheck (--spider → -qO- for 200 OK)
- Fix Dockerfile run comment ports (9470/9471 → 9912/9913)
- Fix scripts/docker-run.sh healthcheck port (9470 → 9912)
- Add ARG BUILD_DATE/VCS_REF to Dockerfile for docker-build.sh
- Update all version strings 1.1.4 → 1.1.6 across nimble/docker/source/docs
2026-05-19 12:13:33 +03:00

47 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
set -e
# BaraDB Docker Run Script
# Улеснява стартирането на BaraDB контейнер с правилни настройки
IMAGE_NAME="${IMAGE_NAME:-baradb:latest}"
CONTAINER_NAME="${CONTAINER_NAME:-baradb}"
DATA_DIR="${DATA_DIR:-$(pwd)/data/docker}"
echo "=== Starting BaraDB Container ==="
echo "Image: ${IMAGE_NAME}"
echo "Container: ${CONTAINER_NAME}"
echo "Data directory: ${DATA_DIR}"
echo ""
# Създаваме локална data директория ако не съществува
mkdir -p "${DATA_DIR}"
docker run -d \
--name "${CONTAINER_NAME}" \
--hostname baradb \
--restart unless-stopped \
-p 9472:9472 \
-p 9912:9912 \
-p 9913:9913 \
-v "${DATA_DIR}:/data" \
-e BARADB_ADDRESS=0.0.0.0 \
-e BARADB_PORT=9472 \
-e BARADB_DATA_DIR=/data \
-e BARADB_LOG_LEVEL=info \
--health-cmd "wget -q --spider http://localhost:9912/health || exit 1" \
--health-interval 15s \
--health-timeout 5s \
--health-retries 3 \
"${IMAGE_NAME}"
echo ""
echo "=== Container Started ==="
echo "Logs: docker logs -f ${CONTAINER_NAME}"
echo "Stop: docker stop ${CONTAINER_NAME}"
echo ""
echo "API Endpoints:"
echo " Binary Protocol: localhost:9472"
echo " HTTP/REST: http://localhost:9912"
echo " WebSocket: ws://localhost:9913"