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
The below example demonstrates the from-scratch setup of a Drupal 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
+
5
+
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:
6
+
7
+
mkdir -p ~/Sites/exampleproject
8
+
cd ~/Sites/exampleproject
9
+
10
+
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.
11
+
12
+
warden env-init exampleproject drupal
13
+
14
+
The result of this command is a `.env` file in the project root (tip: commit this to your VCS to share the configuration with other team members) having the following contents:
15
+
16
+
WARDEN_ENV_NAME=exampleproject
17
+
WARDEN_ENV_TYPE=drupal
18
+
19
+
WARDEN_WEB_ROOT=/
20
+
21
+
TRAEFIK_DOMAIN=tdpl.test
22
+
TRAEFIK_SUBDOMAIN=app
23
+
DB_DISTRIBUTION=mariadb
24
+
DB_DISTRIBUTION_VERSION=10.4
25
+
NODE_VERSION=18
26
+
COMPOSER_VERSION=2
27
+
PHP_VERSION=8.2
28
+
PHP_XDEBUG_3=1
29
+
30
+
WARDEN_DB=1
31
+
WARDEN_RABBITMQ=0
32
+
WARDEN_REDIS=0
33
+
34
+
RABBITMQ_VERSION=3.8
35
+
36
+
WARDEN_SYNC_IGNORE=
37
+
38
+
WARDEN_ALLURE=0
39
+
WARDEN_SELENIUM=0
40
+
WARDEN_SELENIUM_DEBUG=0
41
+
WARDEN_BLACKFIRE=0
42
+
43
+
BLACKFIRE_CLIENT_ID=
44
+
BLACKFIRE_CLIENT_TOKEN=
45
+
BLACKFIRE_SERVER_ID=
46
+
BLACKFIRE_SERVER_TOKEN=
47
+
48
+
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):
49
+
50
+
warden sign-certificate exampleproject.test
51
+
52
+
4. Next you'll want to start the project environment:
53
+
54
+
warden env up
55
+
56
+
:::{warning}
57
+
If you encounter an error about ``Mounts denied``, follow the instructions in the error message and run ``warden env up`` again.
58
+
:::
59
+
60
+
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:
61
+
62
+
warden shell
63
+
64
+
6. Initialize project source files using composer create-project and then move them into place:
7. Launch the Installation Wizard in your browser and follow the instructions:
72
+
73
+
The new application will be at https://app.exampleproject.test/ (or app.what-you-called-your-project.test).
74
+
75
+
The SQL Credentials that need to be configured are "db" as the host, and "drupal" as the username, password, and database.
76
+
77
+

78
+
79
+
:::{note}
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: environments/types.md
+27-17Lines changed: 27 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,27 @@ When this type is used, a `.warden/warden-env.yml` may be placed in the root dir
10
10
11
11
Similar to the other environment type's base definitions, Warden supports a `warden-env.darwin.yml` and `warden-env.linux.yml`
12
12
13
+
## Drupal
14
+
15
+
The `drupal` environment type supports development of Drupal projects, launching containers including:
16
+
17
+
* Nginx
18
+
* PHP-FPM
19
+
* MariaDB
20
+
21
+
In order to achieve a well performing experience on macOS, files in the webroot are synced into the container using a Mutagen sync session with the exception of `web/sites/default/files` and `web/sites/default/private` which remain mounted using a delegated mount.
22
+
23
+
## Laravel
24
+
25
+
The `laravel` environment type supports development of Laravel projects, launching containers including:
26
+
27
+
* Nginx
28
+
* PHP-FPM
29
+
* MariaDB
30
+
* Redis
31
+
32
+
Files are currently mounted using a delegated mount on macOS and natively on Linux.
33
+
13
34
## Magento 2
14
35
15
36
The `magento2` environment type provides necessary containerized services for running Magento 2 in a local development context including:
@@ -35,20 +56,9 @@ The `magento1` environment type supports development of Magento 1 projects, laun
35
56
36
57
Files are currently mounted using a delegated mount on macOS and natively on Linux.
37
58
38
-
## Laravel
39
-
40
-
The `laravel` environment type supports development of Laravel projects, launching containers including:
41
-
42
-
* Nginx
43
-
* PHP-FPM
44
-
* MariaDB
45
-
* Redis
46
-
47
-
Files are currently mounted using a delegated mount on macOS and natively on Linux.
48
-
49
-
## Symfony
59
+
## Shopware
50
60
51
-
The `symfony` environment type supports development of Symfony 4+ projects, launching containers including:
61
+
The `shopware` environment type supports development of Shopware 6 projects, launching containers including:
52
62
53
63
* Nginx
54
64
* PHP-FPM
@@ -58,11 +68,11 @@ The `symfony` environment type supports development of Symfony 4+ projects, laun
58
68
* Varnish (disabled by default)
59
69
* Elasticsearch (disabled by default)
60
70
61
-
Files are currently mounted using a delegated mount on macOS and natively on Linux.
71
+
In order to achieve a well performing experience on macOS, files in the webroot are synced into the container using a Mutagen sync session with the exception of `public/media` which remains mounted using a delegated mount.
62
72
63
-
## Shopware
73
+
## Symfony
64
74
65
-
The `shopware` environment type supports development of Shopware 6 projects, launching containers including:
75
+
The `symfony` environment type supports development of Symfony 4+ projects, launching containers including:
66
76
67
77
* Nginx
68
78
* PHP-FPM
@@ -72,7 +82,7 @@ The `shopware` environment type supports development of Shopware 6 projects, lau
72
82
* Varnish (disabled by default)
73
83
* Elasticsearch (disabled by default)
74
84
75
-
In order to achieve a well performing experience on macOS, files in the webroot are synced into the container using a Mutagen sync session with the exception of `public/media` which remains mounted using a delegated mount.
85
+
Files are currently mounted using a delegated mount on macOS and natively on Linux.
0 commit comments