{"id":46244781,"url":"https://github.com/j-scriptz/mage-mirror","last_synced_at":"2026-03-03T21:06:31.797Z","repository":{"id":327518153,"uuid":"1105072769","full_name":"j-scriptz/mage-mirror","owner":"j-scriptz","description":"Magento 2 - Fresh Install, Clone, or Upgrade Live Site for Dev.  Uses Warden, optional Hyva Theme install. ","archived":false,"fork":false,"pushed_at":"2025-12-18T16:45:27.000Z","size":1908,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-12-21T20:35:13.921Z","etag":null,"topics":["automation","dev-environment","docker","docker-compose","hyva","hyva-themes","installer","magento","magento-2","magento-rsync","magento2","warden"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/j-scriptz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-27T05:13:21.000Z","updated_at":"2025-12-18T16:45:31.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/j-scriptz/mage-mirror","commit_stats":null,"previous_names":["j-scriptz/mage-mirror"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/j-scriptz/mage-mirror","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j-scriptz%2Fmage-mirror","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j-scriptz%2Fmage-mirror/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j-scriptz%2Fmage-mirror/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j-scriptz%2Fmage-mirror/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/j-scriptz","download_url":"https://codeload.github.com/j-scriptz/mage-mirror/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j-scriptz%2Fmage-mirror/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30060883,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T18:21:05.932Z","status":"ssl_error","status_checked_at":"2026-03-03T18:20:59.341Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","dev-environment","docker","docker-compose","hyva","hyva-themes","installer","magento","magento-2","magento-rsync","magento2","warden"],"created_at":"2026-03-03T21:06:31.210Z","updated_at":"2026-03-03T21:06:31.789Z","avatar_url":"https://github.com/j-scriptz.png","language":"Shell","readme":"# 🚀 mage-mirror\n### The Fastest Way to Spin Up Magento + Warden + Hyvä — On macOS \u0026 Linux\n\nFresh installs, Hyvä auto-setup, remote cloning, Magento upgrades, and multi-store routing — all from one script.\n\n**One command. Zero frustration.**\n\n\n![mage-mirror header](.github/assets/mage-mirror-hero.svg)\n\n\n## 🏷️ Badges\n\n![GitHub stars](https://img.shields.io/github/stars/j-scriptz/mage-mirror?style=for-the-badge\u0026color=blue)\n![GitHub forks](https://img.shields.io/github/forks/j-scriptz/mage-mirror?style=for-the-badge\u0026color=brightgreen)\n![GitHub issues](https://img.shields.io/github/issues/j-scriptz/mage-mirror?style=for-the-badge\u0026color=yellow)\n![GitHub license](https://img.shields.io/github/license/j-scriptz/mage-mirror?style=for-the-badge\u0026color=orange)\n\n---\n\n## 🎥 Quick Demo\n\n![mage-mirror demo](.github/assets/mage-mirror-demo.gif)\n\n---\n\n## 🌟 What is mage-mirror?\n\nmage-mirror is a high-speed Magento development environment generator built for Warden, Docker, and Hyvä.\n\nIt automates:\n\n- Fresh Magento installs\n- Hyvä theme installation\n- Cloning local or remote sites\n- Magento upgrades\n- Multi-store routing\n- SSH sync via rsync or tar\n- OpenSearch reconfiguration\n- Full Warden environment setup\n\nEverything runs through:\n\n- `_mage-mirror.sh`\n- `_mage-mirror.config`\n\n---\n\n## 🏁 Quick Start\n\n```bash\ngit clone https://github.com/j-scriptz/mage-mirror.git\ncd mage-mirror\nchmod +x _mage-mirror.sh\n```\n\nthen\n\n```bash\n./_mage-mirror.sh\n```\n\nor\n\n```bash\nsh _mage-mirror.sh\n```\n\nEnvironment URLs:\n\n- https://mage.test  \n- https://app.mage.test (if multi-store enabled)\n\n---\n\n## 🔐 SSH Key Setup (Local → Remote Server)\n\nIf you plan to use **remote cloning**, **rsync**, or **remote DB dumps**, set up SSH keys so your local machine can authenticate to your server without repeatedly entering a password.\n\n### 1) Generate an SSH key on your local machine\n\n**macOS / Linux (recommended: Ed25519)**\n\n```bash\nssh-keygen -t ed25519 -C \"your_email@example.com\"\n```\n\n- Press **Enter** to accept the default path: `~/.ssh/id_ed25519`\n- Add a **passphrase** (recommended)\n\nIf Ed25519 isn’t supported in your environment, use RSA:\n\n```bash\nssh-keygen -t rsa -b 4096 -C \"your_email@example.com\"\n```\n\n### 2) Start the SSH agent and add your key\n\n```bash\neval \"$(ssh-agent -s)\"\nssh-add ~/.ssh/id_ed25519\n```\n\n*(If you created an RSA key, replace `id_ed25519` with your key filename.)*\n\n### 3) Add your public key to the remote server\n\n#### Option A: `ssh-copy-id` (easiest, if available)\n\n```bash\nssh-copy-id -i ~/.ssh/id_ed25519.pub youruser@yourserver.com\n```\n\n#### Option B: Manual (works everywhere)\n\n1) Print your public key:\n\n```bash\ncat ~/.ssh/id_ed25519.pub\n```\n\n2) SSH into your server (password-based login once):\n\n```bash\nssh youruser@yourserver.com\n```\n\n3) On the server, create `.ssh`, paste the key, and lock permissions:\n\n```bash\nmkdir -p ~/.ssh\nchmod 700 ~/.ssh\n\nnano ~/.ssh/authorized_keys\n# Paste the full public key line, save, exit\n\nchmod 600 ~/.ssh/authorized_keys\n```\n\n### 4) Test SSH login\n\n```bash\nssh -i ~/.ssh/id_ed25519 youruser@yourserver.com\n```\n\n### Optional: Simplify with `~/.ssh/config`\n\nCreate or edit `~/.ssh/config`:\n\n```sshconfig\nHost myserver\n  HostName yourserver.com\n  User youruser\n  IdentityFile ~/.ssh/id_ed25519\n```\n\nThen connect with:\n\n```bash\nssh myserver\n```\n\n### Troubleshooting\n\n- `Permission denied (publickey)` usually means:\n  - the key wasn’t added to `authorized_keys`,\n  - permissions are wrong (`~/.ssh` should be `700`, `authorized_keys` should be `600`),\n  - or you’re connecting as the wrong user.\n- Non-standard SSH port:\n\n```bash\nssh -p 2222 youruser@yourserver.com\n```\n\n---\n\n## 🚀 Key Features\n\n### ⚡ Fresh Magento Installs\n\n- Composer create-project  \n- Admin creation  \n- Hyvä auto-install  \n- Sample data support  \n- DI compile + static deploy  \n- OpenSearch configuration  \n\n---\n\n### 🔁 Clone Magento Sites\n\nSupports:\n\n- Local SQL + env.php/config.php\n- Remote over SSH\n- Remote DB via mysqldump\n- Remote rsync/tar sync modes\n\nModes:\n\n- Code only  \n- DB only  \n- Code + DB  \n- Code + DB (no media)  \n- Full sync  \n\n---\n\n### ⬆️ Magento Upgrade Mode\n\n```bash\nUPGRADE_MAGENTO=yes\nUPGRADE_MAGENTO_VERSION=2.4.*\n```\n\nmage-mirror will:\n\n1. Import site  \n2. Adjust Composer constraints  \n3. Run composer update  \n4. Run setup:upgrade  \n5. Build static assets  \n\n---\n\n### 🌐 Multi-Store Routing\n\n| Domain        | Website |\n|---------------|---------|\n| app.mage.test | base    |\n| mage.test     | subcats |\n\nAlso:\n\n- Writes to `/etc/hosts`\n- Patches pub/index.php\n- Sets base URLs\n\n---\n\n## ⚙ Configuration: `_mage-mirror.config`\n\nExample:\n\n```bash\nPROJECT_NAME=mage\nMAGENTO_VERSION=2.4.*\nINSTALL_HYVA=ask\nWITH_SAMPLE_DATA=ask\nUSE_EXISTING_DB=ask\nUSE_RSYNC_MAGENTO=ask\nUSE_REMOTE_DB_DUMP=no\nENABLE_MULTISTORE=ask\nUPGRADE_MAGENTO=ask\nUPGRADE_MAGENTO_VERSION=2.4.*\n```\n\nSupports: yes, no, ask\n\n---\n\n## 🧪 Example Commands\n\n### Fresh install (Hyvä + sample data)\n\n```bash\nPROJECT_NAME=mage USE_EXISTING_DB=no WITH_SAMPLE_DATA=yes INSTALL_HYVA=yes ./_mage-mirror.sh\n```\n\n### Clone from local dump\n\n```bash\nPROJECT_NAME=mage USE_EXISTING_DB=yes EXISTING_DB_SQL=db/site.sql EXISTING_ENV_PHP=config/env.php ./_mage-mirror.sh\n```\n\n### Clone remote + upgrade\n\n```bash\nPROJECT_NAME=mage USE_EXISTING_DB=yes USE_RSYNC_MAGENTO=yes USE_REMOTE_DB_DUMP=yes UPGRADE_MAGENTO=yes UPGRADE_MAGENTO_VERSION=2.4.* ./_mage-mirror.sh\n```\n\n---\n\n## ❤️ Optional: Jscriptz Subcats\n\nHyvä + Luma compatible subcategory card module:  \nhttps://mage.jscriptz.com/jscriptz-subcats.html\n\n---\n\n## 🤝 Contributing\n\nPRs and feature requests welcome.\n\nIf mage-mirror saved you time:\n\n**⭐ Please star the repo — it helps visibility!**\n\n---\n\n## 📄 License\n\nGNU Public License v3.0\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj-scriptz%2Fmage-mirror","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fj-scriptz%2Fmage-mirror","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj-scriptz%2Fmage-mirror/lists"}