Skip to content

Commit 05bb603

Browse files
committed
Fix Warning/Note boxes
1 parent c445b51 commit 05bb603

File tree

8 files changed

+76
-76
lines changed

8 files changed

+76
-76
lines changed

configuration/dns-resolver.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ Restart network-manager
5757
sudo service network-manager restart
5858
```
5959

60-
```{note}
60+
:::{note}
6161
In the above examples you can replace ``1.1.1.1`` and ``1.0.0.1`` (CloudFlare) with the IP of your own preferred DNS resolution service such as ``8.8.8.8`` and ``8.8.4.4`` (Google) or ``9.9.9.9`` and ``149.112.112.112`` (Quad9)
62-
```
62+
:::
6363

6464
### Windows
6565

configuration/livereload.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ Magento 2 bundles an example grunt based server-side compilation workflow which
2929
];
3030
```
3131

32-
```{note}
32+
:::{note}
3333
This can be accomplished via alternative means, the important part is the browser requesting ``/livereload.js?port=443`` when running the site on your local development environment.
34-
```
34+
:::
3535

3636
5. Run `bin/magento app:config:import` to load merged configuration into the application.
3737

@@ -51,9 +51,9 @@ Magento 2 bundles an example grunt based server-side compilation workflow which
5151
grunt watch
5252
```
5353

54-
```{note}
54+
:::{note}
5555
Grunt should be used within the php-fpm container entered via ``warden shell``
56-
```
56+
:::
5757

5858
This setup will also be used to persist changes to your compiled CSS. When you run `grunt watch`, a LiveReload server will be started on ports 35729 within the php-fpm container and Traefik will take care of proxying the JavaScript tag and WebSocket requests to this listener.
5959

configuration/multipledomains.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ Multiple top-level domains may also be setup by following the instructions below
3838
3939
4. Run `warden env up` to update the containers, after which each of the URLs should work as expected.
4040

41-
```{note}
41+
:::{note}
4242
If these alternate domains must be resolvable from within the FPM containers, you must also leverage ``extra_hosts`` to add each specific sub-domain to the ``/etc/hosts`` file of the container as dnsmasq is used only on the host machine, not inside the containers. This should look something like the following excerpt.
4343

44-
```
44+
:::
4545

4646
```yaml
4747
version: "3.5"
@@ -100,9 +100,9 @@ When multiple domains are being used to load different stores or websites on Mag
100100
}
101101
```
102102

103-
```{note}
103+
:::{note}
104104
The above example will not alter production site behavior given the default is to return should the ``HTTP_HOST`` value not match one of the defined ``case`` statements. This is desired as some hosting environments define run codes and types in an Nginx mapping. One may add production host names to the switch block should it be desired to use the same site switching mechanism across all environments.
105-
```
105+
:::
106106

107107
2. Then in `composer.json` add the file created in the previous step to the list of files which are automatically loaded by composer on each web request:
108108

@@ -116,9 +116,9 @@ When multiple domains are being used to load different stores or websites on Mag
116116
}
117117
```
118118

119-
```{note}
119+
:::{note}
120120
This is similar to using `magento-vars.php` on Magento Commerce Cloud, but using composer to load the file rather than relying on Commerce Cloud magic: https://devdocs.magento.com/guides/v2.3/cloud/project/project-multi-sites.html
121-
```
121+
:::
122122

123123
3. After editing the `composer.json` regenerate the auto load configuration:
124124

configuration/xdebug.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ To configure a project in VSCode for debugging, add the following to `.vscode/la
3333
}
3434
```
3535

36-
```{note}
36+
:::{note}
3737
If your project has (for example) ``WARDEN_WEB_ROOT=/webroot`` in it's ``.env`` file, to mount ``webroot/`` to ``/var/www/html`` rather than the top-level project directory, you may need to set the ``pathMapping`` above to ``${workspaceRoot}/webroot`` for the mapping to function correctly.
38-
```
38+
:::
3939

4040
Once this configuration is in place, make sure you have the [PHP Debug extension by Felix Becker](https://marketplace.visualstudio.com/items?itemName=felixfbecker.php-debug) installed. This is required for Xdebug support to function in VSCode. Additional information on launch settings specific to Xdebug use in VSCode [may be found here](https://github.com/felixfbecker/vscode-php-debug#vs-code-configuration).
4141

environments/magento2.md

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
The below example demonstrates the from-scratch setup of the Magento 2 application for local development. A similar process can easily be used to configure an environment of any other type. This assumes that Warden has been previously started via `warden svc up` as part of the installation procedure.
44

5-
```{note}
5+
:::{note}
66
In addition to the below manual process, there is a `Github Template available for Magento 2 <https://github.com/wardenenv/warden-env-magento2>`_ allowing for quick setup of new Magento projects. To use this, click the green "Use this template" button to create your own repository based on the template repository, run the init script and update the README with any project specific information.
7-
```
7+
:::
88

9-
1. Create a new directory on your host machine at the location of your choice and then jump into the new directory to get started:
9+
1. Create a new directory on your host machine at the location of your choice and then jump into the new directory to get started:
1010

1111
mkdir -p ~/Sites/exampleproject
1212
cd ~/Sites/exampleproject
1313

14-
2. From the root of your new project directory, run `env-init` to create the `.env` file with configuration needed for Warden and Docker to work with the project.
14+
2. From the root of your new project directory, run `env-init` to create the `.env` file with configuration needed for Warden and Docker to work with the project.
1515

1616
warden env-init exampleproject magento2
1717

@@ -56,35 +56,35 @@ The below example demonstrates the from-scratch setup of the Magento 2 applicati
5656
BLACKFIRE_SERVER_ID=
5757
BLACKFIRE_SERVER_TOKEN=
5858

59-
3. Sign an SSL certificate for use with the project (the input here should match the value of `TRAEFIK_DOMAIN` in the above `.env` example file):
59+
3. Sign an SSL certificate for use with the project (the input here should match the value of `TRAEFIK_DOMAIN` in the above `.env` example file):
6060

6161
warden sign-certificate exampleproject.test
6262

63-
4. Next you'll want to start the project environment:
63+
4. Next you'll want to start the project environment:
6464

6565
warden env up
6666

67-
```{warning}
67+
:::{warning}
6868
If you encounter an error about ``Mounts denied``, follow the instructions in the error message and run ``warden env up`` again.
69-
```
69+
:::
7070

71-
5. Drop into a shell within the project environment. Commands following this step in the setup procedure will be run from within the `php-fpm` docker container this launches you into:
71+
5. Drop into a shell within the project environment. Commands following this step in the setup procedure will be run from within the `php-fpm` docker container this launches you into:
7272

7373
warden shell
7474

75-
6. Configure global Magento Marketplace credentials
75+
6. Configure global Magento Marketplace credentials
7676

77-
composer global config http-basic.repo.magento.com <username> <password>
77+
composer global config http-basic.repo.magento.com <username> <password>
7878

79-
```{note}
79+
:::{note}
8080
To locate your authentication keys for Magento 2 repository, `reference DevDocs <https://devdocs.magento.com/guides/v2.3/install-gde/prereq/connect-auth.html>`_.
8181

8282
If you have previously configured global credentials, you may skip this step, as ``~/.composer/`` is mounted into the container from the host machine in order to share composer cache between projects, and also shares the global ``auth.json`` from the host machine.
8383

8484
Use the **Public key** as your username and the **Private key** as your password.
85-
```
85+
:::
8686

87-
7. Initialize project source files using composer create-project and then move them into place:
87+
7. Initialize project source files using composer create-project and then move them into place:
8888

8989
META_PACKAGE=magento/project-community-edition META_VERSION=2.4.x
9090

@@ -94,7 +94,7 @@ The below example demonstrates the from-scratch setup of the Magento 2 applicati
9494
rsync -a /tmp/exampleproject/ /var/www/html/
9595
rm -rf /tmp/exampleproject/
9696

97-
8. Install the application and you should be all set:
97+
8. Install the application and you should be all set:
9898

9999
## Install Application
100100
bin/magento setup:install \
@@ -154,60 +154,60 @@ The below example demonstrates the from-scratch setup of the Magento 2 applicati
154154
bin/magento indexer:reindex
155155
bin/magento cache:flush
156156

157-
```{note}
157+
:::{note}
158158
Prior to Magento ``2.4.x`` it was not required to enter search-engine and elasticsearch configuration during installation and these params to ``setup:install`` are not supported by Magento ``2.3.x``. These should be omitted on older versions where not supported and Elasticsearch configured via ``config:set`` instead:
159159

160-
.. code::
161-
160+
```bash
162161
bin/magento config:set --lock-env catalog/search/engine elasticsearch7
163162
bin/magento config:set --lock-env catalog/search/elasticsearch7_server_hostname elasticsearch
164163
bin/magento config:set --lock-env catalog/search/elasticsearch7_server_port 9200
165164
bin/magento config:set --lock-env catalog/search/elasticsearch7_index_prefix magento2
166165
bin/magento config:set --lock-env catalog/search/elasticsearch7_enable_auth 0
167166
bin/magento config:set --lock-env catalog/search/elasticsearch7_server_timeout 15
168-
```
167+
```
168+
:::
169169

170-
9. Generate an admin user and configure 2FA for OTP
170+
10. Generate an admin user and configure 2FA for OTP
171171

172-
## Generate localadmin user
173-
ADMIN_PASS="$(pwgen -n1 16)"
174-
ADMIN_USER=localadmin
172+
## Generate localadmin user
173+
ADMIN_PASS="$(pwgen -n1 16)"
174+
ADMIN_USER=localadmin
175175

176-
bin/magento admin:user:create \
177-
--admin-password="${ADMIN_PASS}" \
178-
--admin-user="${ADMIN_USER}" \
179-
--admin-firstname="Local" \
180-
--admin-lastname="Admin" \
181-
--admin-email="${ADMIN_USER}@example.com"
182-
printf "u: %s\np: %s\n" "${ADMIN_USER}" "${ADMIN_PASS}"
176+
bin/magento admin:user:create \
177+
--admin-password="${ADMIN_PASS}" \
178+
--admin-user="${ADMIN_USER}" \
179+
--admin-firstname="Local" \
180+
--admin-lastname="Admin" \
181+
--admin-email="${ADMIN_USER}@example.com"
182+
printf "u: %s\np: %s\n" "${ADMIN_USER}" "${ADMIN_PASS}"
183183

184-
## Configure 2FA provider
185-
OTPAUTH_QRI=
186-
TFA_SECRET=$(python -c "import base64; print base64.b32encode('$(pwgen -A1 128)')" | sed 's/=*$//')
187-
OTPAUTH_URL=$(printf "otpauth://totp/%s%%3Alocaladmin%%40example.com?issuer=%s&secret=%s" \
188-
"${TRAEFIK_SUBDOMAIN}.${TRAEFIK_DOMAIN}" "${TRAEFIK_SUBDOMAIN}.${TRAEFIK_DOMAIN}" "${TFA_SECRET}"
189-
)
184+
## Configure 2FA provider
185+
OTPAUTH_QRI=
186+
TFA_SECRET=$(python -c "import base64; print base64.b32encode('$(pwgen -A1 128)')" | sed 's/=*$//')
187+
OTPAUTH_URL=$(printf "otpauth://totp/%s%%3Alocaladmin%%40example.com?issuer=%s&secret=%s" \
188+
"${TRAEFIK_SUBDOMAIN}.${TRAEFIK_DOMAIN}" "${TRAEFIK_SUBDOMAIN}.${TRAEFIK_DOMAIN}" "${TFA_SECRET}"
189+
)
190190

191-
bin/magento config:set --lock-env twofactorauth/general/force_providers google
192-
bin/magento security:tfa:google:set-secret "${ADMIN_USER}" "${TFA_SECRET}"
191+
bin/magento config:set --lock-env twofactorauth/general/force_providers google
192+
bin/magento security:tfa:google:set-secret "${ADMIN_USER}" "${TFA_SECRET}"
193193

194-
printf "%s\n\n" "${OTPAUTH_URL}"
195-
printf "2FA Authenticator Codes:\n%s\n" "$(oathtool -s 30 -w 10 --totp --base32 "${TFA_SECRET}")"
194+
printf "%s\n\n" "${OTPAUTH_URL}"
195+
printf "2FA Authenticator Codes:\n%s\n" "$(oathtool -s 30 -w 10 --totp --base32 "${TFA_SECRET}")"
196196

197-
segno "${OTPAUTH_URL}" -s 4 -o "pub/media/${ADMIN_USER}-totp-qr.png"
198-
printf "%s\n\n" "https://${TRAEFIK_SUBDOMAIN}.${TRAEFIK_DOMAIN}/media/${ADMIN_USER}-totp-qr.png?t=$(date +%s)"
197+
segno "${OTPAUTH_URL}" -s 4 -o "pub/media/${ADMIN_USER}-totp-qr.png"
198+
printf "%s\n\n" "https://${TRAEFIK_SUBDOMAIN}.${TRAEFIK_DOMAIN}/media/${ADMIN_USER}-totp-qr.png?t=$(date +%s)"
199199

200-
```{note}
201-
Use of 2FA is mandatory on Magento ``2.4.x`` and setup of 2FA should be skipped when installing ``2.3.x`` or earlier. Where 2FA is setup manually via UI upon login rather than using the CLI commands above, the 2FA configuration email may be retrieved from `the Mailhog service <https://mailhog.warden.test/>`_.
202-
```
200+
:::{note}
201+
Use of 2FA is mandatory on Magento ``2.4.x`` and setup of 2FA should be skipped when installing ``2.3.x`` or earlier. Where 2FA is setup manually via UI upon login rather than using the CLI commands above, the 2FA configuration email may be retrieved from `the Mailhog service <https://mailhog.warden.test/>`_.
202+
:::
203203

204-
10. Launch the application in your browser:
204+
11. Launch the application in your browser:
205205

206206
- [https://app.exampleproject.test/](https://app.exampleproject.test/)
207207
- [https://app.exampleproject.test/backend/](https://app.exampleproject.test/backend/)
208208
- [https://rabbitmq.exampleproject.test/](https://rabbitmq.exampleproject.test/)
209209
- [https://elasticsearch.exampleproject.test/](https://elasticsearch.exampleproject.test/)
210210

211-
```{note}
211+
:::{note}
212212
To completely destroy the ``exampleproject`` environment we just created, run ``warden env down -v`` to tear down the project's Docker containers, volumes, etc.
213-
```
213+
:::

environments/shopware.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ The below example demonstrates the from-scratch setup of the Shopware 6 applicat
5151

5252
warden env up
5353

54-
```{warning}
54+
:::{warning}
5555
If you encounter an error about ``Mounts denied``, follow the instructions in the error message and run ``warden env up`` again.
56-
```
56+
:::
5757

5858
7. Drop into a shell within the project environment. Commands following this step in the setup procedure will be run from within the `php-fpm` docker container this launches you into:
5959

@@ -72,10 +72,10 @@ The below example demonstrates the from-scratch setup of the Shopware 6 applicat
7272
- [https://app.exampleproject.test/](https://app.exampleproject.test/)
7373
- [https://app.exampleproject.test/admin/](https://app.exampleproject.test/admin/)
7474

75-
```{note}
75+
:::{note}
7676
The default username for Shopware 6 is ``admin`` with password ``shopware``.
77-
```
77+
:::
7878

79-
```{note}
79+
:::{note}
8080
To completely destroy the ``exampleproject`` environment we just created, run ``warden env down -v`` to tear down the project's Docker containers, volumes, etc.
81-
```
81+
:::

installing.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ Installing Warden
77
* `docker-compose` version 1.25.0 or later is required (this can be installed via `brew`, `apt`, `dnf`, or `pip3` as needed)
88
* [Mutagen](https://mutagen.io/) 0.11.4 or later is required for environments leveraging sync sessions on Mac OS. Warden will attempt to install this via `brew` if not present.
99

10-
```{warning}
10+
:::{warning}
1111
**By default Docker Desktop allocates 2GB memory.** This leads to extensive swapping, killed processed and extremely high CPU usage during some Magento actions, like for example running sampledata:deploy and/or installing the application. It is recommended to assign at least 6GB RAM to Docker Desktop prior to deploying any Magento environments on Docker Desktop. This can be corrected via Preferences -> Resources -> Advanced -> Memory. While you are there, it wouldn't hurt to let Docker have the use of a few more vCPUs (keep it at least 4 less than the maximum CPU allocation however to avoid having macOS contend with Docker for use of cores)
12-
```
12+
:::
1313

1414
## Installing via Homebrew
1515

@@ -43,9 +43,9 @@ Launch wsl from your terminal of choice.
4343

4444
In order for DNS entries to be resolved either add them to your Windows hosts file or add 127.0.0.1 as the first DNS server in your current network adapter in Windows.
4545

46-
```{warning}
46+
:::{warning}
4747
**For performance reasons code should be located in the WSL Linux home path or other WSL local path ~/code/projectname NOT the default /mnt/c path mapping.**
48-
```
48+
:::
4949

5050
GUI tools for Windows should use the network paths provided by WSL2: `\\wsl$\Ubuntu-20.04\home\<USER>\<PROJECTPATH>`.
5151

@@ -66,8 +66,8 @@ On MacOS this root CA certificate is automatically added to a users trust settin
6666

6767
On Ubuntu/Debian this CA root is copied into `/usr/local/share/ca-certificates` and on Fedora/CentOS (Enterprise Linux) it is copied into `/etc/pki/ca-trust/source/anchors` and then the trust bundle is updated appropriately. For new systems, this typically is all that is needed for the CA root to be trusted on the default Firefox browser, but it may not be trusted by Chrome or Firefox automatically should the browsers have already been launched prior to the installation of Warden (browsers on Linux may and do cache CA bundles)
6868

69-
```{note}
69+
:::{note}
7070
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.
7171

7272
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.
73-
```
73+
:::

services.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ The following options are available (with default values indicated):
1717
* `WARDEN_RESTART_POLICY=always` may be set to `no` to prevent Docker from restarting these service containers or any other valid [restart policy](https://docs.docker.com/config/containers/start-containers-automatically/#use-a-restart-policy) value.
1818
* `WARDEN_SERVICE_DOMAIN=warden.test` may be set to a domain of your choosing if so desired. Please note that this will not currently change network settings or alter `dnsmasq` configuration. Any TLD other than `test` will require DNS resolution be manually configured.
1919

20-
```{warning}
20+
:::{warning}
2121
Setting ``TRAEFIK_LISTEN=0.0.0.0`` can be quite useful in some cases, but be aware that causing Traefik to listen for requests publicly poses a security risk when on public WiFi or networks otherwise outside of your control.
22-
```
22+
:::
2323

2424
After changing settings in `~/.warden/.env`, please run `warden svc up` to apply.

0 commit comments

Comments
 (0)