Files
soleprint/cfg
2026-01-27 09:24:20 -03:00
..
2026-01-20 09:53:11 -03:00
2026-01-27 09:24:20 -03:00
2026-01-27 09:24:05 -03:00

Soleprint Room Configurations

Private repository containing room-specific configurations for Soleprint instances.

Structure

cfg/
├── amar/           # Amar managed room
│   ├── config.json
│   ├── data/
│   ├── soleprint/  # Soleprint customizations
│   ├── link/       # Bridge to managed app
│   └── ctrl/       # Build/run scripts
├── dlt/            # DLT placeholder room
└── README.md

Setup

This repo lives inside the main soleprint repo at cfg/. The standalone/ folder is tracked in the main soleprint repo as a sample.

Fresh clone (new machine)

# Clone main soleprint repo
git clone <soleprint-repo-url> spr
cd spr

# Clone this cfg repo into cfg/ (standalone/ already exists from main repo)
git clone <this-cfg-repo-url> cfg-private
mv cfg-private/.git cfg/
mv cfg-private/* cfg/ 2>/dev/null
rm -rf cfg-private

# Now cfg/ has both:
# - standalone/ (from main soleprint repo)
# - amar/, dlt/ (from this cfg repo)

Alternative: Separate directories

# Keep repos separate, use --cfg-path
git clone <soleprint-repo-url> spr
git clone <this-cfg-repo-url> spr-cfg

# Build with external cfg path
cd spr
python build.py --cfg amar --cfg-path ../spr-cfg

Building

From the main soleprint repo:

python build.py                   # Build standalone (sample)
python build.py --cfg amar        # Build amar room
python build.py --cfg dlt         # Build dlt room

Deploy/Sync Workflow

Local Development

# 1. Build the room
python build.py --cfg amar

# 2. Start with Docker
cd gen/amar/soleprint && docker compose up -d

# 3. For managed rooms, also start the app
cd gen/amar/amar && docker compose up -d

Production Deploy

# On deploy server:

# 1. Pull both repos
cd /opt/spr && git pull
cd /opt/spr/cfg && git pull

# 2. Rebuild
python build.py --cfg amar

# 3. Restart services
cd gen/amar/soleprint && docker compose up -d --build

CI/CD Pipeline (example)

# Deploy soleprint changes
deploy-soleprint:
  script:
    - ssh deploy@server "cd /opt/spr && git pull && python build.py --cfg amar"
    - ssh deploy@server "cd /opt/spr/gen/amar/soleprint && docker compose up -d --build"

# Deploy cfg changes (private repo)
deploy-cfg:
  script:
    - ssh deploy@server "cd /opt/spr/cfg && git pull && python ../build.py --cfg amar"
    - ssh deploy@server "cd /opt/spr/gen/amar/soleprint && docker compose up -d --build"

Credentials

  • .env files are gitignored - copy from .env.example
  • Never commit actual credentials
  • Database dumps in */dumps/ are also gitignored

Adding a New Room

# From cfg/ directory
mkdir -p newroom/data newroom/soleprint
cp ../cfg/standalone/config.json newroom/  # Use standalone as template
# Edit config.json for your room
# Add room-specific customizations in newroom/soleprint/
git add newroom && git commit -m "Add newroom configuration"