From cae5a913ca29251cc362029eed06004dfe03fa77 Mon Sep 17 00:00:00 2001 From: buenosairesam Date: Mon, 26 Jan 2026 22:01:22 -0300 Subject: [PATCH] removed cfgs from repo --- cfg/.gitignore | 13 +++++ cfg/README.md | 125 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 138 insertions(+) create mode 100644 cfg/.gitignore create mode 100644 cfg/README.md diff --git a/cfg/.gitignore b/cfg/.gitignore new file mode 100644 index 0000000..4db29b3 --- /dev/null +++ b/cfg/.gitignore @@ -0,0 +1,13 @@ +# Environment files with credentials (use .env.example as template) +**/.env + +# Database dumps (sensitive data) +*/dumps/*.sql + +# Python +__pycache__/ +*.pyc +*.pyo + +# Standalone is kept in main soleprint repo as sample +standalone/ diff --git a/cfg/README.md b/cfg/README.md new file mode 100644 index 0000000..16b6634 --- /dev/null +++ b/cfg/README.md @@ -0,0 +1,125 @@ +# 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) + +```bash +# Clone main soleprint repo +git clone spr +cd spr + +# Clone this cfg repo into cfg/ (standalone/ already exists from main repo) +git clone 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 + +```bash +# Keep repos separate, use --cfg-path +git clone spr +git clone spr-cfg + +# Build with external cfg path +cd spr +python build.py --cfg amar --cfg-path ../spr-cfg +``` + +## Building + +From the main soleprint repo: + +```bash +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 + +```bash +# 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 + +```bash +# 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) + +```yaml +# 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 + +```bash +# 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" +```