Spectivis Cloud
Magento
Magento on Spectivis Cloud
How Cloud runs Magento 2.4 and Mage-OS stores, what is kept across deploys and how cron and the Magento page work.
Cloud runs Magento 2.4 and Mage-OS stores. The build installs your Composer packages, compiles the code and deploys static content. The store runs from that build, with its media and imports kept across deploys.
Uploaded stores run live
Section titled “Uploaded stores run live”A Magento app made from uploaded files is a live site. Upload a working store, with vendor, generated and pub/static in it, and it runs from those files with every folder writable. Cloud does not run composer install, compile or deploy static content for it. Run those from the Terminal when you change code. If the upload has no app/etc/env.php, Cloud writes one for the app’s database, search and Redis when the store first starts, and never replaces it after that. If your upload brings its own, set the database and search settings in it to the values on the Database page. Setup and upgrades are yours to run with bin/magento. The rest of this page describes a store built from a repository.
Defaults
Section titled “Defaults”| Setting | Default |
|---|---|
| Source | A GitHub repository or uploaded files with Magento’s composer.json, or bin/magento and app/etc/. |
| Web root | pub |
| Kept folders | pub/media and var/importexport. They survive deploys. |
| Database | A MySQL 8.4 database, always. |
| Search | OpenSearch, added when you create the app. Magento 2.4 cannot deploy without it. |
| Cron | php bin/magento cron:run every minute, so the store does not sleep by default. |
| Size | 4 GB. The smallest is 2 GB. |
| Mode | production. Set MAGENTO_MODE in Settings, Variables to change it. |
The first deploy installs Magento into the empty database and makes an admin user. The Overview shows the admin address and that first sign-in until you dismiss it. Open admin signs you in to the admin in one click. See Open the admin in one click.
What is kept and what is not
Section titled “What is kept and what is not”The store’s code, including app/etc/config.php, generated and pub/static, comes from the build and is read-only. app/etc/env.php is written each time the store starts, from the environment’s variables. Install or remove modules in your code and deploy.
The Magento page
Section titled “The Magento page”A Magento app has a Magento page in the sidebar, under Database. It shows the store’s state and makes the everyday changes from the admin’s System menu, without signing in. It works on the running store through bin/magento, the same way as the Commands tab, and anyone who can run commands can use it.
- Store. Version and edition, mode, base URL, admin address, search engine, whether maintenance mode is on, and when cron last ran.
- Cache. Each cache type and whether it is on. Clean removes outdated entries and is safe at any time. Flush empties the whole cache. A cache type you turn off stays off until the store next starts, because each start turns every type back on.
- Indexers. Each indexer’s status, whether it updates on save or by schedule, and when it last ran. Reindex one or all, or switch how one updates. A reindex stops after 10 minutes. Run it again to finish a large catalog.
- Admin users. Who can sign in to the admin, and whether a user is locked after too many wrong passwords. Unlock a user, or add an admin with full access.
- Modules. Which modules are on and off. This list is read-only. Turn modules on or off in
app/etc/config.phpin your code.
Opening the page reads the store, which wakes it if it sleeps. One change runs at a time, and each says when it is done, with Magento’s own message when it fails. Every change goes in the activity log with who made it.
A new admin’s password is made on the server and shown to you once. Copy it then: Cloud does not keep it.
Maintenance mode shows as on or off, but you cannot switch it from the page, because Magento keeps the switch in var/, which is read-only on Cloud. Compiling code and deploying static content are part of every deploy, not of this page.
Cron jobs
Section titled “Cron jobs”Cron runs php bin/magento cron:run every minute, so every job Magento knows about runs on its schedule. To add a job of your own, put it in a module’s etc/crontab.xml and deploy:
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd"> <group id="default"> <job name="vendor_module_sync_stock" instance="Vendor\Module\Cron\SyncStock" method="execute"> <schedule>*/15 * * * *</schedule> </job> </group></config>Keep jobs in the default group. A group of your own should have “Use separate process” set to No (Stores, Configuration, Advanced, System, Cron). With Yes, each group starts its own copy of Magento every minute, which uses a lot of CPU.
For a command that is not a Magento job, such as a script, add a scheduled command in Settings, Processes: a name, the command, and how often it runs, from every minute to every day. It runs in the store’s folder. A run is skipped while the last one is still going. An environment can have up to 10. Restart the site after adding or removing one.
Things to know
Section titled “Things to know”- Mail. Port 25 is blocked. Use an SMTP module with a mail service. See Sending mail.
- Base URL. The store’s address is fixed when a deployment is made. After a custom domain goes live, the Domains page asks you to redeploy so the store moves to it.
- Uploads. One request can carry up to 100 MB. See Cloudflare limits.
- A store moved from a PHP app. See A Magento store in a PHP app.