Deployment
Deployment Methods
Section titled “Deployment Methods”Method 1: Manual Distribution
Section titled “Method 1: Manual Distribution”- Copy changed files from development to tenants
- Rebuild affected containers
- Verify functionality
# Copy specific filessrc="/mnt/data/magic_omniverse/magic_commerce/magic_development/backend/src/api/admin/aplt"for tenant in magic_brinxx magic_default magic_logohorloge magic_bovisales magic_demo magic_desluis magic_jodasign magic_spranz; do dst="/mnt/data/magic_omniverse/magic_commerce/$tenant/backend/src/api/admin/aplt" cp "$src/orders/pdf/route.ts" "$dst/orders/pdf/route.ts"done
# Rebuild allfor tenant in magic_brinxx magic_default magic_logohorloge magic_bovisales magic_demo magic_desluis magic_jodasign magic_spranz; do cd "/mnt/data/magic_omniverse/magic_commerce/$tenant" docker compose build backend && docker compose up -d backenddoneMethod 2: Portal Tenant Manager
Section titled “Method 2: Portal Tenant Manager”Use the Magic Portal at portal.magiceverse.online:
- Go to Tenant Manager page
- Select the dev project to deploy
- Choose target tenants (multi-select)
- Select components (backend, storefront, or both)
- Click Deploy — the portal handles copying and rebuilding
Method 3: Beta Server
Section titled “Method 3: Beta Server”For the beta/external server at beta.brinxx.nl:
ssh beta-brinxxcd /var/www/brinxx.nldocker compose build backenddocker compose up -d backendPre-Deployment Checklist
Section titled “Pre-Deployment Checklist”- Changes tested in
magic_development - Dev Project created and changelog updated
- Database migrations checked (if schema changes)
- No hardcoded development URLs in code
- CORS configuration updated if new domains added
Database Migrations
Section titled “Database Migrations”If your changes include database schema modifications:
# Migrations run automatically on container start# But you can also run manually:docker exec magic_brinxx_backend_dev npx medusa db:migrateRollback
Section titled “Rollback”If a deployment fails:
- Check logs:
docker logs magic_{tenant}_backend_dev --tail=100 - Revert files from a previous version or backup
- Rebuild:
docker compose build backend && docker compose up -d backend
Beta Server
Section titled “Beta Server”| Property | Value |
|---|---|
| URL | beta.brinxx.nl |
| SSH | ssh beta-brinxx (or ssh ubuntu@37.97.132.23) |
| Code | /var/www/brinxx.nl/ |
| Images | /mnt/data/pim_data/ |
| DB Password | See Vaultwarden |