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

Add backend login credentials and 2FA setup instructions to README #1205

Merged
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,21 @@ The `magento.test` above defines the hostname to use, and the `2.4.7` defines th

After the one-liner above completes running, you should be able to access your site at `https://magento.test`.

## Accessing the Magento Backend

After successfully installing the Magento environment, you can access the backend by following these steps:

1. Open your web browser and go to the following URL: `https://magento.test/admin/`.

2. Use the following default credentials to log in:
- **Username:** `john.smith`
- **Password:** `password123`

3. Upon logging in, you might be prompted to configure Two-Factor Authentication (2FA). This emails you a code to log in with (which you can check with Mailcatcher by visiting `http://{yourdomain}:1080`). By default, the email address used for this purpose is:
- **Email:** `[email protected]`

If you are testing in a local development environment and wish to disable 2FA, you can do so by installing [Mark's DisableTwoFactorAuth module](https://github.com/markshust/magento2-module-disabletwofactorauth).

#### Install sample data

After the above installation is complete, run the following lines to install sample data:
Expand Down Expand Up @@ -420,7 +435,7 @@ Copy `src/auth.json.sample` to `src/auth.json`. Then, update the username and pa

### Email / Mailcatcher

View emails sent locally through Mailcatcher by visiting [http://{yourdomain}:1080](http://{yourdomain}:1080). During development, it's easiest to test emails using a third-party module such as [Mageplaza's SMTP module](https://github.com/mageplaza/magento-2-smtp). In order to use mailcatcher, set the mailserver host to `mailcatcher` and set port to `1025`. Note that this port is different from the mailcatcher interface to read the emails.
View emails sent locally through Mailcatcher by visiting [http://{yourdomain}:1080](http://{yourdomain}:1080). In order to use mailcatcher, set the mailserver host to `mailcatcher` and set port to `1025`. Note that this port (`1025`) is different from the mailcatcher interface to read the emails (`1080`).

### Redis

Expand Down
11 changes: 11 additions & 0 deletions compose/bin/setup
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#!/usr/bin/env bash
set -o errexit
if [ -f "../env/magento.env" ]; then
source "../env/magento.env"
else
echo "Warning: magento.env file not found."
fi

MEM_BYTES=$(docker info -f '{{.MemTotal}}')
MEM_MB=$(( MEM_BYTES / 1000000 ))
Expand Down Expand Up @@ -53,3 +58,9 @@ cp -r .vscode src/

echo "Docker development environment setup complete."
echo "You may now access your Magento instance at https://${DOMAIN}/"

echo "You may now access your Magento backend instance at https://${DOMAIN}/admin/"

echo "Use the following default credentials to log in:"
YevhenZvieriev marked this conversation as resolved.
Show resolved Hide resolved
echo "Username: $MAGENTO_ADMIN_USER"
echo "Password: $MAGENTO_ADMIN_PASSWORD"