Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a script that deploys the sample data for PWA #1045

Merged

Conversation

YevhenZvieriev
Copy link
Contributor

Description

This pull request introduces a script for simplifying the setup process of a Magento 2 environment and configuring PWA Studio. The script automates the installation of sample data for Venia PWA and configures the PWA Studio environment.
This pull request addresses the issues mentioned in issue.

Features

Sample Data Installation

  • Sets up the composer repository for Venia sample data.
  • Requires the Venia sample data metapackage.
  • Installs Venia sample data modules.
  • Reindexes data from the installed modules.

PWA Studio Environment Configuration

  • Checks for the existence of the .env.dist file.
  • Copies the content of .env.dist to .env if the file exists.
  • Provides a message if the .env.dist file is not found.

Usage

To utilize the script, provide the Magento 2 base URL as an argument when executing the script. For example:

bin/setup-pwa-studio-sampledata venia.test

Otherwise the default master-7rqtwti-mfwmkrjfqvbjk.us-4.magentosite.cloud will be used.

Note

The script is designed to continue executing even if errors occur because I had an issue while running bin/magento setup:upgrade that has not been resolved yet, but the sample data is being installed successfully.
However, users should exercise caution when proceeding after encountering errors.

Result:

pwa-sampledata-1
pwa-sampledata-2

@markshust, Please review and merge. Thank you!

Copy link

what-the-diff bot commented Jan 16, 2024

PR Summary

  • Enhanced Readme Document
    The Readme file has been updated to include a new command. This command simplifies the process of installing sample data for Venia, making it easier for users to setup and get started with their projects.

  • Introduction of a new setup script
    A new setup script has been introduced, which automates several sequential actions needed for setting up composer repository and installing Venia sample data modules. Moreover, the script handles the reindexing of data from these modules. If a particular '.env' file is missing, the script can copy a backup file to replace it. As a result, this script simplifies data setup and installs process, enhancing the user experience with the Magento PWA Studio instance.

@markshust
Copy link
Owner

Thank you for this. I believe the PWA Studio project is (really) dead, however some other's may find this useful, so I'll go ahead and merge it in, as it has no side-effects of doing so 👍

@markshust markshust merged commit 6e93776 into markshust:master Feb 24, 2024
@what-the-diff what-the-diff bot mentioned this pull request Feb 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants