Giter VIP home page Giter VIP logo

magento2ce's Introduction

Magento 2 Community Edition for Platform.sh

Deploy on Platform.sh

This template builds Magento 2 CE on Platform.sh. It includes additional scripts to customize Magento to run effectively in a build-and-deploy environment. A MariaDB database and Redis cache server come pre-configured and work out of the box. The installer has been modified to not ask for database information. Background workers are run using a worker container rather than via cron.

Magento is a fully integrated ecommerce system and web store written in PHP. This is the Open Source version.

Features

  • PHP 7.4
  • MariaDB 10.3
  • Redis 6.0
  • OpenSearch 1.2
  • Dedicated worker instance for background processing
  • Automatic TLS certificates
  • Composer-based build

Platform.sh Requirements

  • Medium plan or greater.
  • Magento 2.3.7 - This Magento 2.4 requires different services versions and slightly modified setup/install commands.

Post-install

  1. The site comes pre-configured with an admin account, with username/password of admin/admin123. Login at /admin in your browser. You will be required to update the password the first time you log in.

Customizations

The following changes have been made relative to Magento 2 as it is downloaded from Magento.com. If using this project as a reference for your own existing project, replicate the changes below to your project.

  • The .platform.app.yaml, .platform/services.yaml, and .platform/routes.yaml files have been added. These provide Platform.sh-specific configuration and are present in all projects on Platform.sh. You may customize them as you see fit.
  • A custom deploy script is provided in the deploy.php file and called from the deploy hook in .platform.app.yaml. The deploy script handles installing Magento on first run, including populating the administrator account. It also handles Magento self-updates on normal point release updates.
  • The installer has been patched to not ask for information that is already provided by Platform.sh, such as database credentials, file paths, or the initial administrator account. These changes should have no impact post-installation. See the patch file for details.
  • An additional step has been added to the deploy.php file to force the cron process to not start background workers. See disable-cron-workers.php for details. It runs on deploy and modifies the .config/env.php file.
  • A worker container is also created to handle background processing. That means that Magento cannot be run on a production plan smaller than Medium.

References

magento2ce's People

Contributors

adifucan avatar akaplya avatar arkadiych avatar cpartica avatar danielrenaud avatar dhorytskyi avatar eddielau avatar guz-anton avatar irenelagno avatar ishakhsuvarov avatar joni-jones avatar magento-engcom-team avatar mazhalai avatar melnikovi avatar naydav avatar rganin avatar serhii-balko avatar shiftedreality avatar sidolov avatar sivaschenko avatar slavvka avatar slopukhov avatar tomreece avatar valdislav avatar veronikayarats avatar viktym avatar vladimirzaets avatar vrann avatar zakdma avatar zanilee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

magento2ce's Issues

Worker container logs errors "no commands defined in 'queue:consumer' namespace" leading to disk full warnings

The problem that leads to the issue described below is that the app queue does not realize that Magento has been installed because it does not have access to the .config/* files created by the deploy script. The solution is to move non-log mounts to a shared network storage.

Preconditions (*)

Use an unmodified Magento Marketplace Template

Steps to reproduce (*)

  1. Create project
  2. The app worker will not recognize that Magento has been installed. Wait a few minutes, the app queue log will start populate with warnings about the queue command
  3. Wait 24 hours or so, the disk space will fill completely.

Expected result (*)

  1. The app worker has all commands available to it because it recognizes that Magento has been installed.

Actual result (*)

  1. See steps to reproduce and description.

file permssion issue in deploy script

Redeploying environment master
Closing services app, app--queue, and router
Opening applications app, app--queue and their relationships
Executing deploy hook for application app
Starting Magento installation:
W:
File permissions check...
W: In Installer.php line 909:
W:
W: Missing write permissions to the following paths:
W: /app/app/etc
W:

Muti source inventory not present after install

Summary (*)

The Multi Source Inventory module is not present. MSI was added in 2.3, wondering has it been deliberately left out or removed?

Examples (*)

Proposed solution

Move to the latest upstream version 2.4 and add Elastic Search to this repo

Cron spec issue

Hi,

When I use the default cron spec in the template it won't push up due to the following error message.

"The minimum interval between cron runs is 5 minutes, even if specified as less."

I guess because the cron spec in the platform.app.yml is

crons:
    magento:
        spec: "* * * * *"
        cmd: "php bin/magento cron:run"

Should it not be?

crons:
    magento:
        spec: "*/5 * * * *"
        cmd: "php bin/magento cron:run"

Cheers Dan

Are there any plans on updating Magento, PHP and Composer versions?

Title says it all -- just tested a few times the default Magento template and noticed that several things are outdated.
Updating everything manually doesn't seem to be straightforward.

Also, latest 2.4.x Magento now requires Elastic Search instead of the database powered search, so adding that service by default would be great as well.

Thanks!

Remove redundant workflow

Describe the bug

last update workflow functionality has been moved into a reusable workflow. However, we still have the original version of it in a last-update.yaml workflow file.

Include some logs

https://github.com/platformsh-templates/magento2ce/actions/runs/5731621504/job/15532917629
fails because the copy of the workflow already ran

Reproducing

Accept a PR, watch the last updated workflow run 2X

Expected behavior

the last updated workflow should only run 1X

Your environment

n/a

Screenshots

No response

Additional context

No response

setup:install needs to provide the password arg

Describe the bug

The template currently assumes that the database has no password (as it doesn't on platform.sh).

But it does on DDEV.

The --password arg should be provided.

Include some logs

Build failed w/ command: php bin/magento setup:install --ansi --no-interaction --skip-db-validation --base-url=https://platform-magento2ce.ddev.site/ --db-host=db --db-name=db --db-user=db --backend-frontname=admin --language=en_US --currency=USD --timezone=Europe/Paris --use-rewrites=1 --session-save=redis --session-save-redis-host=redis --session-save-redis-port=6379 --session-save-redis-db=0 --cache-backend=redis --cache-backend-redis-server=redis --cache-backend-redis-port=6379 --cache-backend-redis-db=1 --page-cache=redis --page-cache-redis-server=redis --page-cache-redis-port=6379 --page-cache-redis-db=2 --admin-firstname=admin --admin-lastname=admin [email protected] --admin-user=admin --admin-password=admin123

(Note that it doesn't pass the db-password)

[Progress: 4 / 705]
Installing database schema:

In Abstract.php line 144:

  SQLSTATE[HY000] [1045] Access denied for user 'db'@'172.17.0.3' (using password: NO)

It's failing because it's not using a password.

Reproducing

ddev get https://github.com/ddev/ddev-platformsh/tarball/main

ddev start

Expected behavior

Start

Your environment

DDEV v1.22.1

Screenshots

No response

Additional context

No response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.