Skip to content

Build from Source

Building from source is useful when you want to contribute to Nyravio, modify the code, or run the latest development state.

For a Docker-based build (recommended):

  • Docker Engine ≥ 24.0 with Docker Compose V2

For local development without Docker:

  • JDK 21 (Eclipse Temurin recommended)
  • Node.js 22
  • PostgreSQL 16 with pgvector extension
  • Gradle 9 (included via wrapper)

The standard Docker build compiles both backend and frontend inside containers — no local JDK or Node.js is required.

Terminal window
git clone https://github.com/LexProfi/Nyravio.git
cd Nyravio
bash setup.sh
docker compose up -d --build

The multi-stage Dockerfile:

  1. Frontend build — Node 22 Alpine, npm ci, npm run build
  2. Backend build — Eclipse Temurin JDK 21 Alpine, Gradle build with frontend assets
  3. Runtime — Eclipse Temurin JRE 21 Alpine, non-root user, health checks
Terminal window
cd backend
./gradlew build

Integration tests with PostgreSQL and pgvector:

Terminal window
./gradlew postgresIntegrationTest

Integration tests require an available Docker daemon (Testcontainers).

Terminal window
cd frontend
npm ci
npm run check
npm run lint
npm run test:unit
npm run build

For local development, you still need PostgreSQL with pgvector and optionally Apache Tika. The simplest approach is to start only the infrastructure services:

Terminal window
# Start only the database and Tika
docker compose up -d db tika
# Run the backend with Gradle (from the backend directory)
./gradlew bootRun
# Run the frontend dev server (from the frontend directory)
npm run dev

The Dockerfile accepts a releaseVersion build argument:

Terminal window
docker compose build --build-arg releaseVersion=1.0.0

If omitted, the version defaults to 0.0.1-SNAPSHOT.

After building and starting:

Terminal window
# Liveness probe
curl http://localhost:8080/health/live
# Readiness probe (includes database connectivity)
curl http://localhost:8080/health/ready

For a full automated verification suite (CI environments only):

Terminal window
bash scripts/ci/smoke-test.sh