Files
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

78 lines
2.7 KiB
Docker
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ┌─────────────────────────────────────────────────────────┐
# │ BaraDB — Multimodal Database Engine │
# │ Dockerfile (pre-built binary, production-ready) │
# └─────────────────────────────────────────────────────────┘
#
# Този Dockerfile използва вече компилиран binary от build/.
# За build от source вижте Dockerfile.source
#
# Build:
# docker build -t baradb:latest .
#
# Run:
# docker run -d -p 9472:9472 -p 9912:9912 -p 9913:9913 -v baradb_data:/data baradb:latest
FROM debian:bookworm-slim
ARG BUILD_DATE
ARG VCS_REF
LABEL maintainer="BaraDB Team"
LABEL description="BaraDB — Multimodal Database Engine"
LABEL version="1.1.6"
# Инсталираме runtime зависимости
# libpcre3 — нужна за Nim regex (зарежда се динамично)
# ca-certificates — за TLS връзки
# wget — за healthcheck
RUN apt-get update && \
apt-get install -y --no-install-recommends \
libpcre3 \
ca-certificates \
wget \
gosu && \
rm -rf /var/lib/apt/lists/*
# Създаваме dedicated потребител за сигурност
RUN groupadd -r -g 1000 baradb && \
useradd -r -u 1000 -g baradb baradb
WORKDIR /app
# Копираме компилираните бинарни файлове
COPY build/baradadb /app/baradadb
COPY build/backup /app/backup
# Копираме entrypoint скрипта
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
# Създаваме data директория и symlink за съвместимост с default dataDir=./data
RUN mkdir -p /data && chown baradb:baradb /data && \
ln -s /data /app/data && chown -h baradb:baradb /app/data
# Environment variables (defaults)
ENV BARADB_ADDRESS=0.0.0.0
ENV BARADB_PORT=9472
# Note: HTTP port = TCP port + 440 (9912 when TCP=9472)
# Note: WS port = TCP port + 441 (9913 when TCP=9472)
ENV BARADB_DATA_DIR=/data
ENV BARADB_LOG_LEVEL=info
# Expose ports
# 9472 — Binary wire protocol
# 9912 — HTTP/REST API (9472 + 440)
# 9913 — WebSocket (9472 + 441)
EXPOSE 9472 9912 9913
# Volume за persistent data
VOLUME ["/data"]
# Healthcheck
HEALTHCHECK --interval=15s --timeout=5s --start-period=10s --retries=3 \
CMD wget -qO- http://localhost:9912/health >/dev/null 2>&1 || exit 1
# Стартираме чрез entrypoint (който пуска като baradb потребител)
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["./baradadb"]