Add Docker support for Ormin + BaraDB dev stack
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

- docker-compose.ormin.yml: BaraDB + Ormin dev environment
- clients/nim/ormin/docker/Dockerfile: dev image with Nim 2.2.10
- clients/nim/ormin/docker/entrypoint.sh: auto-install deps
- docker-compose.test.yml: add Ormin compile test
This commit is contained in:
2026-05-15 22:23:45 +03:00
parent 4e54075078
commit 4ac147dc6c
3 changed files with 97 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
#!/bin/sh
set -eu
# Ormin + BaraDB Dev Entrypoint
# Handles dependency installation and optional example compilation.
DEPS_FLAG="/workspace/.deps-installed"
# Install dependencies once
if [ ! -f "$DEPS_FLAG" ]; then
echo "[ormin-dev] Installing BaraDB client..."
cd /workspace/baradb
nimble install -y
echo "[ormin-dev] Installing Ormin dependencies..."
cd /workspace/ormin
nimble install -y
touch "$DEPS_FLAG"
echo "[ormin-dev] Dependencies ready."
fi
# If no arguments, drop to shell
if [ $# -eq 0 ]; then
exec bash
fi
# Otherwise run the provided command
exec "$@"
+51
View File
@@ -0,0 +1,51 @@
# BaraDB + Ormin Development Stack
#
# Usage:
# docker compose -f docker-compose.ormin.yml up --build -d
# docker compose -f docker-compose.ormin.yml exec ormin-dev bash
#
# Inside the container:
# nim c -r examples/baradb_basic.nim
services:
baradb:
build:
context: .
dockerfile: Dockerfile
image: baradb:latest
container_name: baradb-ormin
hostname: baradb
ports:
- "9472:9472"
healthcheck:
test: ["CMD", "sh", "-c", "wget -qO- http://localhost:9912/health >/dev/null 2>&1"]
interval: 5s
timeout: 3s
retries: 5
start_period: 10s
networks:
- ormin_net
ormin-dev:
build:
context: .
dockerfile: clients/nim/ormin/docker/Dockerfile
container_name: ormin-dev
depends_on:
baradb:
condition: service_healthy
environment:
- BARADB_HOST=baradb
- BARADB_PORT=9472
volumes:
- ./clients/nim/ormin:/workspace/ormin
- ./clients/nim/src:/workspace/baradb/src
- ./clients/nim/baradb.nimble:/workspace/baradb/baradb.nimble
working_dir: /workspace/ormin
command: tail -f /dev/null
networks:
- ormin_net
networks:
ormin_net:
driver: bridge
+17
View File
@@ -84,6 +84,23 @@ services:
nim c --path:src -r tests/test_integration.nim
"
test-ormin:
image: nimlang/nim:2.2.10
depends_on:
baradb:
condition: service_healthy
environment:
- BARADB_HOST=baradb
- BARADB_PORT=9472
volumes:
- ./clients/nim:/workspace
working_dir: /workspace/ormin
command: >
sh -c "
nimble install -y &&
nim c examples/baradb_basic.nim
"
test-rust:
image: rust:1.78
depends_on: