API for managing server inventory, network, IP address, shared folders, and scheduled tasks
328
REST API for managing server inventory, network devices, IP address allocation, shared folders, and scheduled tasks. Built on Bun with a distroless container image running as a non-root user (UID 65532).
Run migrations and seed reference data, then stop:
docker run --rm \
-e DATABASE_URL=postgresql://sachiko:password@db-host:5432/sachiko \
reiizumi/sachiko-api:latest init-db
docker run -d \
-e DATABASE_URL=postgresql://sachiko:password@db-host:5432/sachiko \
-e OIDC_WELL_KNOWN_URL=https://idp.example.com/.well-known/openid-configuration \
-e CORS_ORIGINS=https://sachiko.example.com \
-e NETWORK_SUBNET=192.168.1.0/24 \
-p 3001:3001 \
reiizumi/sachiko-api:latest
| Variable | Required | Default | Description |
|---|---|---|---|
DATABASE_URL | Yes | postgresql://user:password@localhost:5432/sachiko | PostgreSQL connection string. |
OIDC_WELL_KNOWN_URL | Yes | https://idp.example.com/.well-known/openid-configuration | OIDC Discovery endpoint for JWT verification. Not required for init-db. |
CORS_ORIGINS | Yes | http://localhost:3000 | Comma-separated allowed CORS origins. |
PORT | No | 3001 | Port the API listens on. |
NETWORK_SUBNET | Yes | 192.168.1.0/24 | Network subnet prefix for IP address management. |
ENVIRONMENT | No | production | Environment name returned by GET /api/v1/about. |
OTEL_ENABLED | No | false | Enable OpenTelemetry instrumentation. |
OTEL_EXPORTER_OTLP_ENDPOINT | No | http://localhost:4318 | OTLP collector endpoint (HTTP). Only used when OTEL_ENABLED=true. |
| Endpoint | Purpose | Success | Failure |
|---|---|---|---|
GET /health | Liveness probe | 200 { "status": "ok" } | -- |
GET /ready | Readiness probe (checks DB connection) | 200 { "status": "ok" } | 503 { "status": "unavailable" } |
GET /metrics | Prometheus metrics (text exposition format) | 200 | -- |
All three endpoints are public (no authentication) and are outside the /api/ path.
Moon.cat - GitLab Repository
Content type
Image
Digest
sha256:e7826acc1…
Size
48.9 MB
Last updated
3 months ago
docker pull reiizumi/sachiko-api:1.0.0-arm64