tracker
tracker copied to clipboard
Magento 2 Install is git clone, cant be used in production
This issue is closely (if not directly) related to a new issue I just posted. I'm going to leave this one open for now too though.
-- Jeremy Davis (TKL dev)
Hello,
I have installed Magento 2 template. I was trying to upgrade it to magento 2.4.1 (currently running 2.4.0). The composer file is different so I started doing some research.
The template uses a git clone (states on the website as well) but because of that we can't use that template in production.
It should use composer install to install it. Source: https://devdocs.magento.com/guides/v2.4/install-gde/prereq/dev_install.html https://magento.com/tech-resources/download
"If you clone the Magento 2 GitHub repository, you cannot use the Magento software in a production environment. You cannot have a live store that accepts orders and so on."
Thanks for the heads up. I wonder when they say they say that it's not suitable for production?!
Regardless, their statement is clearly incorrect as we have many users who are using it in production and it clearly works fine...
Updating may not be as easy as other install methods, but it's definitely possible (git fetch, then checkout the new version, use composer to install the new/updated dependencies, then finally commandline tool to apply DB changes).
Note that you do need to add your public/private keypair from your registered Magento account (you can sign up for an account for free, but you can't update an existing install without creating a Magento account).
Regardless, we should probably follow upstream's recommendation as install as per their recommendation. It's a bit of a pain as the way that we currently install it means that we don't need to register the install with Magento (possibly why they don't support our install method in production, maybe they want to track users/instances?!)
If you want to "live" with Magento and not just work with it in a development environment, with version 2 and forward you need to work with it within the Composer context. Where this kicks in is doing automated updating from within the Administration Backend.
If you want to work within the development environment, and that should be possible even in a production situation, then the individual site needs to be registered to the Git for pulling and the like. As it is TKL does an initial pull, but then there is no connection for further updates registered to the actual user.
I was swimming around this a year ago when I decided that Magento was making their processes (including the upgrade from 1.9x) much too complicated. It is a good system but they are really trying to make it complicated for the community.
There is the OpenMage initiative which is promising long term support to Magento 1. This seems quite interesting, and hopefully not a dead end. https://www.openmage.org/
It is a good system but they are really trying to make it complicated for the community.
Magento 2 is by far the most complicated and annoying software I've ever dealt with.
I'm inclined to defer this until 17.0 for a few reasons:
- User privacy concerns with forcing users to register for Magento's Marketplace, which is required for the composer based install.
- Low effeciency when using the composer-based install as either each maintainer will need to keep a copy of magento keys for building, or most of the build process would have to occur on startup. Effectively making the primary benifet of pre-built appliances not apply.
- Unless we request user keys, most composer-related functionality wont work anyway, as it will fail without keys (we wouldn't ship with maintainer keys).
I ran into this a few times already. I think you might simply consider: 1: Dropping Magento (I did) 2: Calling it a developer edition (Github based) 3: Requiring them to enter their Composer Keys before any upgrade (most elegant)
Adobe did a number on the whole thing imho. My thoughts for now.
Landis Arnold