Other useful URLs on DEV:
- https://mailhog.exampleproject.test/
- https://rabbitmq.exampleproject.test/
- https://elasticsearch.exampleproject.test/
- Warden 0.4.0 or later is installed. See the Installing Warden docs page for further info and procedures.
pv
is installed and available in your$PATH
(you can install this viabrew
,dnf
,apt
etc)
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.
-
Clone the project codebase.
git clone -b develop [email protected]:<GITHUB_ACCOUNT>/<REPOSITORY_NAME>.git \ ~/Sites/exampleproject
-
Change into the project directory.
cd ~/Sites/exampleproject
-
Configure composer credentials.
composer config -f ./webroot/composer.json http-basic.repo.magento.com <username> <password>
If you don't have
composer
installed on the host machine, manually createwebroot/auth.json
using the following template:{ "http-basic": { "repo.magento.com": { "username": "<username>", "password": "<password>" } } }
-
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../tools/init.sh --clean-install
-
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.
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.
To completely destroy the local environment we just created, run warden env down -v
to tear down the project’s Docker containers, volumes, etc, then warden sync stop
(on macOS) to cleanup Mutagen sync session.