Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wardenenv/warden-env-magento2
Template Project for Magento 2 Using Warden for Local Development
https://github.com/wardenenv/warden-env-magento2
Last synced: 3 months ago
JSON representation
Template Project for Magento 2 Using Warden for Local Development
- Host: GitHub
- URL: https://github.com/wardenenv/warden-env-magento2
- Owner: wardenenv
- Created: 2019-10-11T21:40:04.000Z (about 5 years ago)
- Default Branch: develop
- Last Pushed: 2024-03-31T23:58:03.000Z (7 months ago)
- Last Synced: 2024-07-26T00:50:44.185Z (4 months ago)
- Language: Shell
- Homepage: https://docs.warden.dev/
- Size: 42 KB
- Stars: 53
- Watchers: 3
- Forks: 21
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Magento 2 Application
========================================================| Env | FrontURL | AdminURL |
| --- | :------- | :------- |
| DEV | https://app.exampleproject.test/ | https://app.exampleproject.test/backend/ |
| STG | https://stage.exampleproject.com/ | https://stage.exampleproject.com/backend/ |
| PRD | https://www.exampleproject.com/ | https://www.exampleproject.com/backend/ |Other useful URLs on DEV:
* https://mailhog.warden.test/
* https://rabbitmq.exampleproject.test/
* https://elasticsearch.exampleproject.test/## Developer Setup
### Prerequisites:
* [Warden](https://warden.dev/) 0.6.0 or later is installed. See the [Installing Warden](https://docs.warden.dev/installing.html) docs page for further info and procedures.
* `pv` is installed and available in your `$PATH` (you can install this via `brew`, `dnf`, `apt` etc)### Initializing Environment
In the below examples `~/Sites/exampleproject` is used as the path. Simply replace this with whatever path you will be running this project from. It is recommended however to deploy the project locally to a case-sensitive volume.
1. Clone the project codebase.
git clone -b develop [email protected]:/.git \
~/Sites/exampleproject2. Change into the project directory.
cd ~/Sites/exampleproject
3. Configure composer credentials.
composer config -f ./webroot/composer.json http-basic.repo.magento.com
If you don't have `composer` installed on the host machine, manually create `webroot/auth.json` using the following template:
{
"http-basic": {
"repo.magento.com": {
"username": "",
"password": ""
}
}
}4. Run the init script to bootstrap the environment, starting the containers and mutagen sync (on macOS), installing the database (or importing if `--db-dump` is specified), and creating the local admin user for accessing the Magento backend.
warden bootstrap --clean-install
5. Load the site in your browser using the links and credentials taken from the init script output.
**Note:** If you are using **Firefox** and it warns you the SSL certificate is invalid/untrusted, go to Preferences -> Privacy & Security -> View Certificates (bottom of page) -> Authorities -> Import and select `~/.warden/ssl/rootca/certs/ca.cert.pem` for import, then reload the page.
**Note:** If you are using **Chrome** on **Linux** and it warns you the SSL certificate is invalid/untrusted, go to Chrome Settings -> Privacy And Security -> Manage Certificates (see more) -> Authorities -> Import and select `~/.warden/ssl/rootca/certs/ca.cert.pem` for import, then reload the page.### Additional Configuration
Information on configuring and using tools such as Xdebug, LiveReload, MFTF, and multi-domain site setups may be found in the Warden docs page on [Configuration](https://docs.warden.dev/configuration.html).
### Destroying Environment
To completely destroy the local environment we just created, run `warden env down -v` to tear down the project’s Docker containers, volumes, and (where applicable) cleanup the Mutagan sync session.