You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: configuration/dns-resolver.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,9 +57,9 @@ Restart network-manager
57
57
sudo service network-manager restart
58
58
```
59
59
60
-
```{note}
60
+
:::{note}
61
61
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)
Copy file name to clipboardExpand all lines: configuration/livereload.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,9 +29,9 @@ Magento 2 bundles an example grunt based server-side compilation workflow which
29
29
];
30
30
```
31
31
32
-
```{note}
32
+
:::{note}
33
33
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
+
:::
35
35
36
36
5. Run `bin/magento app:config:import` to load merged configuration into the application.
37
37
@@ -51,9 +51,9 @@ Magento 2 bundles an example grunt based server-side compilation workflow which
51
51
grunt watch
52
52
```
53
53
54
-
```{note}
54
+
:::{note}
55
55
Grunt should be used within the php-fpm container entered via ``warden shell``
56
-
```
56
+
:::
57
57
58
58
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.
Copy file name to clipboardExpand all lines: configuration/multipledomains.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,10 +38,10 @@ Multiple top-level domains may also be setup by following the instructions below
38
38
39
39
4. Run `warden env up` to update the containers, after which each of the URLs should work as expected.
40
40
41
-
```{note}
41
+
:::{note}
42
42
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.
43
43
44
-
```
44
+
:::
45
45
46
46
```yaml
47
47
version: "3.5"
@@ -100,9 +100,9 @@ When multiple domains are being used to load different stores or websites on Mag
100
100
}
101
101
```
102
102
103
-
```{note}
103
+
:::{note}
104
104
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
+
:::
106
106
107
107
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:
108
108
@@ -116,9 +116,9 @@ When multiple domains are being used to load different stores or websites on Mag
116
116
}
117
117
```
118
118
119
-
```{note}
119
+
:::{note}
120
120
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
+
:::
122
122
123
123
3. After editing the `composer.json` regenerate the auto load configuration:
Copy file name to clipboardExpand all lines: configuration/xdebug.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,9 +33,9 @@ To configure a project in VSCode for debugging, add the following to `.vscode/la
33
33
}
34
34
```
35
35
36
-
```{note}
36
+
:::{note}
37
37
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
+
:::
39
39
40
40
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).
Copy file name to clipboardExpand all lines: environments/magento2.md
+48-48Lines changed: 48 additions & 48 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,16 +2,16 @@
2
2
3
3
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.
4
4
5
-
```{note}
5
+
:::{note}
6
6
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
+
:::
8
8
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:
10
10
11
11
mkdir -p ~/Sites/exampleproject
12
12
cd ~/Sites/exampleproject
13
13
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.
15
15
16
16
warden env-init exampleproject magento2
17
17
@@ -56,35 +56,35 @@ The below example demonstrates the from-scratch setup of the Magento 2 applicati
56
56
BLACKFIRE_SERVER_ID=
57
57
BLACKFIRE_SERVER_TOKEN=
58
58
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):
60
60
61
61
warden sign-certificate exampleproject.test
62
62
63
-
4.Next you'll want to start the project environment:
63
+
4. Next you'll want to start the project environment:
64
64
65
65
warden env up
66
66
67
-
```{warning}
67
+
:::{warning}
68
68
If you encounter an error about ``Mounts denied``, follow the instructions in the error message and run ``warden env up`` again.
69
-
```
69
+
:::
70
70
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:
72
72
73
73
warden shell
74
74
75
-
6. Configure global Magento Marketplace credentials
75
+
6. Configure global Magento Marketplace credentials
76
76
77
-
composer global config http-basic.repo.magento.com <username> <password>
77
+
composer global config http-basic.repo.magento.com <username> <password>
78
78
79
-
```{note}
79
+
:::{note}
80
80
To locate your authentication keys for Magento 2 repository, `reference DevDocs <https://devdocs.magento.com/guides/v2.3/install-gde/prereq/connect-auth.html>`_.
81
81
82
82
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.
83
83
84
84
Use the **Public key** as your username and the **Private key** as your password.
85
-
```
85
+
:::
86
86
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:
@@ -94,7 +94,7 @@ The below example demonstrates the from-scratch setup of the Magento 2 applicati
94
94
rsync -a /tmp/exampleproject/ /var/www/html/
95
95
rm -rf /tmp/exampleproject/
96
96
97
-
8. Install the application and you should be all set:
97
+
8. Install the application and you should be all set:
98
98
99
99
## Install Application
100
100
bin/magento setup:install \
@@ -154,60 +154,60 @@ The below example demonstrates the from-scratch setup of the Magento 2 applicati
154
154
bin/magento indexer:reindex
155
155
bin/magento cache:flush
156
156
157
-
```{note}
157
+
:::{note}
158
158
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:
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/>`_.
To completely destroy the ``exampleproject`` environment we just created, run ``warden env down -v`` to tear down the project's Docker containers, volumes, etc.
Copy file name to clipboardExpand all lines: environments/shopware.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,9 +51,9 @@ The below example demonstrates the from-scratch setup of the Shopware 6 applicat
51
51
52
52
warden env up
53
53
54
-
```{warning}
54
+
:::{warning}
55
55
If you encounter an error about ``Mounts denied``, follow the instructions in the error message and run ``warden env up`` again.
56
-
```
56
+
:::
57
57
58
58
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:
59
59
@@ -72,10 +72,10 @@ The below example demonstrates the from-scratch setup of the Shopware 6 applicat
The default username for Shopware 6 is ``admin`` with password ``shopware``.
77
-
```
77
+
:::
78
78
79
-
```{note}
79
+
:::{note}
80
80
To completely destroy the ``exampleproject`` environment we just created, run ``warden env down -v`` to tear down the project's Docker containers, volumes, etc.
Copy file name to clipboardExpand all lines: installing.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,9 +7,9 @@ Installing Warden
7
7
*`docker-compose` version 1.25.0 or later is required (this can be installed via `brew`, `apt`, `dnf`, or `pip3` as needed)
8
8
*[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.
9
9
10
-
```{warning}
10
+
:::{warning}
11
11
**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
+
:::
13
13
14
14
## Installing via Homebrew
15
15
@@ -43,9 +43,9 @@ Launch wsl from your terminal of choice.
43
43
44
44
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.
45
45
46
-
```{warning}
46
+
:::{warning}
47
47
**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
+
:::
49
49
50
50
GUI tools for Windows should use the network paths provided by WSL2: `\\wsl$\Ubuntu-20.04\home\<USER>\<PROJECTPATH>`.
51
51
@@ -66,8 +66,8 @@ On MacOS this root CA certificate is automatically added to a users trust settin
66
66
67
67
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)
68
68
69
-
```{note}
69
+
:::{note}
70
70
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.
71
71
72
72
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.
Copy file name to clipboardExpand all lines: services.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,8 +17,8 @@ The following options are available (with default values indicated):
17
17
*`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.
18
18
*`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.
19
19
20
-
```{warning}
20
+
:::{warning}
21
21
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
+
:::
23
23
24
24
After changing settings in `~/.warden/.env`, please run `warden svc up` to apply.
0 commit comments