forbes 802368c583 fix(deploy): add database migration step and auth env vars
Add run_migrations function to deploy.sh that automatically applies
pending SQL migrations during deployment. Migrations are run after
config installation and before service restart.

Migration runner:
- Sources /etc/silo/silod.env for SILO_DB_PASSWORD
- Reads DB host/port/name/user from production config.yaml
- Waits for database connectivity (5 retries)
- Applies each migration file in order, skipping already-applied ones
- Gracefully degrades if psql is missing or DB password is not set

This fixes the missing migration 009 (auth tables) that caused:
- 'column created_by of relation projects does not exist'
- 'relation api_tokens does not exist'

Also adds auth environment variables to silod.env.example:
- SILO_SESSION_SECRET
- SILO_ADMIN_USERNAME / SILO_ADMIN_PASSWORD
- SILO_OIDC_CLIENT_SECRET, SILO_LDAP_BIND_PASSWORD
2026-01-31 12:09:17 -06:00
2026-01-29 13:10:12 -06:00
2026-01-29 13:10:12 -06:00
2026-01-29 13:10:12 -06:00
2026-01-29 13:10:12 -06:00
2026-01-29 13:10:12 -06:00

Kindred Silo

Item database and part management system for Kindred Create.

Overview

Kindred Silo is an R&D-oriented item database with:

  • Configurable part number generation via YAML schemas
  • FreeCAD integration with git-like commands (checkout, commit, status)
  • Revision tracking with append-only history
  • BOM management with reference designators and alternates
  • Physical inventory tracking with hierarchical locations

Components

silo/
├── cmd/
│   ├── silo/          # CLI tool
│   └── silod/         # API server
├── internal/
│   ├── api/           # HTTP handlers, routes, and templates
│   ├── config/        # Configuration loading
│   ├── db/            # PostgreSQL access
│   ├── migration/     # Property migration utilities
│   ├── partnum/       # Part number generation
│   ├── schema/        # YAML schema parsing
│   └── storage/       # MinIO file storage
├── pkg/
│   └── freecad/       # FreeCAD workbench (Python)
├── migrations/        # Database migration SQL scripts
├── schemas/           # Part numbering schema definitions (YAML)
├── deployments/       # Docker Compose and systemd configs
├── scripts/           # Deployment and setup scripts
└── docs/              # Documentation

Quick Start

# Database setup
psql -h psql.kindred.internal -U silo -d silo -f migrations/001_initial.sql

# Configure
cp config.example.yaml config.yaml
# Edit config.yaml with your settings

# Run server
go run ./cmd/silod

# CLI usage
go run ./cmd/silo register --schema kindred-rd --category F01

Configuration

See config.example.yaml for all options.

Kindred Create Integration

Install the workbench:

ln -s $(pwd)/pkg/freecad ~/.local/share/FreeCAD/Mod/KindredSilo

Then in Kindred Create, use the Silo workbench toolbar commands:

  • Pull - Download an item by part number
  • Commit - Save current state as a new revision with comment
  • Push - Batch upload modified files
  • Info - View revision history

License

MIT License - Copyright (c) 2026 Kindred Systems LLC

See LICENSE for details.

Description
No description provided
Readme MIT 3.6 MiB
Languages
Go 68.5%
TypeScript 25.5%
Shell 2.7%
PLpgSQL 2.4%
Makefile 0.5%
Other 0.3%